From: Leon Romanovsky <leon@kernel.org>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Paolo Abeni <pabeni@redhat.com>, Jakub Kicinski <kuba@kernel.org>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>
Subject: Re: [PATCH net-next][resend v1 1/1] netlink: Don't use int as bool in netlink_update_socket_mc()
Date: Tue, 11 Jul 2023 16:32:59 +0300 [thread overview]
Message-ID: <20230711133259.GS41919@unreal> (raw)
In-Reply-To: <ZK1O7lBF1vH7/7UM@smile.fi.intel.com>
On Tue, Jul 11, 2023 at 03:45:34PM +0300, Andy Shevchenko wrote:
> On Tue, Jul 11, 2023 at 03:20:12PM +0300, Leon Romanovsky wrote:
> > On Tue, Jul 11, 2023 at 01:54:18PM +0300, Andy Shevchenko wrote:
> > > On Tue, Jul 11, 2023 at 12:21:12PM +0200, Paolo Abeni wrote:
> > > > On Tue, 2023-07-11 at 09:33 +0300, Leon Romanovsky wrote:
> > > > > On Mon, Jul 10, 2023 at 01:06:24PM +0300, Andy Shevchenko wrote:
>
> ...
>
> > > > > So what is the outcome of "int - bool + bool" in the line above?
> > >
> > > The same as with int - int [0 .. 1] + int [0 .. 1].
> >
> > No, it is not. bool is defined as _Bool C99 type, so strictly speaking
> > you are mixing types int - _Bool + _Bool.
>
> 1. The original code already does that. You still haven't reacted on that.
The original code was int - int + int.
> 2. Is what you are telling a problema?
No, I'm saying that you took perfectly correct code which had all types
aligned and changed it to have mixed type arithmetic.
Thanks
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
next prev parent reply other threads:[~2023-07-11 13:33 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-10 10:06 [PATCH net-next][resend v1 1/1] netlink: Don't use int as bool in netlink_update_socket_mc() Andy Shevchenko
2023-07-11 6:33 ` Leon Romanovsky
2023-07-11 10:21 ` Paolo Abeni
2023-07-11 10:54 ` Andy Shevchenko
2023-07-11 12:20 ` Leon Romanovsky
2023-07-11 12:45 ` Andy Shevchenko
2023-07-11 13:32 ` Leon Romanovsky [this message]
2023-07-11 13:44 ` Andy Shevchenko
2023-07-11 17:10 ` Leon Romanovsky
2023-07-11 17:19 ` Andy Shevchenko
2023-07-12 0:43 ` 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=20230711133259.GS41919@unreal \
--to=leon@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=kuba@kernel.org \
--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;
as well as URLs for NNTP newsgroup(s).