From: David Miller <davem@davemloft.net>
To: eric.dumazet@gmail.com
Cc: netdev@vger.kernel.org
Subject: Re: [PATCH] net: net_device flags is an unsigned int
Date: Thu, 01 Dec 2011 00:05:28 -0500 (EST) [thread overview]
Message-ID: <20111201.000528.1901790543147589391.davem@davemloft.net> (raw)
In-Reply-To: <1322714894.2577.19.camel@edumazet-laptop>
From: Eric Dumazet <eric.dumazet@gmail.com>
Date: Thu, 01 Dec 2011 05:48:14 +0100
> Le mercredi 30 novembre 2011 à 23:39 -0500, David Miller a écrit :
>> From: Eric Dumazet <eric.dumazet@gmail.com>
>> Date: Thu, 01 Dec 2011 05:34:37 +0100
>>
>> > - unsigned short old_flags = dev->flags;
>> > + typeof(dev->flags) old_flags = dev->flags;
>>
>> Please, create netdev_flags_t or similar, anything but this :-)
>
> Hmm, I thought Linus hated types like this...
Yes, it is true. But look at netdev_features_t
> Or how explain we dont have jiffies_t or similar ? ;)
:-)
Like you I just want something that automatically tracks any future
changes to the type. However I want something that doesn't look so
ugly like that typeof() thing.
Sure, use typeof() in macros, you can hide it in such places.
But please not in plain sight in *.c files.
prev parent reply other threads:[~2011-12-01 5:05 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-01 4:34 [PATCH] net: net_device flags is an unsigned int Eric Dumazet
2011-12-01 4:39 ` David Miller
2011-12-01 4:48 ` Eric Dumazet
2011-12-01 5:05 ` David Miller [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=20111201.000528.1901790543147589391.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).