Re: [PATCH] ignore __cold__ attribute

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Pavel Roskin wrote:
> On Tue, 2008-04-22 at 15:25 +0200, Johannes Berg wrote:
>> *Shrug*. I just wanted the kernel to work again and failed (in about 20
>> minutes of searching) to find a changelog for gcc mentioning this so
>> gave up and just added the one that the kernel uses. Want to amend the
>> patch?
> 
> I think this would be better.  Now sparse would ignore both "cold" and
> "hot", both with and without underscores.  They are also added to
> ident-list.h.
> 
> diff --git a/ident-list.h b/ident-list.h
> index 8fcd7de..6104826 100644
> --- a/ident-list.h
> +++ b/ident-list.h
> @@ -74,6 +74,8 @@ IDENT(__malloc__);
>  IDENT(nonnull); IDENT(__nonnull); IDENT(__nonnull__);
>  IDENT(constructor); IDENT(__constructor__);
>  IDENT(destructor); IDENT(__destructor__);
> +IDENT(cold); IDENT(__cold__);
> +IDENT(hot); IDENT(__hot__);
>  IDENT(cdecl); IDENT(__cdecl__);
>  IDENT(stdcall); IDENT(__stdcall__);
>  IDENT(fastcall); IDENT(__fastcall__);
> diff --git a/parse.c b/parse.c
> index 137ba77..877414c 100644
> --- a/parse.c
> +++ b/parse.c
> @@ -353,6 +353,10 @@ static struct init_keyword {
>  	{ "__constructor__",	NS_KEYWORD,	.op = &ignore_attr_op },
>  	{ "destructor",	NS_KEYWORD,	.op = &ignore_attr_op },
>  	{ "__destructor__",	NS_KEYWORD,	.op = &ignore_attr_op },
> +	{ "cold",	NS_KEYWORD,	.op = &ignore_attr_op },
> +	{ "__cold__",	NS_KEYWORD,	.op = &ignore_attr_op },
> +	{ "hot",	NS_KEYWORD,	.op = &ignore_attr_op },
> +	{ "__hot__",	NS_KEYWORD,	.op = &ignore_attr_op },
>  };

Looks good to me.  Could I get a signoff and commit message please?

- Josh Triplett

Attachment: signature.asc
Description: OpenPGP digital signature


[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux