* [PATCH] Handle ignored attribute malloc
@ 2007-10-25 21:12 Emil Medve
2007-10-26 3:16 ` Christopher Li
2007-11-13 12:13 ` Josh Triplett
0 siblings, 2 replies; 4+ messages in thread
From: Emil Medve @ 2007-10-25 21:12 UTC (permalink / raw)
To: josh, linux-sparse; +Cc: Emil Medve
This avoids error messages like this:
error: attribute 'malloc': unknown attribute
Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
---
Please copy me in replies as I'm not subscribed to the list
ident-list.h | 1 +
parse.c | 1 +
2 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/ident-list.h b/ident-list.h
index b183eac..8fcd7de 100644
--- a/ident-list.h
+++ b/ident-list.h
@@ -69,6 +69,7 @@ IDENT(model); IDENT(__model__);
IDENT(format_arg); IDENT(__format_arg__);
IDENT(nothrow); IDENT(__nothrow); IDENT(__nothrow__);
IDENT(__transparent_union__);
+IDENT(malloc);
IDENT(__malloc__);
IDENT(nonnull); IDENT(__nonnull); IDENT(__nonnull__);
IDENT(constructor); IDENT(__constructor__);
diff --git a/parse.c b/parse.c
index 47b5204..a41939d 100644
--- a/parse.c
+++ b/parse.c
@@ -283,6 +283,7 @@ static struct init_keyword {
{ "nothrow", NS_KEYWORD, .op = &ignore_attr_op },
{ "__nothrow", NS_KEYWORD, .op = &ignore_attr_op },
{ "__nothrow__", NS_KEYWORD, .op = &ignore_attr_op },
+ { "malloc", NS_KEYWORD, .op = &ignore_attr_op },
{ "__malloc__", NS_KEYWORD, .op = &ignore_attr_op },
{ "nonnull", NS_KEYWORD, .op = &ignore_attr_op },
{ "__nonnull", NS_KEYWORD, .op = &ignore_attr_op },
--
1.5.3.GIT
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] Handle ignored attribute malloc
2007-10-25 21:12 [PATCH] Handle ignored attribute malloc Emil Medve
@ 2007-10-26 3:16 ` Christopher Li
2007-10-26 20:11 ` Medve Emilian-EMMEDVE1
2007-11-13 12:13 ` Josh Triplett
1 sibling, 1 reply; 4+ messages in thread
From: Christopher Li @ 2007-10-26 3:16 UTC (permalink / raw)
To: Emil Medve; +Cc: josh, linux-sparse
Which kernel source code triggers this?
If nobody is using malloc_ident directly. You don't need to add it
to ident-list.h.
Having a test case in validations directory will be nice too.
Chris
On 10/25/07, Emil Medve <Emilian.Medve@freescale.com> wrote:
> This avoids error messages like this:
>
> error: attribute 'malloc': unknown attribute
>
> Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
> ---
>
> Please copy me in replies as I'm not subscribed to the list
>
> ident-list.h | 1 +
> parse.c | 1 +
> 2 files changed, 2 insertions(+), 0 deletions(-)
>
> diff --git a/ident-list.h b/ident-list.h
> index b183eac..8fcd7de 100644
> --- a/ident-list.h
> +++ b/ident-list.h
> @@ -69,6 +69,7 @@ IDENT(model); IDENT(__model__);
> IDENT(format_arg); IDENT(__format_arg__);
> IDENT(nothrow); IDENT(__nothrow); IDENT(__nothrow__);
> IDENT(__transparent_union__);
> +IDENT(malloc);
> IDENT(__malloc__);
> IDENT(nonnull); IDENT(__nonnull); IDENT(__nonnull__);
> IDENT(constructor); IDENT(__constructor__);
> diff --git a/parse.c b/parse.c
> index 47b5204..a41939d 100644
> --- a/parse.c
> +++ b/parse.c
> @@ -283,6 +283,7 @@ static struct init_keyword {
> { "nothrow", NS_KEYWORD, .op = &ignore_attr_op },
> { "__nothrow", NS_KEYWORD, .op = &ignore_attr_op },
> { "__nothrow__", NS_KEYWORD, .op = &ignore_attr_op },
> + { "malloc", NS_KEYWORD, .op = &ignore_attr_op },
> { "__malloc__", NS_KEYWORD, .op = &ignore_attr_op },
> { "nonnull", NS_KEYWORD, .op = &ignore_attr_op },
> { "__nonnull", NS_KEYWORD, .op = &ignore_attr_op },
> --
> 1.5.3.GIT
>
> -
> To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] Handle ignored attribute malloc
2007-10-26 3:16 ` Christopher Li
@ 2007-10-26 20:11 ` Medve Emilian-EMMEDVE1
0 siblings, 0 replies; 4+ messages in thread
From: Medve Emilian-EMMEDVE1 @ 2007-10-26 20:11 UTC (permalink / raw)
To: Christopher Li; +Cc: josh, linux-sparse
Hi Chris,
It's not the kernel, but some other code I'm writing. However, I expect
it could be used for kmalloc() and friends.
Nobody is using malloc_ident yet, but I noticed other xxx_ident that are
not used nad are present in ident-list.h so I assumed it would be ok.
I'll try to add a test case.
Cheers,
Emil.
This e-mail, and any associated attachments have been classified as:
--------------------------------------------------------------------
[ ] Public
[x] Freescale Semiconductor Internal Use Only
[ ] Freescale Semiconductor Confidential Proprietary
> -----Original Message-----
> From: christ.li@gmail.com [mailto:christ.li@gmail.com] On
> Behalf Of Christopher Li
> Sent: Thursday, October 25, 2007 10:16 PM
> To: Medve Emilian-EMMEDVE1
> Cc: josh@freedesktop.org; linux-sparse@vger.kernel.org
> Subject: Re: [PATCH] Handle ignored attribute malloc
>
> Which kernel source code triggers this?
>
> If nobody is using malloc_ident directly. You don't need to add it
> to ident-list.h.
>
> Having a test case in validations directory will be nice too.
>
> Chris
>
> On 10/25/07, Emil Medve <Emilian.Medve@freescale.com> wrote:
> > This avoids error messages like this:
> >
> > error: attribute 'malloc': unknown attribute
> >
> > Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
> > ---
> >
> > Please copy me in replies as I'm not subscribed to the list
> >
> > ident-list.h | 1 +
> > parse.c | 1 +
> > 2 files changed, 2 insertions(+), 0 deletions(-)
> >
> > diff --git a/ident-list.h b/ident-list.h
> > index b183eac..8fcd7de 100644
> > --- a/ident-list.h
> > +++ b/ident-list.h
> > @@ -69,6 +69,7 @@ IDENT(model); IDENT(__model__);
> > IDENT(format_arg); IDENT(__format_arg__);
> > IDENT(nothrow); IDENT(__nothrow); IDENT(__nothrow__);
> > IDENT(__transparent_union__);
> > +IDENT(malloc);
> > IDENT(__malloc__);
> > IDENT(nonnull); IDENT(__nonnull); IDENT(__nonnull__);
> > IDENT(constructor); IDENT(__constructor__);
> > diff --git a/parse.c b/parse.c
> > index 47b5204..a41939d 100644
> > --- a/parse.c
> > +++ b/parse.c
> > @@ -283,6 +283,7 @@ static struct init_keyword {
> > { "nothrow", NS_KEYWORD, .op = &ignore_attr_op },
> > { "__nothrow", NS_KEYWORD, .op = &ignore_attr_op },
> > { "__nothrow__", NS_KEYWORD, .op =
> &ignore_attr_op },
> > + { "malloc", NS_KEYWORD, .op = &ignore_attr_op },
> > { "__malloc__", NS_KEYWORD, .op = &ignore_attr_op },
> > { "nonnull", NS_KEYWORD, .op = &ignore_attr_op },
> > { "__nonnull", NS_KEYWORD, .op = &ignore_attr_op },
> > --
> > 1.5.3.GIT
> >
> > -
> > To unsubscribe from this list: send the line "unsubscribe
> linux-sparse" in
> > the body of a message to majordomo@vger.kernel.org
> > More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] Handle ignored attribute malloc
2007-10-25 21:12 [PATCH] Handle ignored attribute malloc Emil Medve
2007-10-26 3:16 ` Christopher Li
@ 2007-11-13 12:13 ` Josh Triplett
1 sibling, 0 replies; 4+ messages in thread
From: Josh Triplett @ 2007-11-13 12:13 UTC (permalink / raw)
To: Emil Medve; +Cc: linux-sparse
[-- Attachment #1: Type: text/plain, Size: 338 bytes --]
Emil Medve wrote:
> This avoids error messages like this:
>
> error: attribute 'malloc': unknown attribute
>
> Signed-off-by: Emil Medve <Emilian.Medve@Freescale.com>
Patch applied; thanks!
I decided to ignore the issue of the extra ident, for now;
the rest of the idents need a cleanup pass anyway.
- Josh Triplett
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 252 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2007-11-13 12:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-10-25 21:12 [PATCH] Handle ignored attribute malloc Emil Medve
2007-10-26 3:16 ` Christopher Li
2007-10-26 20:11 ` Medve Emilian-EMMEDVE1
2007-11-13 12:13 ` Josh Triplett
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).