* nolibc and __attribute__((__unused__))
@ 2021-07-21 20:33 Paul E. McKenney
2021-07-21 20:39 ` Willy Tarreau
0 siblings, 1 reply; 3+ messages in thread
From: Paul E. McKenney @ 2021-07-21 20:33 UTC (permalink / raw)
To: broonie; +Cc: w, linux-kernel
Hello!
My guess is that I should ignore the following checkpatch complaint on
the assumption that checkpatch doesn't realize that this is not built
as part of the Linux kernel. But if my guess is incorrect, please let
me know, as it is a trivial change to make.
Thanx, Paul
------------------------------------------------------------------------
-------------------------------------------------
/tmp/rcu/0002-tools-nolibc-Implement-msleep.patch
-------------------------------------------------
WARNING: __always_unused or __maybe_unused is preferred over __attribute__((__unused__))
#24: FILE: tools/include/nolibc/nolibc.h:2246:
+static __attribute__((unused))
total: 0 errors, 1 warnings, 19 lines checked
NOTE: For some of the reported defects, checkpatch may be able to
mechanically convert to the typical style using --fix or --fix-inplace.
/tmp/rcu/0002-tools-nolibc-Implement-msleep.patch has style problems, please review.
NOTE: If any of the errors are false positives, please report
them to the maintainer, see CHECKPATCH in MAINTAINERS.
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: nolibc and __attribute__((__unused__))
2021-07-21 20:33 nolibc and __attribute__((__unused__)) Paul E. McKenney
@ 2021-07-21 20:39 ` Willy Tarreau
2021-07-21 20:53 ` Paul E. McKenney
0 siblings, 1 reply; 3+ messages in thread
From: Willy Tarreau @ 2021-07-21 20:39 UTC (permalink / raw)
To: Paul E. McKenney; +Cc: broonie, linux-kernel
Hi Paul!
On Wed, Jul 21, 2021 at 01:33:49PM -0700, Paul E. McKenney wrote:
> Hello!
>
> My guess is that I should ignore the following checkpatch complaint on
> the assumption that checkpatch doesn't realize that this is not built
> as part of the Linux kernel. But if my guess is incorrect, please let
> me know, as it is a trivial change to make.
(...)
> WARNING: __always_unused or __maybe_unused is preferred over __attribute__((__unused__))
> #24: FILE: tools/include/nolibc/nolibc.h:2246:
> +static __attribute__((unused))
Yes you're totally right, we try to keep both trees in sync by minimizing
the differences between the two, so as long as that doesn't become a
problem I prefer to keep the warning than having to manually apply
future patches due to context differences.
Thanks!
Willy
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: nolibc and __attribute__((__unused__))
2021-07-21 20:39 ` Willy Tarreau
@ 2021-07-21 20:53 ` Paul E. McKenney
0 siblings, 0 replies; 3+ messages in thread
From: Paul E. McKenney @ 2021-07-21 20:53 UTC (permalink / raw)
To: Willy Tarreau; +Cc: broonie, linux-kernel
On Wed, Jul 21, 2021 at 10:39:16PM +0200, Willy Tarreau wrote:
> Hi Paul!
>
> On Wed, Jul 21, 2021 at 01:33:49PM -0700, Paul E. McKenney wrote:
> > Hello!
> >
> > My guess is that I should ignore the following checkpatch complaint on
> > the assumption that checkpatch doesn't realize that this is not built
> > as part of the Linux kernel. But if my guess is incorrect, please let
> > me know, as it is a trivial change to make.
> (...)
> > WARNING: __always_unused or __maybe_unused is preferred over __attribute__((__unused__))
> > #24: FILE: tools/include/nolibc/nolibc.h:2246:
> > +static __attribute__((unused))
>
> Yes you're totally right, we try to keep both trees in sync by minimizing
> the differences between the two, so as long as that doesn't become a
> problem I prefer to keep the warning than having to manually apply
> future patches due to context differences.
Very well, and I will continue to ignore this sort of warning from
checkpatch for nolibc files.
Thanx, Paul
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-07-21 20:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-07-21 20:33 nolibc and __attribute__((__unused__)) Paul E. McKenney
2021-07-21 20:39 ` Willy Tarreau
2021-07-21 20:53 ` Paul E. McKenney
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 NNTP newsgroup(s).