Re: Warnings on global symbols accessed only from assembly code

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

 



On Thu, Feb 11, 2010 at 10:43:51PM -0800, Christopher Li wrote:
> On Thu, Feb 11, 2010 at 5:47 PM, Ahmed S. Darwish <darwish.07@xxxxxxxxx> wrote:
> >
> > The case I faced was kernel's main entrance C method which should only be
> > jumped to from bootstrap asm code. I think a declaration in such case will
> > only give bogus function usage impressions.
> 
> How about give it some prototype which clearly indicate the function should
> be only call from boot strap? e.g. BOOT_STRAP_ENTRY(function_name) which
> expand it to a function prototype.
>

mm, yes, I guess this can be a good-enough solution :)

> >
> >> > Unfortunately the current `-Wno-decl' solution is a bit extreme: it
> >> > turns off a very useful sparse feature (by design).
> >>
> >> Right, the problem is that sparse can't tell which functions are used in
> >> asm files and only skip warning on those.
> >>
> >
> > Would proposing an __attribute__ for such case be accepted in concept?
> 
> I don't thing it justify more non-stander attribute, which is
> for-the-sake-of-sparse thing as well.
>

It seems those non-standard attributes have some associated costs
that I'm not aware of; I can see the implicit trade-off then.

> Chris

Thanks for the sincere help.

-- 
Darwish
http://darwish.07.googlepages.com
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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