netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: 'Guanjun' <guanjun@linux.alibaba.com>
Cc: kyle.swenson@est.tech, o.rempel@pengutronix.de,
	kory.maincent@bootlin.com, davem@davemloft.net,
	edumazet@google.com, pabeni@redhat.com,
	thomas.petazzoni@bootlin.com, netdev@vger.kernel.org
Subject: Re: [PATCH net-next 1/1] net: pse-pd: tps23881: Fix the compiler error about implicit declaration of function ‘FIELD_GET’
Date: Thu, 8 Aug 2024 08:37:27 -0700	[thread overview]
Message-ID: <20240808083727.43cd0063@kernel.org> (raw)
In-Reply-To: <20240807071538.569784-1-guanjun@linux.alibaba.com>

On Wed,  7 Aug 2024 15:15:38 +0800 'Guanjun' wrote:
> From: Guanjun <guanjun@linux.alibaba.com>
> 
> bitfield.h is not explicitly included but it is required for FIELD_GET.
> There will be a compiler error:
>   drivers/net/pse-pd/tps23881.c: In function ‘tps23881_i2c_probe’:
>   drivers/net/pse-pd/tps23881.c:755:6: error: implicit declaration of function ‘FIELD_GET’ [-Werror=implicit-function-declaration]
>     755 |  if (FIELD_GET(TPS23881_REG_DEVID_MASK, ret) != TPS23881_DEVICE_ID) {
>         |      ^~~~~~~~~
>   cc1: some warnings being treated as errors
> 
> Fixes: 89108cb5c285 (net: pse-pd: tps23881: Fix the device ID check)
> Signed-off-by: Guanjun <guanjun@linux.alibaba.com>
> ---
>  drivers/net/pse-pd/tps23881.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/net/pse-pd/tps23881.c b/drivers/net/pse-pd/tps23881.c
> index f90db758554b..fa947e30e2ba 100644
> --- a/drivers/net/pse-pd/tps23881.c
> +++ b/drivers/net/pse-pd/tps23881.c
> @@ -10,6 +10,7 @@
>  #include <linux/i2c.h>
>  #include <linux/module.h>
>  #include <linux/of.h>
> +#include <linux/bitfield.h>
>  #include <linux/platform_device.h>
>  #include <linux/pse-pd/pse.h>
>  

There was another fix posted shortly after which seems better:

https://lore.kernel.org/r/20240807075455.2055224-1-arnd@kernel.org/

      parent reply	other threads:[~2024-08-08 15:37 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-08-07  7:15 [PATCH net-next 1/1] net: pse-pd: tps23881: Fix the compiler error about implicit declaration of function ‘FIELD_GET’ 'Guanjun'
2024-08-07  9:10 ` Oleksij Rempel
2024-08-08 15:37 ` Jakub Kicinski [this message]

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=20240808083727.43cd0063@kernel.org \
    --to=kuba@kernel.org \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=guanjun@linux.alibaba.com \
    --cc=kory.maincent@bootlin.com \
    --cc=kyle.swenson@est.tech \
    --cc=netdev@vger.kernel.org \
    --cc=o.rempel@pengutronix.de \
    --cc=pabeni@redhat.com \
    --cc=thomas.petazzoni@bootlin.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).