linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: David Hildenbrand <david@redhat.com>
To: Joey Pabalinas <joeypabalinas@gmail.com>,
	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 13:16:57 +0200	[thread overview]
Message-ID: <c6780d87-1d0c-4075-b351-40f3c8f6e4b1@redhat.com> (raw)
In-Reply-To: <ka3dhrfkc42ydbiiqa4ygr545ndydcpekjco36sdwf2nypuy33@vpsgevacmzjv>

On 04.09.25 12:04, Joey Pabalinas wrote:
> 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.

I suspect you didn't even test that patch?

Please do us all a favor and don't send any more such patches.

-- 
Cheers

David / dhildenb



  reply	other threads:[~2025-09-04 11:17 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
2025-09-04 11:16     ` David Hildenbrand [this message]
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=c6780d87-1d0c-4075-b351-40f3c8f6e4b1@redhat.com \
    --to=david@redhat.com \
    --cc=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