From: Jakub Kicinski <kuba@kernel.org>
To: Alexander Lobakin <aleksander.lobakin@intel.com>
Cc: Horatiu Vultur <horatiu.vultur@microchip.com>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<davem@davemloft.net>, <edumazet@google.com>, <pabeni@redhat.com>,
<UNGLinuxDriver@microchip.com>
Subject: Re: [PATCH net-next] net: lan966x: Fix lan966x_ifh_get
Date: Fri, 14 Apr 2023 18:28:51 -0700 [thread overview]
Message-ID: <20230414182851.6f776cb7@kernel.org> (raw)
In-Reply-To: <06722642-f934-db3a-f88e-94263592b216@intel.com>
On Fri, 14 Apr 2023 19:00:20 +0200 Alexander Lobakin wrote:
> > @@ -608,6 +608,7 @@ static u64 lan966x_ifh_get(u8 *ifh, size_t pos, size_t length)
> > val |= (1 << i);
>
> Alternatively, you can change that to (pick one that you like the most):
>
> val |= 1ULL << i;
> // or
> val |= BIT_ULL(i);
// or
(u64)1 << i
// or, since you're only concerned about sign extension, even
1U << i
having the correct type of the lval seems cleaner than masking, indeed.
next prev parent reply other threads:[~2023-04-15 1:28 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-04-14 8:20 [PATCH net-next] net: lan966x: Fix lan966x_ifh_get Horatiu Vultur
2023-04-14 17:00 ` Alexander Lobakin
2023-04-15 1:28 ` Jakub Kicinski [this message]
2023-04-17 7:13 ` Horatiu Vultur
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=20230414182851.6f776cb7@kernel.org \
--to=kuba@kernel.org \
--cc=UNGLinuxDriver@microchip.com \
--cc=aleksander.lobakin@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horatiu.vultur@microchip.com \
--cc=linux-kernel@vger.kernel.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox