From: punit.agrawal@arm•com (Punit Agrawal)
To: linux-arm-kernel@lists•infradead.org
Subject: [PATCH] drivers: CCI: Correct use of ! and &
Date: Thu, 31 Jul 2014 16:38:37 +0100 [thread overview]
Message-ID: <9hhoaw55yiq.fsf@arm.com> (raw)
In-Reply-To: <CAOesGMgAY7-MDVG2CzesQurWtMLdODjsdBNV8jScFJtAB3NAJg@mail.gmail.com> (Olof Johansson's message of "Wed, 30 Jul 2014 23:00:24 -0700")
Hi Olof,
Olof Johansson <olof@lixom•net> writes:
> Hi,
>
> On Wed, Jul 30, 2014 at 12:54 PM, Olof Johansson <olof@lixom•net> wrote:
>> On Wed, Jul 30, 2014 at 11:37:35AM +0100, Punit Agrawal wrote:
>>> From: Himangi Saraogi <himangi774@gmail•com>
>>>
>>> In commit ae91d60ba88ef0bdb1b5e9b2363bd52fc45d2af7, a bug was fixed that
>>> involved converting !x & y to !(x & y). The code below shows the same
>>> pattern, and thus should perhaps be fixed in the same way.
>>>
>>> The Coccinelle semantic patch that makes this change is as follows:
>>>
>>> // <smpl>
>>> @@ expression E1,E2; @@
>>> (
>>> !E1 & !E2
>>> |
>>> - !E1 & E2
>>> + !(E1 & E2)
>>> )
>>> // </smpl>
>>>
>>> Cc: stable at vger.kernel.org
>>> Signed-off-by: Himangi Saraogi <himangi774@gmail•com>
>>> Acked-by: Julia Lawall <julia.lawall@lip6•fr>
>>> Acked-by: Punit Agrawal <punit.agrawal@arm•com>
>>> ---
>>
>> Thanks, applied (adding a Fixes: tag, please use those in the future)
Will do.
>
> On second look, I see that the code doesn't actually change behavior
> (since the mask is done with 0x1, it happens to have the same result).
> Pure luck before. :)
Although I'd tested the original submission and had seen interrupts
handled correctly, this fix made me question if I was mis-remembering
(since this was about a year ago).
I had convinced myself that the fix was required. Re-evaluating all the
conditions after reading your response, I agree that it is not a change
in behaviour but still a correct fix.
>
> Because of this, I've moved this to our next/fixes-non-critical
> branch, which will be sent up during the 3.17 merge window, and I took
> off the stable cc. It's still a good fix, but since it doesn't
> actually fix broken behavior there's no need to rush it.
Ack. Thanks a lot.
>
>
> -Olof
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2014-07-31 15:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-30 10:37 [PATCH] drivers: CCI: Correct use of ! and & Punit Agrawal
2014-07-30 19:54 ` Olof Johansson
2014-07-31 6:00 ` Olof Johansson
2014-07-31 15:38 ` Punit Agrawal [this message]
[not found] <20140707140538.GA4204@himangi-Dell>
2014-07-23 15:01 ` Punit Agrawal
2014-07-23 15:05 ` Will Deacon
2014-07-29 11:34 ` Punit Agrawal
2014-07-29 16:41 ` Olof Johansson
2014-07-30 10:32 ` Punit Agrawal
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=9hhoaw55yiq.fsf@arm.com \
--to=punit.agrawal@arm$(echo .)com \
--cc=linux-arm-kernel@lists$(echo .)infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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