mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alim Akhtar <alim.akhtar@samsung.com>
To: Bart Van Assche <Bart.VanAssche@wdc.com>,
	"linux-scsi@vger.kernel.org" <linux-scsi@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Cc: "martin.petersen@oracle.com" <martin.petersen@oracle.com>,
	Arnd Bergmann <arnd@arndb.de>,
	"vinholikatti@gmail.com" <vinholikatti@gmail.com>
Subject: Re: [PATCH] scsi: ufs: Make use of UFS_BIT macro wherever possible
Date: Tue, 29 Aug 2017 16:35:13 +0530	[thread overview]
Message-ID: <e26087fe-5e1b-c103-668d-43818765d3c9@samsung.com> (raw)
In-Reply-To: <1503935147.2841.25.camel@wdc.com>

Hi Bart,
Thanks for your review.

On 08/28/2017 09:15 PM, Bart Van Assche wrote:
> On Mon, 2017-08-28 at 17:49 +0530, Alim Akhtar wrote:
>> This entire file uses UFS_BIT macro for bits definition, expect for few
>> places. This patch convert those defines to use UFS_BIT macro to be aligned
>> with reset of the file.
> 
> This is the definition of the UFS_BIT() macro I found in
> drivers/scsi/ufs/ufshci.h:
> 
> #define UFS_BIT(x)	(1L << (x))
> 
> Using this macro makes code longer instead of shorter and does not improve
> code readability. Is this macro really useful? Wouldn't it be better to
> remove the UFS_BIT() macro instead of introducing more uses of it?
> 
Well, the intension of this patch is to make use of already existing 
UFS_BIT() macro.

I am not aware of the history why this macro was created at first place.

Well, it does improve code readability, for me at least, no need for one 
to do a calculation to see which bit it is, as we pass _bit_ number to 
UFS_BIT.

I am totally okay, if you or other reviewers suggests me to change 
UFS_BIT to actual bit position, something like the original case, which 
this patch is trying to change.

> Thanks,
> 
> Bart.
> 
Thanks!
Alim

  reply	other threads:[~2017-08-29 11:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20170828122625epcas2p33e3e912339c1e29051ad8e28251ea91b@epcas2p3.samsung.com>
2017-08-28 12:19 ` Alim Akhtar
2017-08-28 15:45   ` Bart Van Assche
2017-08-29 11:05     ` Alim Akhtar [this message]
2017-09-11  2:44       ` Alim Akhtar
2017-09-25 19:31         ` Martin K. Petersen
2017-09-30  6:24           ` Alim Akhtar

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=e26087fe-5e1b-c103-668d-43818765d3c9@samsung.com \
    --to=alim.akhtar@samsung.com \
    --cc=Bart.VanAssche@wdc.com \
    --cc=arnd@arndb.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=martin.petersen@oracle.com \
    --cc=vinholikatti@gmail.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 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®