All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chen Gang <gang.chen@asianux.com>
To: Joe Perches <joe@perches.com>
Cc: Chen Gang F T <chen.gang.flying.transformer@gmail.com>,
	"'Jiri Kosina'" <trivial@kernel.org>,
	jaharkes@cs.cmu.edu, coda@cs.cmu.edu,
	codalist@TELEMANN.coda.cs.cmu.edu,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH trivial] include/linux/coda.h: remove useless '#else'
Date: Mon, 05 Aug 2013 09:53:34 +0800	[thread overview]
Message-ID: <51FF059E.2030101@asianux.com> (raw)
In-Reply-To: <1375665700.3133.19.camel@joe-AO722>

On 08/05/2013 09:21 AM, Joe Perches wrote:
> On Mon, 2013-08-05 at 08:24 +0800, Chen Gang wrote:
>> On 07/31/2013 11:16 AM, Chen Gang F T wrote:
>>> On 07/31/2013 09:53 AM, Chen Gang wrote:
>>>> On 07/31/2013 09:44 AM, Chen Gang wrote:
>>>>> On 07/30/2013 08:29 PM, Joe Perches wrote:
>>>>>> On Tue, 2013-07-30 at 15:30 +0800, Chen Gang wrote:
>>>>>>> '#else' is useless, need remove.
>>>>>>>
>>>>>>> Signed-off-by: Chen Gang <gang.chen@asianux.com>
>>>>>>> ---
>>>>>>>  include/linux/coda.h |    1 -
>>>>>>>  1 files changed, 0 insertions(+), 1 deletions(-)
>>>>>>>
>>>>>>> diff --git a/include/linux/coda.h b/include/linux/coda.h
>>>>>>> index cff544f..d30209b 100644
>>>>>>> --- a/include/linux/cod
>>>>>>> +++ b/include/linux/coda.h
>>>>>>> @@ -60,7 +60,6 @@ Mellon the rights to redistribute these changes without encumbrance.
>>>>>>>  
>>>>>>>  #if defined(__linux__)
>>>>>>>  typedef unsigned long long u_quad_t;
>>>>>>> -#else
>>>>>>>  #endif
>>>>>>>  #include <uapi/linux/coda.h>
>>>>>>>  #endif 
>>>>>>
>>>>>> Why have the #if at all?
>>>>>>
>>
>> Hmm... if any members have some questions about the fix, commonly it
>> means the related fix need additional improvement.
>>
>> Is it better to use BUILD_BUG() for the fix ?
> 
> Probably not.  __linux__ is predefined by gcc.
> 
> Using an #ifdef __linux__ might make some sense in
> in include/uapi, but not in include/linux.
> 
> 

Hmm... since "linux/coda.h" will include "uapi/linux/coda.h", it is
necessary to check __linux__ whether defined.

For some old compilers which is still widely used, they really do not
define __linux__, when use these compilers, we need give a necessary
check, if can not pass, need report BUILD_BUG().

e.g. for some versions of openrisc, please ref:
https://lkml.org/lkml/2013/7/30/888. (it is in applying work flow).


Thanks.
-- 
Chen Gang

  reply	other threads:[~2013-08-05  1:54 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-30  7:30 [PATCH trivial] include/linux/coda.h: remove useless '#else' Chen Gang
2013-07-30 10:38 ` Jiri Kosina
2013-07-31  0:06   ` Chen Gang
2013-07-30 12:29 ` Joe Perches
2013-07-31  1:44   ` Chen Gang
2013-07-31  1:53     ` Chen Gang
2013-07-31  3:16       ` Chen Gang F T
2013-08-05  0:24         ` Chen Gang
2013-08-05  1:21           ` Joe Perches
2013-08-05  1:53             ` Chen Gang [this message]
2013-08-05  2:12               ` Chen Gang
2013-08-05  9:00                 ` Chen Gang

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=51FF059E.2030101@asianux.com \
    --to=gang.chen@asianux.com \
    --cc=chen.gang.flying.transformer@gmail.com \
    --cc=coda@cs.cmu.edu \
    --cc=codalist@TELEMANN.coda.cs.cmu.edu \
    --cc=jaharkes@cs.cmu.edu \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=trivial@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.