Message ID | 20240529143859.108201-4-thorsten.blum@toblux.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 6d9e9c36e1a6407818ec8ef9785ae47150d7ddc3 |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | [RESEND,net-next,v3] net: smc91x: Fix pointer types | expand |
On Wed, May 29, 2024, at 16:39, Thorsten Blum wrote: > Use void __iomem pointers as parameters for mcf_insw() and mcf_outsw() > to align with the parameter types of readw() and writew() to fix the > following warnings reported by kernel test robot: > > drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: warning: incorrect > type in argument 1 (different address spaces) > drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: expected void *a > drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: got void [noderef] > __iomem * > drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: warning: incorrect > type in argument 1 (different address spaces) > drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: expected void *a > drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: got void [noderef] > __iomem * > drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: warning: incorrect > type in argument 1 (different address spaces) > drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: expected void *a > drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: got void [noderef] > __iomem * > drivers/net/ethernet/smsc/smc91x.c:483:17: sparse: warning: incorrect > type in argument 1 (different address spaces) > drivers/net/ethernet/smsc/smc91x.c:483:17: sparse: expected void *a > drivers/net/ethernet/smsc/smc91x.c:483:17: sparse: got void > [noderef] __iomem * > > Reported-by: kernel test robot <lkp@intel.com> > Closes: > https://lore.kernel.org/oe-kbuild-all/202405160853.3qyaSj8w-lkp@intel.com/ > Acked-by: Nicolas Pitre <nico@fluxnic.net> > Reviewed-by: Andrew Lunn <andrew@lunn.ch> > Signed-off-by: Thorsten Blum <thorsten.blum@toblux.com> Acked-by: Arnd Bergmann <arnd@arndb.de>
Hello: This patch was applied to netdev/net-next.git (main) by Jakub Kicinski <kuba@kernel.org>: On Wed, 29 May 2024 16:39:02 +0200 you wrote: > Use void __iomem pointers as parameters for mcf_insw() and mcf_outsw() > to align with the parameter types of readw() and writew() to fix the > following warnings reported by kernel test robot: > > drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: warning: incorrect type in argument 1 (different address spaces) > drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: expected void *a > drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: got void [noderef] __iomem * > drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: warning: incorrect type in argument 1 (different address spaces) > drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: expected void *a > drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: got void [noderef] __iomem * > drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: warning: incorrect type in argument 1 (different address spaces) > drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: expected void *a > drivers/net/ethernet/smsc/smc91x.c:590:9: sparse: got void [noderef] __iomem * > drivers/net/ethernet/smsc/smc91x.c:483:17: sparse: warning: incorrect type in argument 1 (different address spaces) > drivers/net/ethernet/smsc/smc91x.c:483:17: sparse: expected void *a > drivers/net/ethernet/smsc/smc91x.c:483:17: sparse: got void [noderef] __iomem * > > [...] Here is the summary with links: - [RESEND,net-next,v3] net: smc91x: Fix pointer types https://git.kernel.org/netdev/net-next/c/6d9e9c36e1a6 You are awesome, thank you!
diff --git a/drivers/net/ethernet/smsc/smc91x.h b/drivers/net/ethernet/smsc/smc91x.h index 45ef5ac0788a..38aa4374e813 100644 --- a/drivers/net/ethernet/smsc/smc91x.h +++ b/drivers/net/ethernet/smsc/smc91x.h @@ -142,14 +142,14 @@ static inline void _SMC_outw_align4(u16 val, void __iomem *ioaddr, int reg, #define SMC_CAN_USE_32BIT 0 #define SMC_NOWAIT 1 -static inline void mcf_insw(void *a, unsigned char *p, int l) +static inline void mcf_insw(void __iomem *a, unsigned char *p, int l) { u16 *wp = (u16 *) p; while (l-- > 0) *wp++ = readw(a); } -static inline void mcf_outsw(void *a, unsigned char *p, int l) +static inline void mcf_outsw(void __iomem *a, unsigned char *p, int l) { u16 *wp = (u16 *) p; while (l-- > 0)