linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: "Benson Leung" <bleung@chromium.org>,
	"Guenter Roeck" <groeck@chromium.org>,
	"Qii Wang" <qii.wang@mediatek.com>,
	"Matthias Brugger" <matthias.bgg@gmail.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Andreas Färber" <afaerber@suse.de>,
	"Manivannan Sadhasivam" <mani@kernel.org>,
	"Ard Biesheuvel" <ardb@kernel.org>,
	"Michal Simek" <michal.simek@xilinx.com>,
	linux-i2c@vger.kernel.org, chrome-platform@lists.linux.dev,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-mediatek@lists.infradead.org,
	linux-actions@lists.infradead.org
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: [PATCH 3/5] i2c: xiic: hide OF related data for COMPILE_TEST
Date: Sat, 11 Mar 2023 12:16:56 +0100	[thread overview]
Message-ID: <20230311111658.251951-3-krzysztof.kozlowski@linaro.org> (raw)
In-Reply-To: <20230311111658.251951-1-krzysztof.kozlowski@linaro.org>

The driver can be compile tested with !CONFIG_OF making certain data
unused:

  drivers/i2c/busses/i2c-xiic.c:1202:39: error: ‘xiic_2_00’ defined but not used [-Werror=unused-const-variable=]

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
---
 drivers/i2c/busses/i2c-xiic.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/i2c/busses/i2c-xiic.c b/drivers/i2c/busses/i2c-xiic.c
index dbb792fc197e..806b447055fb 100644
--- a/drivers/i2c/busses/i2c-xiic.c
+++ b/drivers/i2c/busses/i2c-xiic.c
@@ -1199,11 +1199,11 @@ static const struct i2c_adapter xiic_adapter = {
 	.algo = &xiic_algorithm,
 };
 
+#if defined(CONFIG_OF)
 static const struct xiic_version_data xiic_2_00 = {
 	.quirks = DYNAMIC_MODE_READ_BROKEN_BIT,
 };
 
-#if defined(CONFIG_OF)
 static const struct of_device_id xiic_of_match[] = {
 	{ .compatible = "xlnx,xps-iic-2.00.a", .data = &xiic_2_00 },
 	{ .compatible = "xlnx,axi-iic-2.1", },
-- 
2.34.1


  parent reply	other threads:[~2023-03-11 11:20 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-11 11:16 [PATCH 1/5] i2c: mt65xx: drop of_match_ptr for ID table Krzysztof Kozlowski
2023-03-11 11:16 ` [PATCH 2/5] i2c: owl: " Krzysztof Kozlowski
2023-03-11 16:05   ` Guenter Roeck
2023-03-16 19:56   ` Wolfram Sang
2023-03-11 11:16 ` Krzysztof Kozlowski [this message]
2023-03-11 16:34   ` [PATCH 3/5] i2c: xiic: hide OF related data for COMPILE_TEST Guenter Roeck
2023-03-29 18:56   ` Wolfram Sang
2023-03-11 11:16 ` [PATCH 4/5] i2c: cros-ec-tunnel: Mark ACPI and OF related data as maybe unused Krzysztof Kozlowski
2023-03-11 16:09   ` Guenter Roeck
2023-03-16 19:56   ` Wolfram Sang
2023-03-11 11:16 ` [PATCH 5/5] i2c: synquacer: mark " Krzysztof Kozlowski
2023-03-11 16:35   ` Guenter Roeck
2023-03-29 18:56   ` Wolfram Sang
2023-03-11 16:04 ` [PATCH 1/5] i2c: mt65xx: drop of_match_ptr for ID table Guenter Roeck
2023-03-13  8:47 ` AngeloGioacchino Del Regno
2023-03-16 19:56 ` Wolfram Sang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230311111658.251951-3-krzysztof.kozlowski@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=afaerber@suse.de \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=ardb@kernel.org \
    --cc=bleung@chromium.org \
    --cc=chrome-platform@lists.linux.dev \
    --cc=groeck@chromium.org \
    --cc=linux-actions@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mediatek@lists.infradead.org \
    --cc=mani@kernel.org \
    --cc=matthias.bgg@gmail.com \
    --cc=michal.simek@xilinx.com \
    --cc=qii.wang@mediatek.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).