linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 8/8] Staging: lustre :lustre: include :lustre_compat.h: Prefer using the BIT macro
@ 2017-07-06  7:13 Jaya Durga
  2017-07-06  7:23 ` Frans Klaver
  2017-07-11 17:08 ` Greg KH
  0 siblings, 2 replies; 4+ messages in thread
From: Jaya Durga @ 2017-07-06  7:13 UTC (permalink / raw)
  To: gregkh
  Cc: oleg.drokin, andreas.dilger, jsimmons, john.hammond, bobijam,
	mingo, lustre-devel, devel, linux-kernel, Jaya Durga

Replace all instances of (1 << 27) with BIT(27) to fix
checkpatch check messages

Signed-off-by: Jaya Durga <rjdurga@gmail.com>
---
 drivers/staging/lustre/lustre/include/lustre_compat.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/staging/lustre/lustre/include/lustre_compat.h b/drivers/staging/lustre/lustre/include/lustre_compat.h
index da9ce19..686a251 100644
--- a/drivers/staging/lustre/lustre/include/lustre_compat.h
+++ b/drivers/staging/lustre/lustre/include/lustre_compat.h
@@ -43,7 +43,7 @@
  * set ATTR_BLOCKS to a high value to avoid any risk of collision with other
  * ATTR_* attributes (see bug 13828)
  */
-#define ATTR_BLOCKS    (1 << 27)
+#define ATTR_BLOCKS    BIT(27)
 
 #define current_ngroups current_cred()->group_info->ngroups
 #define current_groups current_cred()->group_info->small_block
-- 
1.9.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH 8/8] Staging: lustre :lustre: include :lustre_compat.h: Prefer using the BIT macro
  2017-07-06  7:13 [PATCH 8/8] Staging: lustre :lustre: include :lustre_compat.h: Prefer using the BIT macro Jaya Durga
@ 2017-07-06  7:23 ` Frans Klaver
  2017-07-11 17:08 ` Greg KH
  1 sibling, 0 replies; 4+ messages in thread
From: Frans Klaver @ 2017-07-06  7:23 UTC (permalink / raw)
  To: Jaya Durga
  Cc: Greg KH, driverdevel, linux-kernel, oleg.drokin, andreas.dilger,
	john.hammond, bobijam, Ingo Molnar, lustre-devel

On Thu, Jul 6, 2017 at 9:13 AM, Jaya Durga <rjdurga@gmail.com> wrote:
> Subject: Staging: lustre :lustre: include :lustre_compat.h: Prefer using the BIT macro

Don't overdo it ;-).

Subject: staging: lustre: lustre_compat.h: Prefer using the BIT macro

> Replace all instances of (1 << 27) with BIT(27) to fix
> checkpatch check messages

While it may technically be true that this one instance is every
instance of (1<<27) there is in lustre_compat.h, I must say I expected
a bigger patch when I saw "replace all instances".


