From: Ammar Faizi <[email protected]>
To: Dan Carpenter <[email protected]>
Cc: [email protected],
"Paul E. McKenney" <[email protected]>,
[email protected], [email protected],
GNU/Weeb Mailing List <[email protected]>
Subject: Re: [ammarfaizi2-block:paulmck/linux-rcu/dev.2023.01.19a 55/61] kernel/rcu/rcutorture.c:3548 rcu_torture_init_srcu_lockdep() warn: for statement not indented
Date: Wed, 25 Jan 2023 15:45:03 +0700 [thread overview]
Message-ID: <Y9DsDxJ+8/[email protected]> (raw)
In-Reply-To: <Y9DpFTItKK8NkFR0@kadam>
On Wed, Jan 25, 2023 at 11:32:21AM +0300, Dan Carpenter wrote:
> These are all "false positives" (kind of). It's 8 copies of code which
> does:
>
> for (i = 0; i < 3; i++) {
> ...
> if (i == 2) {
> for (i = 0; i < 8; i++)
> foo = bar[i];
> }
> }
>
> So the loop exits with i == 8 instead of i == 3 but that doesn't matter.
> Ugh... Did the original author do this deliberately or did it just work
> by chance? I really prefer buggy code to code to ugly code. With buggy
> code it's a technical matter and easy to fix, but with ugly code that's
> like a big debate and a social problem...
>
> On the other hand, in this case, I don't think anyone is going to defend
> the original style from these drivers so I may as well patch it.
Yeah, that pattern doesn't look like intentional. I agree with you.
--
Ammar Faizi
next prev parent reply other threads:[~2023-01-25 8:45 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-01-24 9:32 [ammarfaizi2-block:paulmck/linux-rcu/dev.2023.01.19a 55/61] kernel/rcu/rcutorture.c:3548 rcu_torture_init_srcu_lockdep() warn: for statement not indented Dan Carpenter
2023-01-24 10:05 ` Dan Carpenter
2023-01-25 8:10 ` Dan Carpenter
2023-01-25 8:32 ` Dan Carpenter
2023-01-25 8:45 ` Ammar Faizi [this message]
2023-01-25 14:56 ` Paul E. McKenney
2023-01-24 14:51 ` Paul E. McKenney
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=Y9DsDxJ+8/[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
[email protected] \
/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