public inbox for linux-i2c@vger.kernel.org
 help / color / mirror / Atom feed
From: "Hawkins, Nick" <nick.hawkins@hpe.com>
To: Arnd Bergmann <arnd@kernel.org>,
	"Verdun, Jean-Marie" <verdun@hpe.com>,
	Wolfram Sang <wsa@kernel.org>, Joel Stanley <joel@jms.id.au>
Cc: "Arnd Bergmann" <arnd@arndb.de>,
	"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
	"Andy Shevchenko" <andriy.shevchenko@linux.intel.com>,
	"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: RE: [PATCH] i2c: gxp: fix build failure without CONFIG_I2C_SLAVE
Date: Mon, 3 Apr 2023 17:17:58 +0000	[thread overview]
Message-ID: <DM4PR84MB1927213E096523B6ADCB030C88929@DM4PR84MB1927.NAMPRD84.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20230403074939.3785593-1-arnd@kernel.org>


> From: Arnd Bergmann <arnd@arndb.de>

> The gxp_i2c_slave_irq_handler() is hidden in an #ifdef, but the
> caller uses an IS_ENABLED() check:

> drivers/i2c/busses/i2c-gxp.c: In function 'gxp_i2c_irq_handler':
> drivers/i2c/busses/i2c-gxp.c:467:29: error: implicit declaration of function 'gxp_i2c_slave_irq_handler'; did you mean 'gxp_i2c_irq_handler'? [-Werror=implicit-function-declaration]

> It has to consistently use one method or the other to avoid warnings,
> so move to IS_ENABLED() here for readability and build coverage, and
> move the #ifdef in linux/i2c.h to allow building it as dead code.

> Fixes: 4a55ed6f89f5 ("i2c: Add GXP SoC I2C Controller")
> Signed-off-by: Arnd Bergmann <arnd@arndb.de>

Thanks for finding and correcting this!

Reviewed-by: Nick Hawkins <nick.hawkins@hpe.com>

  reply	other threads:[~2023-04-03 17:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-04-03  7:49 [PATCH] i2c: gxp: fix build failure without CONFIG_I2C_SLAVE Arnd Bergmann
2023-04-03 17:17 ` Hawkins, Nick [this message]
2023-04-13 19:27 ` Wolfram Sang
2023-04-13 20:19   ` Arnd Bergmann
2023-05-03 15:23 ` 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=DM4PR84MB1927213E096523B6ADCB030C88929@DM4PR84MB1927.NAMPRD84.PROD.OUTLOOK.COM \
    --to=nick.hawkins@hpe.com \
    --cc=andriy.shevchenko@linux.intel.com \
    --cc=arnd@arndb.de \
    --cc=arnd@kernel.org \
    --cc=joel@jms.id.au \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=u.kleine-koenig@pengutronix.de \
    --cc=verdun@hpe.com \
    --cc=wsa@kernel.org \
    /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