Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1730135 > unrolled thread

Re: [PATCH] scsi: ufs: Make use of UFS_BIT macro wherever possible

Started byAlim Akhtar <alim.akhtar@gmail.com>
First post2017-09-11 04:50 +0200
Last post2017-09-25 21:40 +0200
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH] scsi: ufs: Make use of UFS_BIT macro wherever possible Alim Akhtar <alim.akhtar@gmail.com> - 2017-09-11 04:50 +0200
    Re: [PATCH] scsi: ufs: Make use of UFS_BIT macro wherever possible "Martin K. Petersen" <martin.petersen@oracle.com> - 2017-09-25 21:40 +0200

#1730135 — Re: [PATCH] scsi: ufs: Make use of UFS_BIT macro wherever possible

FromAlim Akhtar <alim.akhtar@gmail.com>
Date2017-09-11 04:50 +0200
SubjectRe: [PATCH] scsi: ufs: Make use of UFS_BIT macro wherever possible
Message-ID<uomXn-4P9-5@gated-at.bofh.it>
Hi,

Ping!!!

Should I drop this patch and send another one which removes UFS_BIT() macro?

On Tue, Aug 29, 2017 at 4:35 PM, Alim Akhtar <alim.akhtar@samsung.com> wrote:
> 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



-- 
Regards,
Alim

[toc] | [next] | [standalone]


#1739245

From"Martin K. Petersen" <martin.petersen@oracle.com>
Date2017-09-25 21:40 +0200
Message-ID<utHou-2k6-27@gated-at.bofh.it>
In reply to#1730135
Alim,

> Should I drop this patch and send another one which removes UFS_BIT()
> macro?

I fail to see the point of UFS_BIT(). So yes.

Please make sure to CC: Subhash on ufs changes.

-- 
Martin K. Petersen	Oracle Linux Engineering

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web