From: Thorsten Glaser <tg@mirbsd.de>
To: Sam Ravnborg <public-sam-uyr5N9Q2VtJg9hUCZPvPmw@plane.gmane.org>
Cc: Jonathan Nieder
<public-jrnieder-Re5JQEeQqe8AvxtiuMwx3w@plane.gmane.org>,
Guillem Jover
<public-guillem-+FW4gsLVM0RAfugRpC6u6w@plane.gmane.org>,
public-linux-kernel-u79uwXL29TY76Z2rM5mHXA@plane.gmane.org,
public-linux-kbuild-u79uwXL29TY76Z2rM5mHXA@plane.gmane.org,
public-linux-api-u79uwXL29TY76Z2rM5mHXA@plane.gmane.org,
Michal Marek <public-mmarek-AlSwsSmVLrQ@plane.gmane.org>,
Justin Cormack <justin@specialbusservice.com>
Subject: Re: [PATCH] Use __unused0 instead of __unused for user visible struct member names
Date: Mon, 11 Nov 2013 14:59:12 +0000 (UTC) [thread overview]
Message-ID: <Pine.BSM.4.64L.1311111448490.23723@herc.mirbsd.org> (raw)
In-Reply-To: <20120103065659.GA32216@merkur.ravnborg.org>
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.
prev parent reply other threads:[~2013-11-11 15:11 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-02 2:44 Guillem Jover
2012-01-02 20:22 ` Jonathan Nieder
2012-01-03 6:56 ` Sam Ravnborg
2012-01-04 8:14 ` Guillem Jover
2012-01-04 11:03 ` Michal Marek
2012-01-04 13:35 ` Sam Ravnborg
2013-11-11 14:59 ` Thorsten Glaser [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Pine.BSM.4.64L.1311111448490.23723@herc.mirbsd.org \
--to=tg@mirbsd.de \
--cc=justin@specialbusservice.com \
--cc=public-guillem-+FW4gsLVM0RAfugRpC6u6w@plane.gmane.org \
--cc=public-jrnieder-Re5JQEeQqe8AvxtiuMwx3w@plane.gmane.org \
--cc=public-linux-api-u79uwXL29TY76Z2rM5mHXA@plane.gmane.org \
--cc=public-linux-kbuild-u79uwXL29TY76Z2rM5mHXA@plane.gmane.org \
--cc=public-linux-kernel-u79uwXL29TY76Z2rM5mHXA@plane.gmane.org \
--cc=public-mmarek-AlSwsSmVLrQ@plane.gmane.org \
--cc=public-sam-uyr5N9Q2VtJg9hUCZPvPmw@plane.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®