> Signed-off-by: Jaya Durga <rjdurga@gmail.com>
> ---
>  drivers/staging/lustre/lustre/include/lustre_compat.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/lustre/lustre/include/lustre_compat.h b/drivers/staging/lustre/lustre/include/lustre_compat.h
> index da9ce19..686a251 100644
> --- a/drivers/staging/lustre/lustre/include/lustre_compat.h
> +++ b/drivers/staging/lustre/lustre/include/lustre_compat.h
> @@ -43,7 +43,7 @@
>   * set ATTR_BLOCKS to a high value to avoid any risk of collision with other
>   * ATTR_* attributes (see bug 13828)
>   */
> -#define ATTR_BLOCKS    (1 << 27)
> +#define ATTR_BLOCKS    BIT(27)
>
>  #define current_ngroups current_cred()->group_info->ngroups
>  #define current_groups current_cred()->group_info->small_block
> --
> 1.9.1
>
> _______________________________________________
> devel mailing list
> devel@linuxdriverproject.org
> http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 8/8] Staging: lustre :lustre: include :lustre_compat.h: Prefer using the BIT macro
  2017-07-06  7:13 [PATCH 8/8] Staging: lustre :lustre: include :lustre_compat.h: Prefer using the BIT macro Jaya Durga
  2017-07-06  7:23 ` Frans Klaver
@ 2017-07-11 17:08 ` Greg KH
  2017-07-12  5:13   ` Dilger, Andreas
  1 sibling, 1 reply; 4+ messages in thread
From: Greg KH @ 2017-07-11 17:08 UTC (permalink / raw)
  To: Jaya Durga
  Cc: oleg.drokin, andreas.dilger, jsimmons, john.hammond, bobijam,
	mingo, lustre-devel, devel, linux-kernel

On Thu, Jul 06, 2017 at 12:43:15PM +0530, Jaya Durga wrote:
> Replace all instances of (1 << 27) with BIT(27) to fix
> checkpatch check messages
> 
> Signed-off-by: Jaya Durga <rjdurga@gmail.com>
> ---
>  drivers/staging/lustre/lustre/include/lustre_compat.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/lustre/lustre/include/lustre_compat.h b/drivers/staging/lustre/lustre/include/lustre_compat.h
> index da9ce19..686a251 100644
> --- a/drivers/staging/lustre/lustre/include/lustre_compat.h
> +++ b/drivers/staging/lustre/lustre/include/lustre_compat.h
> @@ -43,7 +43,7 @@
>   * set ATTR_BLOCKS to a high value to avoid any risk of collision with other
>   * ATTR_* attributes (see bug 13828)
>   */
> -#define ATTR_BLOCKS    (1 << 27)
> +#define ATTR_BLOCKS    BIT(27)

Isn't this used in lustre's userspace code?  If so, you can't use the
BIT() macro there :(

Please check before you redo this.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 8/8] Staging: lustre :lustre: include :lustre_compat.h: Prefer using the BIT macro
  2017-07-11 17:08 ` Greg KH
@ 2017-07-12  5:13   ` Dilger, Andreas
  0 siblings, 0 replies; 4+ messages in thread
From: Dilger, Andreas @ 2017-07-12  5:13 UTC (permalink / raw)
  To: Greg KH
  Cc: Jaya Durga, Drokin, Oleg, jsimmons, Hammond, John, bobijam,
	mingo, lustre-devel, devel, linux-kernel


> On Jul 11, 2017, at 11:08, Greg KH <gregkh@linuxfoundation.org> wrote:
> 
> On Thu, Jul 06, 2017 at 12:43:15PM +0530, Jaya Durga wrote:
>> Replace all instances of (1 << 27) with BIT(27) to fix
>> checkpatch check messages
>> 
>> Signed-off-by: Jaya Durga <rjdurga@gmail.com>
>> ---
>> drivers/staging/lustre/lustre/include/lustre_compat.h | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>> 
>> diff --git a/drivers/staging/lustre/lustre/include/lustre_compat.h b/drivers/staging/lustre/lustre/include/lustre_compat.h
>> index da9ce19..686a251 100644
>> --- a/drivers/staging/lustre/lustre/include/lustre_compat.h
>> +++ b/drivers/staging/lustre/lustre/include/lustre_compat.h
>> @@ -43,7 +43,7 @@
>>  * set ATTR_BLOCKS to a high value to avoid any risk of collision with other
>>  * ATTR_* attributes (see bug 13828)
>>  */
>> -#define ATTR_BLOCKS    (1 << 27)
>> +#define ATTR_BLOCKS    BIT(27)
> 
> Isn't this used in lustre's userspace code?  If so, you can't use the
> BIT() macro there :(
> 
> Please check before you redo this.

The "lustre_compat.h" header was previously used for compatibility between different kernel
versions, which is why it is now basically empty.  It isn't used for userspace interfaces
as other "compat" headers are in the kernel.

Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Intel Corporation

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2017-07-12  5:13 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-07-06  7:13 [PATCH 8/8] Staging: lustre :lustre: include :lustre_compat.h: Prefer using the BIT macro Jaya Durga
2017-07-06  7:23 ` Frans Klaver
2017-07-11 17:08 ` Greg KH
2017-07-12  5:13   ` Dilger, Andreas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).