lkml.org 
[lkml]   [2021]   [Mar]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH net-next 2/2] net: socket: change MSG_CMSG_COMPAT to BIT(21)
On Sun, Mar 21, 2021 at 08:39:29PM +0800, menglong8.dong@gmail.com wrote:
>
> diff --git a/include/linux/socket.h b/include/linux/socket.h
> index d5ebfe30d96b..317b2933f499 100644
> --- a/include/linux/socket.h
> +++ b/include/linux/socket.h
> @@ -312,17 +312,18 @@ struct ucred {
> * plain text and require encryption
> */
>
> +#if defined(CONFIG_COMPAT)
> +#define MSG_CMSG_COMPAT BIT(21) /* This message needs 32 bit fixups */
> +#else
> +#define MSG_CMSG_COMPAT 0 /* We never have 32 bit fixups */
> +#endif
> +
> #define MSG_ZEROCOPY BIT(26) /* Use user data in kernel path */
> #define MSG_FASTOPEN BIT(29) /* Send data in TCP SYN */
> #define MSG_CMSG_CLOEXEC BIT(30) /* Set close_on_exec for file
> * descriptor received through
> * SCM_RIGHTS
> */
> -#if defined(CONFIG_COMPAT)
> -#define MSG_CMSG_COMPAT BIT(31) /* This message needs 32 bit fixups */
> -#else
> -#define MSG_CMSG_COMPAT 0 /* We never have 32 bit fixups */
> -#endif

Shouldn't you add some comment here to stop people from trying to
use BIT(31) in the future?

Thanks,
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

\
 
 \ /
  Last update: 2021-03-21 13:52    [W:0.061 / U:0.216 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site