Re: New sparse warning in net/mac80211/debugfs_sta.c

Johannes Berg
2008-02-25T17:29:12Z

[-- Attachment #1: Type: text/plain, Size: 704 bytes --]

> > Maybe we should just add a new printf modifier like %M for MAC
> > addresses? Then we could use sprintf, snprintf, printk and whatever we
> > please without any of the macro stuff...
>
> Could gcc validate the printf %M arguments?

No, but it won't barf on it either, it silently ignores unknown stuff.

> Another possibility without changing printf argument validation
> is to use a MAC_FMT macro in place of "%s"
>
> #ifdef CONFIG_INLINE_MAC

Yes, but the argument was that in some debugging cases these things are
in the fast path even when debugging is turned off, so to not have them
there would force you to always turn this config ON which defeats the
point.

johannes

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 828 bytes --]