From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Joe Perches <joe@perches.com>
Cc: Max Kellermann <max.kellermann@ionos.com>,
Guenter Roeck <linux@roeck-us.net>, Jens Axboe <axboe@kernel.dk>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Borislav Petkov <bp@alien8.de>, Tony Luck <tony.luck@intel.com>,
James Morse <james.morse@arm.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Robert Richter <rric@kernel.org>,
Jean Delvare <jdelvare@suse.com>, Jason Gunthorpe <jgg@ziepe.ca>,
Leon Romanovsky <leon@kernel.org>,
Bart Van Assche <bvanassche@acm.org>,
Joerg Roedel <joro@8bytes.org>, Will Deacon <will@kernel.org>,
Robin Murphy <robin.murphy@arm.com>,
Dan Williams <dan.j.williams@intel.com>,
Vishal Verma <vishal.l.verma@intel.com>,
Dave Jiang <dave.jiang@intel.com>,
Ira Weiny <ira.weiny@intel.com>, Keith Busch <kbusch@kernel.org>,
Christoph Hellwig <hch@lst.de>, Sagi Grimberg <sagi@grimberg.me>,
Alessandro Zummo <a.zummo@towertech.it>,
Alexandre Belloni <alexandre.belloni@bootlin.com>,
Jiri Slaby <jirislaby@kernel.org>,
Suzuki K Poulose <suzuki.poulose@arm.com>,
Mike Leach <mike.leach@linaro.org>,
James Clark <james.clark@arm.com>, Leo Yan <leo.yan@linaro.org>,
Thomas Gleixner <tglx@linutronix.de>,
Peter Zijlstra <peterz@infradead.org>,
Pavel Machek <pavel@ucw.cz>, Lee Jones <lee@kernel.org>,
Arnd Bergmann <arnd@arndb.de>,
Bjorn Helgaas <bhelgaas@google.com>,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>,
Mark Rutland <mark.rutland@arm.com>,
Alexander Shishkin <alexander.shishkin@linux.intel.com>,
Jiri Olsa <jolsa@kernel.org>, Namhyung Kim <namhyung@kernel.org>,
Ian Rogers <irogers@google.com>,
Adrian Hunter <adrian.hunter@intel.com>,
Sebastian Reichel <sre@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
Wim Van Sebroeck <wim@linux-watchdog.org>,
"James E.J. Bottomley" <jejb@linux.ibm.com>,
"Martin K. Petersen" <martin.petersen@oracle.com>,
linux-block@vger.kernel.org, linux-kernel@vger.kernel.org,
linux-edac@vger.kernel.org, linux-hwmon@vger.kernel.org,
linux-rdma@vger.kernel.org, iommu@lists.linux.dev,
nvdimm@lists.linux.dev, linux-nvme@lists.infradead.org,
linux-rtc@vger.kernel.org, linux-serial@vger.kernel.org,
coresight@lists.linaro.org, linux-arm-kernel@lists.infradead.org,
linux-leds@vger.kernel.org, linux-pci@vger.kernel.org,
linux-perf-users@vger.kernel.org, linux-pm@vger.kernel.org,
linux-usb@vger.kernel.org, linux-watchdog@vger.kernel.org,
linux-scsi@vger.kernel.org
Subject: Re: [PATCH 6/7] fs/sysfs/group: make attribute_group pointers const
Date: Tue, 10 Oct 2023 08:57:55 +0200 [thread overview]
Message-ID: <2023101041-giggle-refried-5b8c@gregkh> (raw)
In-Reply-To: <f511170fe61d7e7214a3a062661cf4103980dad6.camel@perches.com>
On Mon, Oct 09, 2023 at 11:48:10PM -0700, Joe Perches wrote:
> On Mon, 2023-10-09 at 22:05 +0200, Max Kellermann wrote:
> > On Mon, Oct 9, 2023 at 7:24 PM Guenter Roeck <linux@roeck-us.net> wrote:
> > > Also, I don't know why checkpatch is happy with all the
> > >
> > > const struct attribute_group *const*groups;
> > >
> > > instead of
> > >
> > > const struct attribute_group *const *groups;
> >
> > I found out that checkpatch has no check for this at all; it does
> > complain about such lines, but only for local variables. But that
> > warning is actually a bug, because this is a check for unary
> > operators: it thinks the asterisk is a dereference operator, not a
> > pointer declaration, and complains that the unary operator must be
> > preceded by a space. Thus warnings on local variable are only correct
> > by coincidence, not by design.
> >
> > Inside structs or parameters (where my coding style violations can be
> > found), it's a different context and thus checkpatch doesn't apply the
> > rules for unary operators.
>
> My opinion is that const use in the kernel should almost
> always have whitespace before and after it except when
> preceded by a open parenthesis or a newline.
I totally agree.
next prev parent reply other threads:[~2023-10-10 6:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20231009165741.746184-1-max.kellermann@ionos.com>
2023-10-09 16:57 ` [PATCH 6/7] fs/sysfs/group: make attribute_group pointers const Max Kellermann
2023-10-09 17:24 ` Guenter Roeck
2023-10-09 20:05 ` Max Kellermann
2023-10-10 5:59 ` Greg Kroah-Hartman
2023-10-10 6:48 ` Joe Perches
2023-10-10 6:57 ` Greg Kroah-Hartman [this message]
2023-10-09 17:25 ` Greg Kroah-Hartman
2023-10-09 17:30 ` Max Kellermann
2023-10-09 17:31 ` Greg Kroah-Hartman
2023-10-09 20:20 ` Max Kellermann
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=2023101041-giggle-refried-5b8c@gregkh \
--to=gregkh@linuxfoundation.org \
--cc=a.zummo@towertech.it \
--cc=acme@kernel.org \
--cc=adrian.hunter@intel.com \
--cc=alexander.shishkin@linux.intel.com \
--cc=alexandre.belloni@bootlin.com \
--cc=arnd@arndb.de \
--cc=axboe@kernel.dk \
--cc=bhelgaas@google.com \
--cc=bp@alien8.de \
--cc=bvanassche@acm.org \
--cc=coresight@lists.linaro.org \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=hch@lst.de \
--cc=iommu@lists.linux.dev \
--cc=ira.weiny@intel.com \
--cc=irogers@google.com \
--cc=james.clark@arm.com \
--cc=james.morse@arm.com \
--cc=jdelvare@suse.com \
--cc=jejb@linux.ibm.com \
--cc=jgg@ziepe.ca \
--cc=jirislaby@kernel.org \
--cc=joe@perches.com \
--cc=jolsa@kernel.org \
--cc=joro@8bytes.org \
--cc=kbusch@kernel.org \
--cc=krzysztof.kozlowski@linaro.org \
--cc=lee@kernel.org \
--cc=leo.yan@linaro.org \
--cc=leon@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-block@vger.kernel.org \
--cc=linux-edac@vger.kernel.org \
--cc=linux-hwmon@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=linux-nvme@lists.infradead.org \
--cc=linux-pci@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-serial@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=linux-watchdog@vger.kernel.org \
--cc=linux@roeck-us.net \
--cc=mark.rutland@arm.com \
--cc=martin.petersen@oracle.com \
--cc=max.kellermann@ionos.com \
--cc=mchehab@kernel.org \
--cc=mike.leach@linaro.org \
--cc=mingo@redhat.com \
--cc=namhyung@kernel.org \
--cc=nvdimm@lists.linux.dev \
--cc=pavel@ucw.cz \
--cc=peterz@infradead.org \
--cc=rafael@kernel.org \
--cc=robin.murphy@arm.com \
--cc=rric@kernel.org \
--cc=sagi@grimberg.me \
--cc=sre@kernel.org \
--cc=suzuki.poulose@arm.com \
--cc=tglx@linutronix.de \
--cc=tony.luck@intel.com \
--cc=vishal.l.verma@intel.com \
--cc=will@kernel.org \
--cc=wim@linux-watchdog.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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).