Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752233AbdIKCpV (ORCPT ); Sun, 10 Sep 2017 22:45:21 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:45895 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752029AbdIKCpT (ORCPT ); Sun, 10 Sep 2017 22:45:19 -0400 X-Google-Smtp-Source: ADKCNb7Qawze1Xjt7Kg4X2ieyoMCHg9FvkiJnhRNDJZaZQxkfpGJC1BN0kf4yH+XpuaqIWw7XM03EYHgefm1tLMiGC4= MIME-Version: 1.0 In-Reply-To: References: <1503922783-14317-1-git-send-email-alim.akhtar@samsung.com> <1503935147.2841.25.camel@wdc.com> From: Alim Akhtar Date: Mon, 11 Sep 2017 08:14:37 +0530 Message-ID: Subject: Re: [PATCH] scsi: ufs: Make use of UFS_BIT macro wherever possible To: Alim Akhtar Cc: Bart Van Assche , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "martin.petersen@oracle.com" , Arnd Bergmann , "vinholikatti@gmail.com" Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1434 Lines: 50 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 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