From: Pintu Agarwal <pintu.ping@gmail.com>
To: Catalin Marinas <catalin.marinas@arm.com>
Cc: Pintu Kumar <quic_pintu@quicinc.com>,
akpm@linux-foundation.org, linux-mm@kvack.org,
linux-kernel@vger.kernel.org, skhan@linuxfoundation.org
Subject: Re: [PATCH] mm/kmemleak: fix errors/warnings for coding style
Date: Thu, 17 Oct 2024 22:53:28 +0530 [thread overview]
Message-ID: <CAOuPNLhvD9ya45RdSjoBA6bVkp2UpMqO_QvVOOeafd3ZUtHdTQ@mail.gmail.com> (raw)
In-Reply-To: <ZxDbgS98-_VNkGXJ@arm.com>
Hi Catalin,
On Thu, 17 Oct 2024 at 15:10, Catalin Marinas <catalin.marinas@arm.com> wrote:
>
> On Tue, Oct 15, 2024 at 12:09:18AM +0530, Pintu Kumar wrote:
> > There are several errors/warnings reported by checkpatch.
> > Fix all of the positive once as below:
> > - Use #include <linux/processor.h> instead of <asm/processor.h>
> > - Missing a blank lines after declarations
> > - Prefer 'unsigned int' to bare use of 'unsigned'
> > - else should follow close brace '}'
>
> I wouldn't bother fixing up the style in existing code, it just makes
> backporting fixes harder.
>
Thank you so much for your review.
Yes, I agree but I see that this keeps growing.
In 5.15 kernel there were 10 warnings:
total: 0 errors, 10 warnings, 2010 lines checked
But now in the 6.12 kernel it becomes 20.
total: 1 errors, 20 warnings, 2253 lines checked
This means new warnings were introduced while the old ones still remain.
Thus I thought it's better to reduce it.
> > @@ -2179,8 +2180,7 @@ static int __init kmemleak_boot_config(char *str)
> > else if (strcmp(str, "on") == 0) {
> > kmemleak_skip_disable = 1;
> > stack_depot_request_early_init();
> > - }
> > - else
> > + } else
> > return -EINVAL;
> > return 0;
>
> According to the coding style doc, the 'else' branch also needs braces
> here.
Oh yes, thanks for pointing this out.
Unfortunately checkpatch does not report this.
But I tried adding braces and no issues either.
I will push the new patchset with this change.
Thanks,
Pintu
prev parent reply other threads:[~2024-10-17 17:23 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 18:39 Pintu Kumar
2024-10-17 9:40 ` Catalin Marinas
2024-10-17 17:23 ` Pintu Agarwal [this message]
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=CAOuPNLhvD9ya45RdSjoBA6bVkp2UpMqO_QvVOOeafd3ZUtHdTQ@mail.gmail.com \
--to=pintu.ping@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=catalin.marinas@arm.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=quic_pintu@quicinc.com \
--cc=skhan@linuxfoundation.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