mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexander Sverdlin <alexander.sverdlin@gmail.com>
To: Nikita Shubin <nikita.shubin@maquefel.me>,
	Arnd Bergmann <arnd@arndb.de>,
	 soc@kernel.org
Cc: linux-kernel@vger.kernel.org, kernel test robot <lkp@intel.com>
Subject: Re: [PATCH] net: cirrus: use u8 for addr to calm down sparse
Date: Sun, 22 Sep 2024 14:54:50 +0200	[thread overview]
Message-ID: <194f2e20d40a496f9e9f23392ee911900a7c30b7.camel@gmail.com> (raw)
In-Reply-To: <20240922065212.7483-1-nikita.shubin@maquefel.me>

Hi Nikita!

On Sun, 2024-09-22 at 09:52 +0300, Nikita Shubin wrote:
> ep93xx_eth.c:805:40: sparse: sparse: incorrect type in argument 2
> 				     (different address spaces)
> ep93xx_eth.c:805:40: sparse: expected unsigned char const [usertype] *addr
> ep93xx_eth.c:805:40: sparse: got void [noderef] __iomem *
> 
> Reported-by: kernel test robot <lkp@intel.com>
> Closes: https://lore.kernel.org/oe-kbuild-all/202409212354.9CiUem7B-lkp@intel.com/
> Fixes: 858555bb5598 ("net: cirrus: add DT support for Cirrus EP93xx")
> Signed-off-by: Nikita Shubin <nikita.shubin@maquefel.me>

Acked-by: Alexander Sverdlin <alexander.sverdlin@gmail.com>

> ---
>  drivers/net/ethernet/cirrus/ep93xx_eth.c | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/net/ethernet/cirrus/ep93xx_eth.c b/drivers/net/ethernet/cirrus/ep93xx_eth.c
> index 2523d9c9d1b8..c2007cd86416 100644
> --- a/drivers/net/ethernet/cirrus/ep93xx_eth.c
> +++ b/drivers/net/ethernet/cirrus/ep93xx_eth.c
> @@ -771,6 +771,7 @@ static int ep93xx_eth_probe(struct platform_device *pdev)
>  	struct resource *mem;
>  	void __iomem *base_addr;
>  	struct device_node *np;
> +	u8 addr[ETH_ALEN];
>  	u32 phy_id;
>  	int irq;
>  	int err;
> @@ -802,7 +803,8 @@ static int ep93xx_eth_probe(struct platform_device *pdev)
>  		goto err_out;
>  	}
>  
> -	eth_hw_addr_set(dev, base_addr + 0x50);
> +	memcpy_fromio(addr, base_addr + 0x50, ETH_ALEN);
> +	eth_hw_addr_set(dev, addr);
>  	dev->ethtool_ops = &ep93xx_ethtool_ops;
>  	dev->netdev_ops = &ep93xx_netdev_ops;
>  	dev->features |= NETIF_F_SG | NETIF_F_HW_CSUM;

-- 
Alexander Sverdlin.


      reply	other threads:[~2024-09-22 12:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-22  6:52 Nikita Shubin
2024-09-22 12:54 ` Alexander Sverdlin [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=194f2e20d40a496f9e9f23392ee911900a7c30b7.camel@gmail.com \
    --to=alexander.sverdlin@gmail.com \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=nikita.shubin@maquefel.me \
    --cc=soc@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

all inboxes | Powered by JetHome®