[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e26087fe-5e1b-c103-668d-43818765d3c9@samsung.com>
Date: Tue, 29 Aug 2017 16:35:13 +0530
From: Alim Akhtar <alim.akhtar@...sung.com>
To: Bart Van Assche <Bart.VanAssche@....com>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Cc: "martin.petersen@...cle.com" <martin.petersen@...cle.com>,
Arnd Bergmann <arnd@...db.de>,
"vinholikatti@...il.com" <vinholikatti@...il.com>
Subject: Re: [PATCH] scsi: ufs: Make use of UFS_BIT macro wherever possible
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
Powered by blists - more mailing lists