From: Joey Pabalinas <joeypabalinas@gmail.com>
To: Kiryl Shutsemau <kirill@shutemov.name>
Cc: linux-kernel@vger.kernel.org, linux-mm@kvack.org,
Kees Cook <kees@kernel.org>
Subject: Re: [PATCH] fork: simplify overcomplicated if conditions
Date: Thu, 4 Sep 2025 00:04:40 -1000 [thread overview]
Message-ID: <ka3dhrfkc42ydbiiqa4ygr545ndydcpekjco36sdwf2nypuy33@vpsgevacmzjv> (raw)
In-Reply-To: <tzjq757k4tt7k2mkcapttjuax6zgzr3nl7ivusuvxfmok5kvb4@vub2gw7vp7vu>
[-- Attachment #1: Type: text/plain, Size: 467 bytes --]
On Thu, Sep 04, 2025 at 10:56:44AM +0100, Kiryl Shutsemau wrote:
> On Wed, Sep 03, 2025 at 08:46:29PM -1000, Joey Pabalinas wrote:
> > Since `((a & (b|c)) == (b|c))` is the same thing as `(a & (b|c))`, use
> > the second version which is simpler.
>
> Huh? No it is not the same thing.
>
> a = 1;
> b = 1;
> c = 2;
>
> (a & (b|c)) is 1 which is true.
> ((a & (b|c)) == (b|c)) is false.
Ah, you are right. My mistake.
--
Cheers,
Joey Pabalinas
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2025-09-04 10:04 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-09-04 6:46 Joey Pabalinas
2025-09-04 9:56 ` Kiryl Shutsemau
2025-09-04 10:04 ` Joey Pabalinas [this message]
2025-09-04 11:16 ` David Hildenbrand
2025-09-04 10:41 ` [syzbot ci] " syzbot ci
2025-09-08 6:52 ` [PATCH] " kernel test robot
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=ka3dhrfkc42ydbiiqa4ygr545ndydcpekjco36sdwf2nypuy33@vpsgevacmzjv \
--to=joeypabalinas@gmail.com \
--cc=kees@kernel.org \
--cc=kirill@shutemov.name \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.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