From patchwork Sun Mar 12 15:34:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13171526 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 2381AC6FD19 for ; Sun, 12 Mar 2023 15:34:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229515AbjCLPef (ORCPT ); Sun, 12 Mar 2023 11:34:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229493AbjCLPee (ORCPT ); Sun, 12 Mar 2023 11:34:34 -0400 Received: from mail-ed1-x52c.google.com (mail-ed1-x52c.google.com [IPv6:2a00:1450:4864:20::52c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AD2BB4109B for ; Sun, 12 Mar 2023 08:34:33 -0700 (PDT) Received: by mail-ed1-x52c.google.com with SMTP id o12so39248042edb.9 for ; Sun, 12 Mar 2023 08:34:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678635272; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=ksvn1qLyFWFuPBY6uKwSYze+p9CmBi8BDb68DqvsMsE=; b=zMvjqsjYAeUA+vFEKA2/S732aWQkr7mHojBdCbfp/P5tAsIjgg263Mt5bn49sSZBb7 rGG/9cDUlNCf2mNlK5HFAS7wmKZJKWNY3mPm0nGZQg+DywTeXevUP/PLnDpf1GNnX/U6 XnxuMLELqmdZkD5saATcNR2nAKYbzQjGYyj/K0jnSfmmfaTqxWKGLX/tiqZ6rQJkfbln 3Uc080pwtvAvkd4P+a6XFK5qn43ieR6RzIhSJQPJbLYchWsUgzYtmwS13oq73r0SnZkI zCYhvu+cuelx4XbGAbNynjlfWd6nK8umC2+1NZzP7hMSj/vYvi94ehBepn2ua80hPJmR w6aw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678635272; 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=ksvn1qLyFWFuPBY6uKwSYze+p9CmBi8BDb68DqvsMsE=; b=1nHbJBC+kQcdVFalnAFYowcd/mcmE1H5ZGp/SKi4NvNspFM7RGrEFD8cQDoPH+Fsh2 Gdi69fcvLJMTzGuSGLJqW/gcnR3yEvE9uxALzJqq0CqQ6WQrK/rAC4JWvvdC80Cb++Bt skvYEQuQADj+NVEehIdnc1uwZpPZpbdTClTDj+8gOrX83lL/AUZZZQcc6ArOkZ/apGRZ 9zOarTfJqrcelVHoPiWFnP6DhQCsJwTa3pO58pVzoTbPa+eAyeQIum5PI3wWlVRnLnPn IQr+fCABvhxEXCHcijKFsBmwlSIPZn30UhKfNVinRlCwkV3iRiCgm0dLA/Q3b8bjGACQ ejeg== X-Gm-Message-State: AO0yUKWTXuXLWdL4IJY+9uoBmFokuspUEV91NJmGNAb1zayvgo7Qyu0o +NGeXMgJGDkzIvMVjXxQspmsKg== X-Google-Smtp-Source: AK7set8VSGMSRJL8L749CvyrBt04OYaMMELy6gEabbN4Ic/q95eM3v++xTHbXs/hDkzQU6NCgYO/Tg== X-Received: by 2002:a17:907:8746:b0:8b1:7fe9:162e with SMTP id qo6-20020a170907874600b008b17fe9162emr35320405ejc.47.1678635272168; Sun, 12 Mar 2023 08:34:32 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:d9f6:3e61:beeb:295a]) by smtp.gmail.com with ESMTPSA id z2-20020a170906668200b008e0bb004976sm2312723ejo.134.2023.03.12.08.34.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Mar 2023 08:34:31 -0700 (PDT) From: Krzysztof Kozlowski To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Robert Eshleman , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v2 1/3] iio: dac: ad5755: mark OF related data as maybe unused Date: Sun, 12 Mar 2023 16:34:27 +0100 Message-Id: <20230312153429.371702-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-iio@vger.kernel.org The driver can be compile tested with !CONFIG_OF making certain data unused (of_device_id is not used for device matching): drivers/iio/dac/ad5755.c:865:34: error: ‘ad5755_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski --- Changes since v1: 1. None. Although Jonathan expressed need of changes here, they are a bit too invasive for me thus I am resending it only for completeness. I understand therefore that patch might not be accepted. --- drivers/iio/dac/ad5755.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/dac/ad5755.c b/drivers/iio/dac/ad5755.c index beadfa938d2d..a6dc8a0bfc29 100644 --- a/drivers/iio/dac/ad5755.c +++ b/drivers/iio/dac/ad5755.c @@ -862,7 +862,7 @@ static const struct spi_device_id ad5755_id[] = { }; MODULE_DEVICE_TABLE(spi, ad5755_id); -static const struct of_device_id ad5755_of_match[] = { +static const struct of_device_id ad5755_of_match[] __maybe_unused = { { .compatible = "adi,ad5755" }, { .compatible = "adi,ad5755-1" }, { .compatible = "adi,ad5757" }, From patchwork Sun Mar 12 15:34:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13171527 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 AE9BAC6FA99 for ; Sun, 12 Mar 2023 15:34:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229925AbjCLPeg (ORCPT ); Sun, 12 Mar 2023 11:34:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46490 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229681AbjCLPef (ORCPT ); Sun, 12 Mar 2023 11:34:35 -0400 Received: from mail-ed1-x52f.google.com (mail-ed1-x52f.google.com [IPv6:2a00:1450:4864:20::52f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6C1B741B5E for ; Sun, 12 Mar 2023 08:34:34 -0700 (PDT) Received: by mail-ed1-x52f.google.com with SMTP id er25so11128060edb.5 for ; Sun, 12 Mar 2023 08:34:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678635273; 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=Jo2NqS2zRnOmFXuAfigU28D6znKyOMxuJ/PtqM8xL/o=; b=mWDprQhsa9VdEHPAceKFNkoijx6mTG37ZiUg/JljzXlRXxx4JM8rWKVoJ4HbgFbtjv rxn5Ck7IOVo7IXIZg83E+GmK+SMgTlNWePAPn4ErAYdu9aLt/37x0jhal6wSFRFf35Ef 2EkuVZpEjy7A2YNK5HGbdB3fjrbf5Nme5LjFGG63ie8Qx0aRgCtaqZCoTwB3VPygWR3i rww28efnI0bNJSVuRTObqeQ5p0q1JKGfJM7agGrgndPJrqb8T99UM7louhioa5K3He19 jzbdSq8EvDyK6Td71EAjuVBsHNXzVNNYDfQf4tIjOgfD8GgSgsjtQLM4/Jci6BHGepXI pkWw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678635273; 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=Jo2NqS2zRnOmFXuAfigU28D6znKyOMxuJ/PtqM8xL/o=; b=tu2llbQy/cRlRzl4uvX9MdAZ9SLUCpXHzqbJtseO/lcdYPvhjnziDekirw8X5872f7 LlY6GWkqcAJyClTbsTK3UOcNnUW0z/3ndb4sWVFazaUfbLiTH+tpMPwwM723x0ZzUHZd ImHuXDphGY8H5wTKQhwA67yG+Tfv4QDzzVyU2rzANlfqA6NlXPa0kObTK06ZFlGrv/WK QMGO87+yk/dr4rHyI96arJ2Jk6b1jvNjTZ010O3jAxgU5CcJ7jL3pNJ5xnv2Jfge9iRI E9fXPPLSJSw36l/1ukRCgcFXYNnB6rMCBSpr0gRQ7DMhCi6iOyKJfGW9LmKBnqn5P9JH h0yQ== X-Gm-Message-State: AO0yUKW5bJL6Bh+VKMTjHhmm8cg7/sEYXHG1jWElMvmV2txt+5drrzX4 L1473ZCmAndlUk/qD89xo7P+QA== X-Google-Smtp-Source: AK7set/x7hjFFTV34zMt+n3N7otnooyqSyY/mS3gp4dTaDO+jU7uplVrh/WCriEH0dOuzLl3B/OZbA== X-Received: by 2002:a17:906:99d4:b0:8ed:5aac:6973 with SMTP id s20-20020a17090699d400b008ed5aac6973mr31069426ejn.35.1678635273004; Sun, 12 Mar 2023 08:34:33 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:d9f6:3e61:beeb:295a]) by smtp.gmail.com with ESMTPSA id z2-20020a170906668200b008e0bb004976sm2312723ejo.134.2023.03.12.08.34.32 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Mar 2023 08:34:32 -0700 (PDT) From: Krzysztof Kozlowski To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Robert Eshleman , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v2 2/3] iio: light: max44009: add missing OF device matching Date: Sun, 12 Mar 2023 16:34:28 +0100 Message-Id: <20230312153429.371702-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230312153429.371702-1-krzysztof.kozlowski@linaro.org> References: <20230312153429.371702-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org The driver currently matches only via i2c_device_id, but also has of_device_id table: drivers/iio/light/max44009.c:545:34: error: ‘max44009_of_match’ defined but not used [-Werror=unused-const-variable=] Fixes: 6aef699a7d7e ("iio: light: add driver for MAX44009") Signed-off-by: Krzysztof Kozlowski --- Changes since v1: 1. Drop __maybe_unused/of_match_ptr --- drivers/iio/light/max44009.c | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/drivers/iio/light/max44009.c b/drivers/iio/light/max44009.c index 3dadace09fe2..176dcad6e8e8 100644 --- a/drivers/iio/light/max44009.c +++ b/drivers/iio/light/max44009.c @@ -527,6 +527,12 @@ static int max44009_probe(struct i2c_client *client) return devm_iio_device_register(&client->dev, indio_dev); } +static const struct of_device_id max44009_of_match[] = { + { .compatible = "maxim,max44009" }, + { } +}; +MODULE_DEVICE_TABLE(of, max44009_of_match); + static const struct i2c_device_id max44009_id[] = { { "max44009", 0 }, { } @@ -536,18 +542,13 @@ MODULE_DEVICE_TABLE(i2c, max44009_id); static struct i2c_driver max44009_driver = { .driver = { .name = MAX44009_DRV_NAME, + .of_match_table = max44009_of_match, }, .probe_new = max44009_probe, .id_table = max44009_id, }; module_i2c_driver(max44009_driver); -static const struct of_device_id max44009_of_match[] = { - { .compatible = "maxim,max44009" }, - { } -}; -MODULE_DEVICE_TABLE(of, max44009_of_match); - MODULE_AUTHOR("Robert Eshleman "); MODULE_LICENSE("GPL v2"); MODULE_DESCRIPTION("MAX44009 ambient light sensor driver"); From patchwork Sun Mar 12 15:34:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13171528 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 EF593C6FD19 for ; Sun, 12 Mar 2023 15:34:38 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229494AbjCLPeh (ORCPT ); Sun, 12 Mar 2023 11:34:37 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229784AbjCLPeg (ORCPT ); Sun, 12 Mar 2023 11:34:36 -0400 Received: from mail-ed1-x533.google.com (mail-ed1-x533.google.com [IPv6:2a00:1450:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AB0E6EA9 for ; Sun, 12 Mar 2023 08:34:35 -0700 (PDT) Received: by mail-ed1-x533.google.com with SMTP id fd5so5376796edb.7 for ; Sun, 12 Mar 2023 08:34:35 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678635274; 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=9kvgcMUGd07Xd3eyILFDk+DeCEWHO2H7A73K4YH9RZs=; b=sckQnzxqcVD2P6n4wKlXn+PAO+hZd6wQwdAXljCJPORmWzShV8Qd5/kZDRX1renVoL fnBpY7NEDz/8oI5+i4ueiTdw1ognJLr9nbZt+uEKQb5x+pW6nuNjLiYE3KT0DgH4x4cU vxeZ6pzIiEtUZE0VpBj75JnCEiEhuDDZSMEQ4HRU9cY126iixAzAyPG5l+Dg3traNquP 0o7gY3znMx2YHGO6VTIxRSPnj6p+wYhXbVMHbiXlM4aNjbW2OJwYd/kqXSNWIOz23BEf JyS9th1vnVGmxr/W6A1YNu+S3EsKc/KjNRxlGGU65YaIo7p1lk4K382W2V6eV1bAvXAf AvuQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678635274; 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=9kvgcMUGd07Xd3eyILFDk+DeCEWHO2H7A73K4YH9RZs=; b=zv0PHKxqM0vNdbmfulA7nzJuzED6E5KqxDzOUcUZMaNdqDGDeYt57X0PEAmt6RjHna l/oSDxdOY32T+Cv2D4WmQYr+yN7Y3pZrT1Ffrqasu9GBrPuQw2uVn8Q0OJhYuGp4WSnV z/t+QsWOXkGcA821yb+4QZyLrstiQJOg58MluTjg59jwT+TSjhtG+GVudguqH8lqqquj wzn/pMXFmEZ3U458MRrOTwfV8ibxkvtYgV0y98kUXz0L/c6Ko5MK12Va/7O91GyLDcTu 39+I5qlEoSEkx4GoXMs4jXqH+Kk/EhWgtDJVJKCQxFQ2MwIL1Xr3EUC81hlDpxlTaeYq zEzA== X-Gm-Message-State: AO0yUKUluUY79I8mZaVlRWRW3kO21Wr57TWnq1LknA+LnoS1IRkuQgUQ dMAsdxWmmQBkvsgWPqpphr3idg== X-Google-Smtp-Source: AK7set+LW7wkF4ML14NRWahSG6NXgm3FnETJtwxNWw/Eb52r2gCC8Ln8bspgvhbKuB5L4mMzSPF+5Q== X-Received: by 2002:a17:907:94ce:b0:907:183f:328a with SMTP id dn14-20020a17090794ce00b00907183f328amr39131550ejc.65.1678635273802; Sun, 12 Mar 2023 08:34:33 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:d9f6:3e61:beeb:295a]) by smtp.gmail.com with ESMTPSA id z2-20020a170906668200b008e0bb004976sm2312723ejo.134.2023.03.12.08.34.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 12 Mar 2023 08:34:33 -0700 (PDT) From: Krzysztof Kozlowski To: Lars-Peter Clausen , Michael Hennerich , Jonathan Cameron , Robert Eshleman , linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH v2 3/3] iio: proximity: sx9500: Reference ACPI and OF ID data Date: Sun, 12 Mar 2023 16:34:29 +0100 Message-Id: <20230312153429.371702-3-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230312153429.371702-1-krzysztof.kozlowski@linaro.org> References: <20230312153429.371702-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org Always reference acpi_device_id and of_device_id tables, as they is little benefit of conditional compiling and OF table could be used also for ACPI matching via PRP0001. This fixes warning: drivers/iio/proximity/sx9500.c:1039:34: error: ‘sx9500_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski --- Changes since v1: 1. Drop of_match_ptr and ACPI_PTR --- drivers/iio/proximity/sx9500.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/iio/proximity/sx9500.c b/drivers/iio/proximity/sx9500.c index 8794e75e5bf9..9b2cfcade6a4 100644 --- a/drivers/iio/proximity/sx9500.c +++ b/drivers/iio/proximity/sx9500.c @@ -1051,8 +1051,8 @@ MODULE_DEVICE_TABLE(i2c, sx9500_id); static struct i2c_driver sx9500_driver = { .driver = { .name = SX9500_DRIVER_NAME, - .acpi_match_table = ACPI_PTR(sx9500_acpi_match), - .of_match_table = of_match_ptr(sx9500_of_match), + .acpi_match_table = sx9500_acpi_match, + .of_match_table = sx9500_of_match, .pm = pm_sleep_ptr(&sx9500_pm_ops), }, .probe_new = sx9500_probe,