From: Simon Horman <horms@kernel.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Ariel Elior <aelior@marvell.com>,
Manish Chopra <manishc@marvell.com>,
netdev@vger.kernel.org, linux-usb@vger.kernel.org,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
linux-kernel@vger.kernel.org, Eric Dumazet <edumazet@google.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
intel-wired-lan@lists.osuosl.org,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
"David S. Miller" <davem@davemloft.net>
Subject: Re: [Intel-wired-lan] [PATCH net-next v4 3/9] net: qlogic: qede: Use linkmode helpers for EEE
Date: Wed, 21 Feb 2024 10:28:51 +0000 [thread overview]
Message-ID: <20240221102851.GA352018@kernel.org> (raw)
In-Reply-To: <a52361ef-66ab-41bd-b245-ccd26fcbd957@lunn.ch>
On Tue, Feb 20, 2024 at 03:45:28PM +0100, Andrew Lunn wrote:
> > > + unsupp = linkmode_andnot(tmp, edata->advertised, supported);
> >
> > nit: Given the types involved, I might have written this as:
> >
> > unsupp = !!linkmode_andnot(tmp, edata->advertised, supported);
>
> linkmode_andnot() calls bitmap_andnot():
>
> static inline bool bitmap_andnot(unsigned long *dst, const unsigned long *src1,
> const unsigned long *src2, unsigned int nbits)
>
> It already returns a bool, so there is no need to force an int to bool
> conversion using !!.
Good point, sorry for missing that.
I assume there is a reason that the return type of
linkmode_andnot is not bool.
WARNING: multiple messages have this Message-ID (diff)
From: Simon Horman <horms@kernel.org>
To: Andrew Lunn <andrew@lunn.ch>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Ariel Elior <aelior@marvell.com>,
Manish Chopra <manishc@marvell.com>,
Jesse Brandeburg <jesse.brandeburg@intel.com>,
Tony Nguyen <anthony.l.nguyen@intel.com>,
linux-usb@vger.kernel.org, netdev@vger.kernel.org,
linux-kernel@vger.kernel.org, intel-wired-lan@lists.osuosl.org
Subject: Re: [PATCH net-next v4 3/9] net: qlogic: qede: Use linkmode helpers for EEE
Date: Wed, 21 Feb 2024 10:28:51 +0000 [thread overview]
Message-ID: <20240221102851.GA352018@kernel.org> (raw)
In-Reply-To: <a52361ef-66ab-41bd-b245-ccd26fcbd957@lunn.ch>
On Tue, Feb 20, 2024 at 03:45:28PM +0100, Andrew Lunn wrote:
> > > + unsupp = linkmode_andnot(tmp, edata->advertised, supported);
> >
> > nit: Given the types involved, I might have written this as:
> >
> > unsupp = !!linkmode_andnot(tmp, edata->advertised, supported);
>
> linkmode_andnot() calls bitmap_andnot():
>
> static inline bool bitmap_andnot(unsigned long *dst, const unsigned long *src1,
> const unsigned long *src2, unsigned int nbits)
>
> It already returns a bool, so there is no need to force an int to bool
> conversion using !!.
Good point, sorry for missing that.
I assume there is a reason that the return type of
linkmode_andnot is not bool.
next prev parent reply other threads:[~2024-02-21 10:29 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-18 17:06 [Intel-wired-lan] [PATCH net-next v4 0/9] drivers: net: Convert EEE handling to use linkmode bitmaps Andrew Lunn
2024-02-18 17:06 ` Andrew Lunn
2024-02-18 17:06 ` [Intel-wired-lan] [PATCH net-next v4 1/9] net: usb: r8152: Use linkmode helpers for EEE Andrew Lunn
2024-02-18 17:06 ` Andrew Lunn
2024-02-20 12:56 ` [Intel-wired-lan] " Simon Horman
2024-02-20 12:56 ` Simon Horman
2024-02-18 17:06 ` [Intel-wired-lan] [PATCH net-next v4 2/9] net: usb: ax88179_178a: " Andrew Lunn
2024-02-18 17:06 ` Andrew Lunn
2024-02-20 12:39 ` [Intel-wired-lan] " Simon Horman
2024-02-20 12:39 ` Simon Horman
2024-02-20 14:40 ` [Intel-wired-lan] " Andrew Lunn
2024-02-20 14:40 ` Andrew Lunn
2024-02-18 17:07 ` [Intel-wired-lan] [PATCH net-next v4 3/9] net: qlogic: qede: " Andrew Lunn
2024-02-18 17:07 ` Andrew Lunn
2024-02-20 12:44 ` [Intel-wired-lan] " Simon Horman
2024-02-20 12:44 ` Simon Horman
2024-02-20 14:45 ` [Intel-wired-lan] " Andrew Lunn
2024-02-20 14:45 ` Andrew Lunn
2024-02-21 10:28 ` Simon Horman [this message]
2024-02-21 10:28 ` Simon Horman
2024-02-22 15:11 ` [Intel-wired-lan] " Andrew Lunn
2024-02-22 15:11 ` Andrew Lunn
2024-02-18 17:07 ` [Intel-wired-lan] [PATCH net-next v4 4/9] net: ethernet: ixgbe: Convert EEE to use linkmodes Andrew Lunn
2024-02-18 17:07 ` Andrew Lunn
2024-02-20 12:06 ` [Intel-wired-lan] " Simon Horman
2024-02-20 12:06 ` Simon Horman
2024-02-20 14:47 ` [Intel-wired-lan] " Andrew Lunn
2024-02-20 14:47 ` Andrew Lunn
2024-02-18 17:07 ` [Intel-wired-lan] [PATCH net-next v4 5/9] net: intel: i40e/igc: Remove setting Autoneg in EEE capabilities Andrew Lunn
2024-02-18 17:07 ` Andrew Lunn
2024-02-18 17:07 ` [Intel-wired-lan] [PATCH net-next v4 6/9] net: intel: e1000e: Use linkmode helpers for EEE Andrew Lunn
2024-02-18 17:07 ` Andrew Lunn
2024-02-20 12:44 ` [Intel-wired-lan] " Simon Horman
2024-02-20 12:44 ` Simon Horman
2024-02-18 17:07 ` [Intel-wired-lan] [PATCH net-next v4 7/9] net: intel: igb: " Andrew Lunn
2024-02-18 17:07 ` Andrew Lunn
2024-02-20 12:45 ` [Intel-wired-lan] " Simon Horman
2024-02-20 12:45 ` Simon Horman
2024-02-18 17:07 ` [Intel-wired-lan] [PATCH net-next v4 8/9] net: intel: igc: " Andrew Lunn
2024-02-18 17:07 ` Andrew Lunn
2024-02-20 12:45 ` [Intel-wired-lan] " Simon Horman
2024-02-20 12:45 ` Simon Horman
2024-02-18 17:07 ` [Intel-wired-lan] [PATCH net-next v4 9/9] net: ethtool: eee: Remove legacy _u32 from keee Andrew Lunn
2024-02-18 17:07 ` Andrew Lunn
2024-02-20 12:47 ` [Intel-wired-lan] " Simon Horman
2024-02-20 12:47 ` Simon Horman
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=20240221102851.GA352018@kernel.org \
--to=horms@kernel.org \
--cc=aelior@marvell.com \
--cc=andrew@lunn.ch \
--cc=anthony.l.nguyen@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=jesse.brandeburg@intel.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=manishc@marvell.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.