From patchwork Fri Mar 10 22:29:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13170273 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6A2CFC6FA99 for ; Fri, 10 Mar 2023 22:31:09 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232094AbjCJWbI (ORCPT ); Fri, 10 Mar 2023 17:31:08 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44804 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232087AbjCJWar (ORCPT ); Fri, 10 Mar 2023 17:30:47 -0500 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ECDAD123CD1 for ; Fri, 10 Mar 2023 14:29:40 -0800 (PST) Received: by mail-ed1-x536.google.com with SMTP id cw28so26496754edb.5 for ; Fri, 10 Mar 2023 14:29:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678487379; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=zZBiSBh/uMHLxNGMJD5/x7iKpfjagyjpgEMbyA0c4IY=; b=kI8tbYpRepNoWUOIKSEz3YzOMlaj+FiVTekSncMStWDI5O7kelt7UpFXprP2HySvV1 /8uVzvFEtlcvTuPOkrWbbOL3zZrTmcV7uMKQO0j1YcNm3UYdT4vBQhvY+YUpuA7pqmuv WxeNVsD7qw9YZZ68yAAPsoiYQTCkD+//U41hA5Ij7xx2Yf8CK35RtWTwy4WLTPqr89ON 9eygPHgv6mxlMhxleYm1MlBp71KBVomYKgGcgONPmUJsCd2rvy4uu2jeESLevIctmwka nMAPxEb1MykjP7rfo8HywrvX0tihJGGiMW1X5jvUnetfWU9NVQ2Qc+tt9+J/2mYGcth3 HR0g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678487379; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=zZBiSBh/uMHLxNGMJD5/x7iKpfjagyjpgEMbyA0c4IY=; b=vlCFNwqf6EJ0SXY/s5oTd04hsma1kSeF/rw+qqntgB7xFwfqfx+T2mY/zIGNWSmxG0 qn+CWXy/kstBYqnWcpiYrlgt0x/hYUdFsRIGRn49wZ2WV/mBBsRp5uydLnNHYHt3UeGP z/GUr1Nc5LW9Qc9LKOmIhTI0nynbbvaYzlrZuoUdvrjUPCW3xUt47tQ0Hka+aCqdwq6f /hEvrWYpMf7L5yWvtIf3K3A19DcM+c5e6v1nmxqhEVm+OxTYHxYQS2sFPiqWxljx0XjU MXDzanCS44+NPggUoj1MWI8I6RG8jqHmmZx3caWkXPk0/0hlFqOhxQA1wb5uKNZxqETI q9VA== X-Gm-Message-State: AO0yUKXauehYPVygC/QIOMheJ7ifG+W9pZgHF2lUihCrdFG1NeFIbHNO PpaJaDtuPxPnXlCUz1ZOuHjJxlhhK2DdLbUzk3A= X-Google-Smtp-Source: AK7set+U/X5h1L8f+O6dk2UpzKGGJkAH3/87LaLO1bo9+b2A4dcWda14m+u/RspMEgdY+VIIzKQCRQ== X-Received: by 2002:a17:907:98d2:b0:8af:54d0:181d with SMTP id kd18-20020a17090798d200b008af54d0181dmr23195756ejc.35.1678487378977; Fri, 10 Mar 2023 14:29:38 -0800 (PST) Received: from krzk-bin.. ([2a02:810d:15c0:828:34:52e3:a77e:cac5]) by smtp.gmail.com with ESMTPSA id d5-20020a170906370500b008e17dc10decsm371201ejc.52.2023.03.10.14.29.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 14:29:38 -0800 (PST) From: Krzysztof Kozlowski To: Heikki Krogerus , Greg Kroah-Hartman , Guenter Roeck , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 1/2] usb: typec: hd3ss3220: Drop of_match_ptr for ID table Date: Fri, 10 Mar 2023 23:29:36 +0100 Message-Id: <20230310222937.315773-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The driver can match only via the DT table so the table should be always used and the of_match_ptr does not have any sense (this also allows ACPI matching via PRP0001, even though it is not relevant here). drivers/usb/typec/hd3ss3220.c:284:34: error: ‘dev_ids’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus --- drivers/usb/typec/hd3ss3220.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/typec/hd3ss3220.c b/drivers/usb/typec/hd3ss3220.c index 746ef3a75b76..8bbeb9b1e439 100644 --- a/drivers/usb/typec/hd3ss3220.c +++ b/drivers/usb/typec/hd3ss3220.c @@ -290,7 +290,7 @@ MODULE_DEVICE_TABLE(of, dev_ids); static struct i2c_driver hd3ss3220_driver = { .driver = { .name = "hd3ss3220", - .of_match_table = of_match_ptr(dev_ids), + .of_match_table = dev_ids, }, .probe_new = hd3ss3220_probe, .remove = hd3ss3220_remove, From patchwork Fri Mar 10 22:29:37 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13170274 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6ED8FC6FD19 for ; Fri, 10 Mar 2023 22:31:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232182AbjCJWbJ (ORCPT ); Fri, 10 Mar 2023 17:31:09 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44844 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232106AbjCJWas (ORCPT ); Fri, 10 Mar 2023 17:30:48 -0500 Received: from mail-ed1-x532.google.com (mail-ed1-x532.google.com [IPv6:2a00:1450:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B363E13F6BB for ; Fri, 10 Mar 2023 14:29:42 -0800 (PST) Received: by mail-ed1-x532.google.com with SMTP id ec29so26472690edb.6 for ; Fri, 10 Mar 2023 14:29:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678487380; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=A/fmpCgDpxvA8LWrln8hMWcUkIUbZl0gDdryYs66ZNM=; b=R0rVkOFTK01I8PkQgLEcrcN8h1z1TXzJ4sTyCu1Dc/T0d3rgGrCdfCJhUKaPz5ufdr TX5GuQRbGajeSaex+o6jv92Y1mM2L9hji0967HOwVSVHQZLiBGNkNE7YL1z3PVto2o7E jIzTNU/HR45d4Lc79wXyGiFz7u4MJd0reZLtsSmEKdZ+PYqwSHamhtlepZeIcnS/6eV+ fzaMtkMZX/ZD/ZwnKY5XesQoREsOIOUWeCkkUZXVpt2Pf2NnZJmOwY5XoMxZe+3ybWPD CsTJzM5Lgl9HX2VmgJq1fUqPxjgwKUD2zPQueLzmEZOVa5HyJW3Iugkagtp3eqBfPpbD Fclw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678487380; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=A/fmpCgDpxvA8LWrln8hMWcUkIUbZl0gDdryYs66ZNM=; b=R5EdohRajfaONlOMtuu70PeJqYfk/zO08QVyYopARxaXPo4wA6fm/doh8HhV/x59K7 9GB85RZy4wzFZz0msUMZdLynSFnoexQAJl1sAqMwobfWslzZEzSMFJKncfCnxmfrWxx0 QBwa8W8YTDBmW9zApFOPGBFOaBXmm4S4yI0HxyuuR7ahZPp+A1DHAdGJuCygcHrIZ30X i04rtN51fG7SbAxVo+jq2X4zOcR8Ga4BxHcKGH4+X/AorBqxql39BflJg+2jw0c8l+1P Zh87R3vs1NF/ty+z2+vGHwnd8r/DH75uSbqvw8luVH+izEdTucilnj0iAUVp9wkc70c3 Z0MA== X-Gm-Message-State: AO0yUKVdQJsEZZNoY4bU/XFzg34nHkAN919XU+wjSgsrS93G2CrZrebG FVnTbgZRr7HwwOLT9Gzw6rRWQw== X-Google-Smtp-Source: AK7set9dImNV/KN8EiLdY5EpM2XCsDXv1qyUfw+n5R9ekVwcaPaRxhGQLlDaSANKhoPsd9Ret83tWQ== X-Received: by 2002:a17:907:6e0f:b0:907:672b:736a with SMTP id sd15-20020a1709076e0f00b00907672b736amr33289494ejc.31.1678487380294; Fri, 10 Mar 2023 14:29:40 -0800 (PST) Received: from krzk-bin.. ([2a02:810d:15c0:828:34:52e3:a77e:cac5]) by smtp.gmail.com with ESMTPSA id d5-20020a170906370500b008e17dc10decsm371201ejc.52.2023.03.10.14.29.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 10 Mar 2023 14:29:40 -0800 (PST) From: Krzysztof Kozlowski To: Heikki Krogerus , Greg Kroah-Hartman , Guenter Roeck , linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 2/2] usb: typec: fusb302: mark OF related data as maybe unused Date: Fri, 10 Mar 2023 23:29:37 +0100 Message-Id: <20230310222937.315773-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230310222937.315773-1-krzysztof.kozlowski@linaro.org> References: <20230310222937.315773-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/usb/typec/tcpm/fusb302.c:1816:34: error: ‘fusb302_dt_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski Reviewed-by: Guenter Roeck Reviewed-by: Heikki Krogerus --- drivers/usb/typec/tcpm/fusb302.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/usb/typec/tcpm/fusb302.c b/drivers/usb/typec/tcpm/fusb302.c index 1ffce00d94b4..592b0aec782f 100644 --- a/drivers/usb/typec/tcpm/fusb302.c +++ b/drivers/usb/typec/tcpm/fusb302.c @@ -1813,7 +1813,7 @@ static int fusb302_pm_resume(struct device *dev) return 0; } -static const struct of_device_id fusb302_dt_match[] = { +static const struct of_device_id fusb302_dt_match[] __maybe_unused = { {.compatible = "fcs,fusb302"}, {}, };