> +our $PositionalAttribute = qr{
> + __must_check|
> + __printf|
I suggest to put all key words which share the leading underscores
into another alternation for an improved regular expression.
Regards,
Markus
From: David Sterba
> Sent: 10 October 2019 15:28
...
> > Can we pick a style and enforce it via checkpatch? (It's probably not
> > fun to check for each function attribute in
> > include/linux/compiler_attributes.h).
>
> Anything that has the return type, attributes and function name on one
> line
On Thu, 2019-10-10 at 16:27 +0200, David Sterba wrote:
> On Wed, Oct 09, 2019 at 10:33:45AM -0700, Nick Desaulniers wrote:
> > On Wed, Oct 9, 2019 at 9:38 AM Joe Perches wrote:
> > > I believe __must_check is best placed before the return type as
> > > that makes grep for function return type easi
On Wed, Oct 09, 2019 at 10:33:45AM -0700, Nick Desaulniers wrote:
> On Wed, Oct 9, 2019 at 9:38 AM Joe Perches wrote:
> >
> > On Wed, 2019-10-09 at 09:13 -0700, Nick Desaulniers wrote:
> > > On Wed, Oct 9, 2019 at 8:09 AM Steven Rostedt wrote:
> > > > On Wed, 9 Oct 2019 14:14:28 +0200 Markus Elfr
>> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/lib/test_kasan.c?id=b92a953cb7f727c42a15ac2ea59bf3cf9c39370d#n595
>
> The *test* word must have given you a clue that the code you a looking
> at is not an ordinary one.
The proposed extension of function annotations can be
On 09/10/2019 18.31, Nick Desaulniers wrote:
> On Wed, Oct 9, 2019 at 7:30 AM Dan Carpenter wrote:
>>
>> On Wed, Oct 09, 2019 at 04:21:20PM +0200, Rasmus Villemoes wrote:
>>> On 09/10/2019 15.56, Dan Carpenter wrote:
That's because glibc strlen is annotated with __attribute_pure__ which
On Wed, Oct 9, 2019 at 11:11 PM Markus Elfring wrote:
>
> > I'm curious. How many warnings showed up when you applied this patch?
>
> I suggest to take another look at six places in a specific source file
> (for example).
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/li
> I'm curious. How many warnings showed up when you applied this patch?
I suggest to take another look at six places in a specific source file
(for example).
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/lib/test_kasan.c?id=b92a953cb7f727c42a15ac2ea59bf3cf9c39370d#n595
ht
On Wed, Oct 09, 2019 at 09:31:41AM -0700, Nick Desaulniers wrote:
> On Wed, Oct 9, 2019 at 7:30 AM Dan Carpenter wrote:
> >
> > On Wed, Oct 09, 2019 at 04:21:20PM +0200, Rasmus Villemoes wrote:
> > > On 09/10/2019 15.56, Dan Carpenter wrote:
> > > > That's because glibc strlen is annotated with __
On Wed, Oct 9, 2019 at 10:04 AM Markus Elfring wrote:
>
> > Ah, granted, I was surprised, too.
>
> Thanks for this view.
I mean, it's a good thing that we don't have any issues that this
patch would catch today. Seems Steven and I were surprised
(pessimistic?).
>
>
> > Maybe would be helpful to
On Wed, Oct 9, 2019 at 9:38 AM Joe Perches wrote:
>
> On Wed, 2019-10-09 at 09:13 -0700, Nick Desaulniers wrote:
> > On Wed, Oct 9, 2019 at 8:09 AM Steven Rostedt wrote:
> > > On Wed, 9 Oct 2019 14:14:28 +0200 Markus Elfring
> > > wrote:
> []
> > > > Several functions return values with which u
> Ah, granted, I was surprised, too.
Thanks for this view.
> Maybe would be helpful to mention that in the commit message.
My Linux software build resources might be too limited to take
more system configuration variations safely into account
for this issue.
Would you like to achieve further ch
> You're also not consistent - strlen() is not annotated.
Would you like to integrate any additional function annotations?
> And, for the standard C functions, -Wall already seems to warn about
> an unused call:
This detail is nice, isn't it?
> a.c:5:2: warning: statement with no effect [-Wun
On Wed, Oct 9, 2019 at 9:27 AM Steven Rostedt wrote:
>
> On Wed, 9 Oct 2019 09:13:17 -0700
> Nick Desaulniers wrote:
>
> > On Wed, Oct 9, 2019 at 8:09 AM Steven Rostedt wrote:
> > >
> > > I'm curious. How many warnings showed up when you applied this patch?
> >
> > I got zero for x86_64 and arm6
On Wed, 2019-10-09 at 09:13 -0700, Nick Desaulniers wrote:
> On Wed, Oct 9, 2019 at 8:09 AM Steven Rostedt wrote:
> > On Wed, 9 Oct 2019 14:14:28 +0200 Markus Elfring
> > wrote:
[]
> > > Several functions return values with which useful data processing
> > > should be performed. These values mus
On Wed, Oct 9, 2019 at 6:26 AM Rasmus Villemoes
wrote:
>
> On 09/10/2019 14.14, Markus Elfring wrote:
> > From: Markus Elfring
> > Date: Wed, 9 Oct 2019 13:53:59 +0200
> >
> > Several functions return values with which useful data processing
> > should be performed. These values must not be ignor
On Wed, Oct 9, 2019 at 7:30 AM Dan Carpenter wrote:
>
> On Wed, Oct 09, 2019 at 04:21:20PM +0200, Rasmus Villemoes wrote:
> > On 09/10/2019 15.56, Dan Carpenter wrote:
> > > That's because glibc strlen is annotated with __attribute_pure__ which
> > > means it has no side effects.
> >
> > I know, e
On Wed, 9 Oct 2019 09:13:17 -0700
Nick Desaulniers wrote:
> On Wed, Oct 9, 2019 at 8:09 AM Steven Rostedt wrote:
> >
> > On Wed, 9 Oct 2019 14:14:28 +0200
> > Markus Elfring wrote:
> >
> > > From: Markus Elfring
> > > Date: Wed, 9 Oct 2019 13:53:59 +0200
> > >
> > > Several functions return
On Wed, Oct 9, 2019 at 8:09 AM Steven Rostedt wrote:
>
> On Wed, 9 Oct 2019 14:14:28 +0200
> Markus Elfring wrote:
>
> > From: Markus Elfring
> > Date: Wed, 9 Oct 2019 13:53:59 +0200
> >
> > Several functions return values with which useful data processing
> > should be performed. These values m
On Wed, 9 Oct 2019 14:14:28 +0200
Markus Elfring wrote:
> From: Markus Elfring
> Date: Wed, 9 Oct 2019 13:53:59 +0200
>
> Several functions return values with which useful data processing
> should be performed. These values must not be ignored then.
> Thus use the annotation “__must_check” in t
On Wed, Oct 09, 2019 at 04:21:20PM +0200, Rasmus Villemoes wrote:
> On 09/10/2019 15.56, Dan Carpenter wrote:
> > That's because glibc strlen is annotated with __attribute_pure__ which
> > means it has no side effects.
>
> I know, except it has nothing to do with glibc headers. Just try the
> same
On 09/10/2019 15.56, Dan Carpenter wrote:
> [ I haven't reviewed the original patch ]
>
> On Wed, Oct 09, 2019 at 03:26:18PM +0200, Rasmus Villemoes wrote:
>> On 09/10/2019 14.14, Markus Elfring wrote:
>>> From: Markus Elfring
>>> Date: Wed, 9 Oct 2019 13:53:59 +0200
>>>
>>> Several functions ret
[ I haven't reviewed the original patch ]
On Wed, Oct 09, 2019 at 03:26:18PM +0200, Rasmus Villemoes wrote:
> On 09/10/2019 14.14, Markus Elfring wrote:
> > From: Markus Elfring
> > Date: Wed, 9 Oct 2019 13:53:59 +0200
> >
> > Several functions return values with which useful data processing
> >
On 09/10/2019 14.14, Markus Elfring wrote:
> From: Markus Elfring
> Date: Wed, 9 Oct 2019 13:53:59 +0200
>
> Several functions return values with which useful data processing
> should be performed. These values must not be ignored then.
> Thus use the annotation “__must_check” in the shown functi
From: Markus Elfring
Date: Wed, 9 Oct 2019 13:53:59 +0200
Several functions return values with which useful data processing
should be performed. These values must not be ignored then.
Thus use the annotation “__must_check” in the shown function declarations.
Add also corresponding parameter name
25 matches
Mail list logo