From patchwork Sat Mar 11 11:16:09 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13170775 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 1F3D5C61DA4 for ; Sat, 11 Mar 2023 11:18:27 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230479AbjCKLSY (ORCPT ); Sat, 11 Mar 2023 06:18:24 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47842 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230028AbjCKLRZ (ORCPT ); Sat, 11 Mar 2023 06:17:25 -0500 Received: from mail-ed1-x52d.google.com (mail-ed1-x52d.google.com [IPv6:2a00:1450:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 119E613F570 for ; Sat, 11 Mar 2023 03:16:25 -0800 (PST) Received: by mail-ed1-x52d.google.com with SMTP id j11so30743699edq.4 for ; Sat, 11 Mar 2023 03:16:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678533373; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=OCzg8SfNWOR6ZGwqRQLrQy1Mo0FTE4MlBOnbJtRBfZ4=; b=x6ny6ewhdLvAMEqWw/3v72kyLaxkOEQQMYQmghS2Psgll1Kl6XAJkbVe7IVZPOjRQ/ Lz19EHwiTGVBsfi94BuHFfz+ITLVvmLB/R4E+rcM9UEvXuPZo1cDnpmuQ89F9w68mVsg jz+hHWlyHpmFzs4utE+du/L35nyBCVtkBHAgqrna5CADgVdD6RI0KmqUuT67/dfwqUlA xJkNduPizZaltQC3JRZtvS05az6SpWXuk/M/kfUQnOjd4E2OcZKO23x+Y7ucRZ3mKmcM hO4wBI3KXesk2mGPJoUKDBaNN7hPlXnByOVo5dpEjuOqzqtNmR1U5Zyqm+u536bHkG0Z jkMg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678533373; 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=OCzg8SfNWOR6ZGwqRQLrQy1Mo0FTE4MlBOnbJtRBfZ4=; b=4jRPf4m3v5b2r6SeHggo42SErFwUn0NZKaDxpfvongCiY3lJM41ybAHBd/mG1N3EfA hb/n0eDKq6OwhNshABJuFsHTsq+Wk1perGS8uMTPhpiRdTPwdO10Xc5T+4/N4U2665bR xo8Pxt7pGSRVW0HWx0e8CqaEVVlqKrGUMtAKJ/5Lrqmm52Ssvmk267KA8KeYkes+LxAM XY0oUwhPZZrcuIY6F0FqWa6YXsCC+d0WTmQ1LX9hseHeBOygVxgoDcgEvCibgZ1fSU19 vNWgMrcwJBe9ms9hCXfciIkEpI1+8hHBW4CdT36JB8ZR8qZxbpupNK0fPpSu/xPTJvJp xueA== X-Gm-Message-State: AO0yUKUexWNLiJkZaVrytu959GKsosHUGA79fy7rHnlqbWxX/AeZwPA2 3xURSZtfJor8PWm0P3VwElF/iQ== X-Google-Smtp-Source: AK7set9cjLbbYo2UOa5RfYgrzvA4oeSfkxQ06b+0q09ZBj03pG80CWlkc8SXf/95ocSPl0c1+DXLfQ== X-Received: by 2002:aa7:d149:0:b0:4fa:dad6:4b63 with SMTP id r9-20020aa7d149000000b004fadad64b63mr573298edo.37.1678533373699; Sat, 11 Mar 2023 03:16:13 -0800 (PST) Received: from krzk-bin.. ([2a02:810d:15c0:828:fa97:2d7c:bdd7:e1b]) by smtp.gmail.com with ESMTPSA id a20-20020a1709065f9400b008be0b7242d5sm994267eju.90.2023.03.11.03.16.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Mar 2023 03:16:13 -0800 (PST) From: Krzysztof Kozlowski To: Jean Delvare , Guenter Roeck , Eric Tremblay , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 1/2] hwmon: gpio-fan: mark OF related data as maybe unused Date: Sat, 11 Mar 2023 12:16:09 +0100 Message-Id: <20230311111610.251774-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-hwmon@vger.kernel.org The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/hwmon/gpio-fan.c:484:34: error: ‘of_gpio_fan_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski --- drivers/hwmon/gpio-fan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/gpio-fan.c b/drivers/hwmon/gpio-fan.c index e75db6f64e8c..be7f06fb7f78 100644 --- a/drivers/hwmon/gpio-fan.c +++ b/drivers/hwmon/gpio-fan.c @@ -481,7 +481,7 @@ static int gpio_fan_get_of_data(struct gpio_fan_data *fan_data) return 0; } -static const struct of_device_id of_gpio_fan_match[] = { +static const struct of_device_id of_gpio_fan_match[] __maybe_unused = { { .compatible = "gpio-fan", }, {}, }; From patchwork Sat Mar 11 11:16:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 13170774 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 5821FC61DA4 for ; Sat, 11 Mar 2023 11:18:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229612AbjCKLRy (ORCPT ); Sat, 11 Mar 2023 06:17:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230493AbjCKLRO (ORCPT ); Sat, 11 Mar 2023 06:17:14 -0500 Received: from mail-ed1-x52a.google.com (mail-ed1-x52a.google.com [IPv6:2a00:1450:4864:20::52a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4991613E537 for ; Sat, 11 Mar 2023 03:16:15 -0800 (PST) Received: by mail-ed1-x52a.google.com with SMTP id ec29so30746542edb.6 for ; Sat, 11 Mar 2023 03:16:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1678533375; 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=uuRNRUnU93a6QzL7hyyUbX01xfBSkCWeMzRh8r6dY6k=; b=OSKNFKBLStoHH04AWadAgOuCZnv36fo5IzfOIaNuZCGMjyhiwtHx57flpyIyXImOBS AOnoAUo6X5LMLLSwhZ2USn/BQoWF1uIQmH3DGbNO45NTGzmlG9donYuGvVNBVzZrSlDy Q4C91YI2sUpUFkVRk/L6i6bdPtOqL9Tfol3cc4V7LyPW3XQNqFD6cY3DQOoqfEtXFUoA eEPzPQPjj5JKIU/VM/1pjdiRG/oomPIwVw+ookvcS7wafKMTkGx/mjX4pOty/+dvCo0J wVBAnx1WIS5rpA8ybJk/gZ1Xdxr+jxWVh7YyQ+SiQfi52U2Fjzpx5fq9Sry/I4Df/smn zHtg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1678533375; 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=uuRNRUnU93a6QzL7hyyUbX01xfBSkCWeMzRh8r6dY6k=; b=dmrWIKQr4TXY9bGKKY3b1QMqxEu+ZpnJqgbH0JfJZzhyy23yzjxflWoR8kaskNsenH GurmYeH4v9cByA7/W+q5UhxzB+ba7sYMQXGOVZf6Gy4q682jGK7Sbhn35grY6cUurgVx 1c/g8jYz1zbM/jWgfiRkY3TAMTxsVZVkyL1gIBXfb9NOZIcdDRai0G97+iZuDJKIFqNy oKAn6/reJ122OO6skPDA4xjobVA3rB0maQ0+hbwPg77Zf/i/BFvIET7S3XtXu2L/7EL4 P9KItTStj/+Jr6usE8WRCATVfntWmAjPd5oxCE5HPYqz5+wunHcQVWYwEeXiCwKl1jrH qxaw== X-Gm-Message-State: AO0yUKXv/k1fwP9y2GrvJkvNP3sg10Oexmy6hWjJh3VZu7w5tRahq8Uk JvxyUySjHCDToIxS4ccBD0jR4ZLP7rMIt1Q8orM= X-Google-Smtp-Source: AK7set8Kdjni9+cAZV2vgir64mpALVb0+pcthopD9oyvGSB++vYCQDP/qesE4NY2LEPaRbJnpUf28w== X-Received: by 2002:a17:907:7d8d:b0:8b1:387b:c0c8 with SMTP id oz13-20020a1709077d8d00b008b1387bc0c8mr33049728ejc.15.1678533374794; Sat, 11 Mar 2023 03:16:14 -0800 (PST) Received: from krzk-bin.. ([2a02:810d:15c0:828:fa97:2d7c:bdd7:e1b]) by smtp.gmail.com with ESMTPSA id a20-20020a1709065f9400b008be0b7242d5sm994267eju.90.2023.03.11.03.16.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 11 Mar 2023 03:16:14 -0800 (PST) From: Krzysztof Kozlowski To: Jean Delvare , Guenter Roeck , Eric Tremblay , linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski Subject: [PATCH 2/2] hwmon: tmp512: mark OF related data as maybe unused Date: Sat, 11 Mar 2023 12:16:10 +0100 Message-Id: <20230311111610.251774-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230311111610.251774-1-krzysztof.kozlowski@linaro.org> References: <20230311111610.251774-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-hwmon@vger.kernel.org The driver can be compile tested with !CONFIG_OF making certain data unused: drivers/hwmon/tmp513.c:610:34: error: ‘tmp51x_of_match’ defined but not used [-Werror=unused-const-variable=] Signed-off-by: Krzysztof Kozlowski --- drivers/hwmon/tmp513.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/tmp513.c b/drivers/hwmon/tmp513.c index 47bbe47e062f..78cdd2d2d875 100644 --- a/drivers/hwmon/tmp513.c +++ b/drivers/hwmon/tmp513.c @@ -607,7 +607,7 @@ static const struct i2c_device_id tmp51x_id[] = { }; MODULE_DEVICE_TABLE(i2c, tmp51x_id); -static const struct of_device_id tmp51x_of_match[] = { +static const struct of_device_id tmp51x_of_match[] __maybe_unused = { { .compatible = "ti,tmp512", .data = (void *)tmp512