Re: [PATCH] Use __unused0 instead of __unused for user visible structmember names

From: Thorsten Glaser
Date: Mon Nov 11 2013 - 10:11:19 EST





Sam Ravnborg dixit:

>> Guillem Jover wrote:

>> > On BSD systems __unused has traditionally been defined to mean the
>> > equivalent of gcc's __attribute__((__unused__)), some parts of the
[â]
>^__ is reserved for libc internal stuff and there is no reason to
>name the unused/padding members "__unused".

Considering that glibc has seen the light now too, can we please
do something about these now? The BSD tools (not just NetBSDÂ) have
been using this for far longer after allâ


Currently (git pull --ff torvalds master), we have:

â 2 occurrences of files *inside* the Linux kernel defining __unused
to __attribute__((unused)) themselves

â 68 struct members and function arguments called __unused

>So one or a set of patches that rename them all to something more
>sensible would be fine.

I think __unused0 is okay as it matches current __unused[0-9] in
use by other parts of the Linux kernel â although glibc now uses
__glibc_reserved[0-9], I think this doesnât look like the Linux
kernel should use it ââ


â http://thread.gmane.org/gmane.comp.lib.glibc.alpha/36439

â Iâve recently come to the belief that this should be
__attribute__((__unused__)) in all cases, i.e. all those
attribute namings need double underscores before and after,
as some software likes to #define printf to something else,
lighttpd does #define bounded something else, so thereâs
probably software out there containing #define unused foo.


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/