* [PATCH net-next 1/1] net: pse-pd: tps23881: Fix the compiler error about implicit declaration of function ‘FIELD_GET’
@ 2024-08-07 7:15 'Guanjun'
2024-08-07 9:10 ` Oleksij Rempel
2024-08-08 15:37 ` Jakub Kicinski
0 siblings, 2 replies; 3+ messages in thread
From: 'Guanjun' @ 2024-08-07 7:15 UTC (permalink / raw)
To: kyle.swenson, o.rempel, kory.maincent, kuba
Cc: davem, edumazet, pabeni, thomas.petazzoni, netdev, guanjun
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>
--
2.43.5
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next 1/1] net: pse-pd: tps23881: Fix the compiler error about implicit declaration of function ‘FIELD_GET’
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
1 sibling, 0 replies; 3+ messages in thread
From: Oleksij Rempel @ 2024-08-07 9:10 UTC (permalink / raw)
To: 'Guanjun'
Cc: kyle.swenson, kory.maincent, kuba, davem, edumazet, pabeni,
thomas.petazzoni, netdev
On Wed, Aug 07, 2024 at 03:15:38PM +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>
Acked-by: Oleksij Rempel <o.rempel@pengutronix.de>
Thank you!
Regards,
Oleksij
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next 1/1] net: pse-pd: tps23881: Fix the compiler error about implicit declaration of function ‘FIELD_GET’
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
1 sibling, 0 replies; 3+ messages in thread
From: Jakub Kicinski @ 2024-08-08 15:37 UTC (permalink / raw)
To: 'Guanjun'
Cc: kyle.swenson, o.rempel, kory.maincent, davem, edumazet, pabeni,
thomas.petazzoni, netdev
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/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2024-08-08 15:37 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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 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).