mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Thorsten Blum <thorsten.blum@toblux.com>
Cc: arnd@arndb.de, davem@davemloft.net, edumazet@google.com,
	glaubitz@physik.fu-berlin.de, kuba@kernel.org,
	linux-kernel@vger.kernel.org, lkp@intel.com,
	netdev@vger.kernel.org, nico@fluxnic.net, pabeni@redhat.com
Subject: Re: [PATCH v3] net: smc91x: Fix pointer types
Date: Fri, 17 May 2024 00:51:30 +0200	[thread overview]
Message-ID: <f192113c-9aee-47be-85f6-cd19fcb81a5e@lunn.ch> (raw)
In-Reply-To: <20240516223004.350368-2-thorsten.blum@toblux.com>

On Fri, May 17, 2024 at 12:30:05AM +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() 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@toblux.com>
> 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>
> ---
> Changes in v2:
> - Use lp->base instead of __ioaddr as suggested by Andrew Lunn. They are
>  essentially the same, but using lp->base results in a smaller diff
> - Remove whitespace only changes as suggested by Andrew Lunn
> - Preserve Acked-by: Nicolas Pitre tag (please let me know if you
>  somehow disagree with the changes in v2 or v3)
> 
> Changes in v3:
> - Revert changing the macros as this is unnecessary. Neither the types
>   nor the __iomem attributes get lost across macro boundaries
> - Preserve Reviewed-by: Andrew Lunn tag (please let me know if you
>   somehow disagree with the changes in v3)

This fixes the warning, but we still have the macro accessing things
not passed to them. If you are going to brother to fix the warnings,
it would also be good to fix the bad practice. Please make a patchset
to do this.

It would also be good if you read:

https://www.kernel.org/doc/html/latest/process/maintainer-netdev.html

	Andrew

  reply	other threads:[~2024-05-16 22:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-16 12:11 [PATCH] " Thorsten Blum
2024-05-16 14:13 ` Andrew Lunn
2024-05-16 15:13   ` Thorsten Blum
2024-05-16 15:56     ` [PATCH v2] " Thorsten Blum
2024-05-16 17:16       ` Andrew Lunn
2024-05-16 18:03         ` Nicolas Pitre
2024-05-16 22:30         ` [PATCH v3] " Thorsten Blum
2024-05-16 22:51           ` Andrew Lunn [this message]
2024-05-16 23:21             ` Thorsten Blum
2024-05-17 10:41               ` Thorsten Blum
2024-05-16 15:28 ` [PATCH] " Nicolas Pitre

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=f192113c-9aee-47be-85f6-cd19fcb81a5e@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=arnd@arndb.de \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=glaubitz@physik.fu-berlin.de \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=nico@fluxnic.net \
    --cc=pabeni@redhat.com \
    --cc=thorsten.blum@toblux.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

all inboxes | Powered by JetHome®