From: Alexey Dobriyan <adobriyan@gmail.com>
To: Paolo Abeni <pabeni@redhat.com>
Cc: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
netdev@vger.kernel.org
Subject: Re: [PATCH] net: delete "<< 1U" cargo-culting
Date: Wed, 19 Jul 2023 14:29:05 +0300 [thread overview]
Message-ID: <2ff150de-8997-47bc-a3dd-114c60a7c912@p183> (raw)
In-Reply-To: <b3faaa6387edd97c93862cd6838808d051e338e6.camel@redhat.com>
On Tue, Jul 18, 2023 at 12:47:50PM +0200, Paolo Abeni wrote:
> On Sat, 2023-07-15 at 13:19 +0300, Alexey Dobriyan wrote:
> > 6.5.7 §3 "Bitwise shift operators" clearly states that
> >
> > The type of the result is that of the promoted left operand
> >
> > All those integer constant suffixes in the right operand are pointless,
> > delete them.
>
> Indeed. Still this patch is quite invasive and the net benefit looks
> quite marginal - if any at all.
I have all tree converted, this is just net/ part.
Net(!) benefit is more readable code.
> Older compiler could adhere to the standard less strictly or
No, no, no. Unless there is known miscompilation I don't buy this argument.
> macro
> expansion - when the left '<<' operand is a macro argument - could be
> tricky.
But it is easy to verify that it doesn't. In theory someone could do
__stringify(UDP_MAX_SEGMENTS)
but what are the odds.
> I think we are better of not applying this.
next prev parent reply other threads:[~2023-07-19 11:29 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-15 10:19 [PATCH] net: delete "<< 1U" cargo-culting Alexey Dobriyan
2023-07-18 10:47 ` Paolo Abeni
2023-07-19 11:29 ` Alexey Dobriyan [this message]
2023-07-19 20:57 ` Jakub Kicinski
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=2ff150de-8997-47bc-a3dd-114c60a7c912@p183 \
--to=adobriyan@gmail.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@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