From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Bart Van Assche <bart.vanassche@sandisk.com>,
Douglas Gilbert <dgilbert@interlog.com>,
linux-scsi@vger.kernel.org
Cc: martin.petersen@oracle.com, tomas.winkler@intel.com, emilne@redhat.com
Subject: Re: [PATCH 01/12] scsi_debug: cleanup naming and bit crunching
Date: Tue, 26 Apr 2016 11:27:35 -0700 [thread overview]
Message-ID: <1461695255.2348.21.camel@HansenPartnership.com> (raw)
In-Reply-To: <571FAFD2.3030902@sandisk.com>
On Tue, 2016-04-26 at 11:13 -0700, Bart Van Assche wrote:
> On 04/25/2016 09:16 AM, Douglas Gilbert wrote:
> > @@ -580,8 +580,8 @@ static int sdebug_sectors_per; /
> > * sectors per cylinder */
> >
> > static unsigned int scsi_debug_lbp(void)
> > {
> > - return ((0 == scsi_debug_fake_rw) &&
> > - (scsi_debug_lbpu | scsi_debug_lbpws |
> > scsi_debug_lbpws10));
> > + return ((0 == sdebug_fake_rw) &&
> > + (sdebug_lbpu | sdebug_lbpws | sdebug_lbpws10));
> > }
>
> Since you are changing this code, please remove the superfluous
> parentheses, place the constant at the right side of the comparison
> and change "|" into "||" since the intention of the above code is to
> perform a logical or and this code is not in a performance-critical
> path.
This is getting completely pointless. We're not slaves to checkpatch
and the Maintainer has considerable leeway to decide the style for
their code. I personally don't like the const == rvalue form of compar
ison, but it does pick up an erroneous '=' instead of '==', so I'm not
going to object to a maintainer who wishes to use it.
Plus, if you only alter it in one place, the file becomes a mess of
styles and thus harder to read.
James
next prev parent reply other threads:[~2016-04-26 18:27 UTC|newest]
Thread overview: 41+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-04-25 16:16 [PATCH 00/12] scsi_debug: multiple queue support and cleanup Douglas Gilbert
2016-04-25 16:16 ` [PATCH 01/12] scsi_debug: cleanup naming and bit crunching Douglas Gilbert
2016-04-26 6:14 ` Hannes Reinecke
2016-04-26 18:13 ` Bart Van Assche
2016-04-26 18:27 ` James Bottomley [this message]
2016-04-27 5:25 ` Douglas Gilbert
2016-04-25 16:16 ` [PATCH 02/12] scsi_debug: ignore host lock option Douglas Gilbert
2016-04-26 6:15 ` Hannes Reinecke
2016-04-25 16:16 ` [PATCH 03/12] scsi_debug: replace jiffy timers with hr timers Douglas Gilbert
2016-04-26 6:17 ` Hannes Reinecke
2016-04-26 18:38 ` Bart Van Assche
2016-04-25 16:16 ` [PATCH 04/12] scsi_debug: make jiffy delay name clearer Douglas Gilbert
2016-04-26 6:17 ` Hannes Reinecke
2016-04-25 16:16 ` [PATCH 05/12] scsi_debug: replace tasklet with work queue Douglas Gilbert
2016-04-26 6:20 ` Hannes Reinecke
2016-04-25 16:16 ` [PATCH 06/12] scsi_debug: re-order file scope declarations Douglas Gilbert
2016-04-26 6:21 ` Hannes Reinecke
2016-04-26 20:55 ` Bart Van Assche
2016-04-25 16:16 ` [PATCH 07/12] scsi_debug: use likely hints on fast path Douglas Gilbert
2016-04-26 6:22 ` Hannes Reinecke
2016-04-26 22:14 ` Bart Van Assche
2016-04-27 5:25 ` Douglas Gilbert
2016-04-27 5:33 ` Bart Van Assche
2016-04-27 14:29 ` Bart Van Assche
2016-04-25 16:16 ` [PATCH 08/12] scsi_debug: rework resp_report_luns Douglas Gilbert
2016-04-26 6:26 ` Hannes Reinecke
2016-04-27 4:08 ` Douglas Gilbert
2016-04-27 5:58 ` Hannes Reinecke
2016-04-26 7:33 ` Winkler, Tomas
2016-04-27 23:09 ` Bart Van Assche
2016-04-25 16:16 ` [PATCH 09/12] scsi_debug: add multiple queue support Douglas Gilbert
2016-04-26 6:29 ` Hannes Reinecke
2016-04-26 22:19 ` Bart Van Assche
2016-04-25 16:16 ` [PATCH 10/12] scsi_debug: vpd and mode page work Douglas Gilbert
2016-04-26 6:29 ` Hannes Reinecke
2016-04-25 16:16 ` [PATCH 11/12] scsi_debug: uuid for lu name Douglas Gilbert
2016-04-26 6:30 ` Hannes Reinecke
2016-04-25 16:16 ` [PATCH 12/12] scsi_debug: use locally assigned naa Douglas Gilbert
2016-04-26 6:31 ` Hannes Reinecke
2016-04-29 23:53 ` [PATCH 00/12] scsi_debug: multiple queue support and cleanup Martin K. Petersen
2016-04-30 2:06 ` Douglas Gilbert
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=1461695255.2348.21.camel@HansenPartnership.com \
--to=james.bottomley@hansenpartnership.com \
--cc=bart.vanassche@sandisk.com \
--cc=dgilbert@interlog.com \
--cc=emilne@redhat.com \
--cc=linux-scsi@vger.kernel.org \
--cc=martin.petersen@oracle.com \
--cc=tomas.winkler@intel.com \
/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.