From: Simon Horman <simon.horman@corigine.com>
To: Tristram.Ha@microchip.com
Cc: davem@davemloft.net, andrew@lunn.ch, f.fainelli@gmail.com,
netdev@vger.kernel.org, UNGLinuxDriver@microchip.com
Subject: Re: [PATCH net-next] net: phy: smsc: add WoL support to LAN8740/LAN8742 PHYs.
Date: Thu, 1 Jun 2023 10:46:46 +0200 [thread overview]
Message-ID: <ZHha9tmg2ZfsKCYT@corigine.com> (raw)
In-Reply-To: <BYAPR11MB35584E92C5EA85D79800528FEC489@BYAPR11MB3558.namprd11.prod.outlook.com>
On Wed, May 31, 2023 at 10:52:22PM +0000, Tristram.Ha@microchip.com wrote:
> > > + if (wol->wolopts & WAKE_ARP) {
> > > + const u8 *ip_addr =
> > > + ((const u8 *)&((ndev->ip_ptr)->ifa_list)->ifa_address);
> >
> > Hi Tristram,
> >
> > Sparse seems unhappy about this:
> >
> > .../smsc.c:449:27: warning: cast removes address space '__rcu' of expression
> >
>
> This will be fixed with in_dev_get() and rcu_dereference().
>
> > > + /* Try to match IPv6 Neighbor Solicitation. */
> > > + if (ndev->ip6_ptr) {
> > > + struct list_head *addr_list =
> > > + &ndev->ip6_ptr->addr_list;
> >
> > And this:
> >
> > .../smsc.c:485:38: warning: incorrect type in initializer (different address spaces)
> > .../smsc.c:485:38: expected struct list_head *addr_list
> > .../smsc.c:485:38: got struct list_head [noderef] __rcu *
> > .../smsc.c:449:45: warning: dereference of noderef expression
> >
> > Please make sure that patches don't intoduce new warnings with W=1 C=1 builds.
>
> This will be fixed with in6_dev_get().
>
> > > +#define MII_LAN874X_PHY_PME1_SET (2<<13)
> > > +#define MII_LAN874X_PHY_PME2_SET (2<<11)
> >
> > nit: Maybe GENMASK is appropriate here.
> > If not, please consider spaces around '<<'
>
> Will update.
Thanks, much appreciated.
next prev parent reply other threads:[~2023-06-01 8:47 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-27 1:39 [PATCH net-next] net: phy: smsc: add WoL support to LAN8740/LAN8742 PHYs Tristram.Ha
2023-05-27 13:56 ` Simon Horman
2023-05-31 22:52 ` Tristram.Ha
2023-06-01 8:46 ` Simon Horman [this message]
2023-05-27 17:04 ` kernel test robot
2023-05-28 4:50 ` kernel test robot
2023-05-29 14:48 ` Andrew Lunn
2023-05-31 22:43 ` Tristram.Ha
2023-05-31 23:10 ` Andrew Lunn
2023-05-31 23:07 ` Florian Fainelli
2023-06-01 22:53 ` Tristram.Ha
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=ZHha9tmg2ZfsKCYT@corigine.com \
--to=simon.horman@corigine.com \
--cc=Tristram.Ha@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=netdev@vger.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;
as well as URLs for NNTP newsgroup(s).