[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <0efd687d-3df5-49dd-b01c-d5bd977ae12e@lunn.ch>
Date: Thu, 16 May 2024 19:16:27 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Thorsten Blum <thorsten.blum@...lux.com>
Cc: arnd@...db.de, davem@...emloft.net, edumazet@...gle.com,
glaubitz@...sik.fu-berlin.de, kuba@...nel.org,
linux-kernel@...r.kernel.org, lkp@...el.com, netdev@...r.kernel.org,
nico@...xnic.net, pabeni@...hat.com
Subject: Re: [PATCH v2] net: smc91x: Fix pointer types
On Thu, May 16, 2024 at 05:56:12PM +0200, 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().
>
> Use lp->base instead of ioaddr when calling SMC_outsw(), SMC_outsb(),
> SMC_insw(), and SMC_insb() to retain its type across macro boundaries
> and 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 *
>
> Signed-off-by: Thorsten Blum <thorsten.blum@...lux.com>
> Reported-by: kernel test robot <lkp@...el.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202405160853.3qyaSj8w-lkp@intel.com/
> Acked-by: Nicolas Pitre <nico@...xnic.net>
Reviewed-by: Andrew Lunn <andrew@...n.ch>
You could add a follow up patch which removes the
void __iomem *__ioaddr = ioaddr; lines and uses lp->base.
The code will then be more uniform.
Andrew
Powered by blists - more mailing lists