netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: David Miller <davem@davemloft.net>
To: geunsik.lim@gmail.com
Cc: isdn@linux-pingi.de, lucas.demarchi@profusion.mobi,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] Keep kernel coding style rule of hfs-s+/sp source
Date: Wed, 01 Feb 2012 02:48:43 -0500 (EST)	[thread overview]
Message-ID: <20120201.024843.318636456202840126.davem@davemloft.net> (raw)
In-Reply-To: <CAGFP0LKU0uDPQzhCy8qmThXQ9f9ofSnQrbr2dO83i+usc85_FQ@mail.gmail.com>

From: Geunsik Lim <geunsik.lim@gmail.com>
Date: Wed, 1 Feb 2012 16:45:09 +0900

> On Wed, Feb 1, 2012 at 4:06 PM, David Miller <davem@davemloft.net> wrote:
> 
>> From: Geunsik Lim <geunsik.lim@gmail.com>
>> Date: Wed,  1 Feb 2012 15:59:53 +0900
>>
>> > Modified for kernel coding style rule of hfs-s+/sp device driver .
>> > . reference: ./Documentation/CodingStyle
>> >
>> > ex)
>> > 60 Don't put multiple statements on a single line unless you have
>> > 61 something to hide:
>> > 62
>> > 63         if (condition) do_this;
>> > 64           do_something_everytime;
>> >
>> > Signed-off-by: Geunsik Lim <geunsik.lim@samsung.com>
>>
>> This was probably there to eliminate compiler warnings or avoid the
>>
> Thank you for your opinion.
> It's strange. I did not meet compiler warnings you replied.
> What is the version of GCC that You tried to compile Linux kernel source
> in your experience?

I'm saying the code was likely written this way "because" of that
reason, I didn't say I saw such a warning.  Where did I say I saw
the warning in question?

I stated a very likely reason why the original code was written the
way that it was.

>> code being eliminated completely, because the result of the register
>> read is unused.
>>
> Are you mean that the result of the register read is used if we append
> "if statement" of c language?

I was saying that without some kind of use of the interface's return
value, without some other control such as a volatile asm statement or
a reference to a volatile memory location, the compiler might legally
be able to remove the I/O register read completely.

You need to make sure that the assembler code does not change due to
your changes, and in particular these I/O register read calls do not
get eliminated.

  parent reply	other threads:[~2012-02-01  7:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-01  6:59 [PATCH] Keep kernel coding style rule of hfs-s+/sp source Geunsik Lim
2012-02-01  7:06 ` David Miller
     [not found]   ` <CAGFP0LKU0uDPQzhCy8qmThXQ9f9ofSnQrbr2dO83i+usc85_FQ@mail.gmail.com>
2012-02-01  7:48     ` David Miller [this message]
2012-02-02 19:01       ` Karsten Keil
2012-02-02 19:11         ` Joe Perches

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=20120201.024843.318636456202840126.davem@davemloft.net \
    --to=davem@davemloft.net \
    --cc=geunsik.lim@gmail.com \
    --cc=isdn@linux-pingi.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lucas.demarchi@profusion.mobi \
    --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).