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


Groups > linux.kernel > #1682108 > unrolled thread

[PATCH 8/8] Staging: lustre :lustre: include :lustre_compat.h: Prefer using the BIT macro

Started byJaya Durga <rjdurga@gmail.com>
First post2017-07-06 09:20 +0200
Last post2017-07-12 07:20 +0200
Articles 4 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 8/8] Staging: lustre :lustre: include :lustre_compat.h: Prefer using the BIT macro Jaya Durga <rjdurga@gmail.com> - 2017-07-06 09:20 +0200
    Re: [PATCH 8/8] Staging: lustre :lustre: include :lustre_compat.h:  Prefer using the BIT macro Frans Klaver <fransklaver@gmail.com> - 2017-07-06 09:30 +0200
    Re: [PATCH 8/8] Staging: lustre :lustre: include :lustre_compat.h:  Prefer using the BIT macro Greg KH <gregkh@linuxfoundation.org> - 2017-07-11 19:10 +0200
      Re: [PATCH 8/8] Staging: lustre :lustre: include :lustre_compat.h:  Prefer using the BIT macro "Dilger, Andreas" <andreas.dilger@intel.com> - 2017-07-12 07:20 +0200

#1682108 — [PATCH 8/8] Staging: lustre :lustre: include :lustre_compat.h: Prefer using the BIT macro

FromJaya Durga <rjdurga@gmail.com>
Date2017-07-06 09:20 +0200
Subject[PATCH 8/8] Staging: lustre :lustre: include :lustre_compat.h: Prefer using the BIT macro
Message-ID<u09eV-1bF-7@gated-at.bofh.it>
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

[toc] | [next] | [standalone]


#1682116 — Re: [PATCH 8/8] Staging: lustre :lustre: include :lustre_compat.h: Prefer using the BIT macro

FromFrans Klaver <fransklaver@gmail.com>
Date2017-07-06 09:30 +0200
SubjectRe: [PATCH 8/8] Staging: lustre :lustre: include :lustre_compat.h: Prefer using the BIT macro
Message-ID<u09oB-1hk-5@gated-at.bofh.it>
In reply to#1682108
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

[toc] | [prev] | [next] | [standalone]


#1685213 — Re: [PATCH 8/8] Staging: lustre :lustre: include :lustre_compat.h: Prefer using the BIT macro

FromGreg KH <gregkh@linuxfoundation.org>
Date2017-07-11 19:10 +0200
SubjectRe: [PATCH 8/8] Staging: lustre :lustre: include :lustre_compat.h: Prefer using the BIT macro
Message-ID<u26PD-56j-9@gated-at.bofh.it>
In reply to#1682108
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

[toc] | [prev] | [next] | [standalone]


#1685520 — Re: [PATCH 8/8] Staging: lustre :lustre: include :lustre_compat.h: Prefer using the BIT macro

From"Dilger, Andreas" <andreas.dilger@intel.com>
Date2017-07-12 07:20 +0200
SubjectRe: [PATCH 8/8] Staging: lustre :lustre: include :lustre_compat.h: Prefer using the BIT macro
Message-ID<u2ie5-3OP-1@gated-at.bofh.it>
In reply to#1685213
> 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

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web