All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <darrick.wong@oracle.com>
To: Christoph Hellwig <hch@lst.de>
Cc: linux-xfs@vger.kernel.org
Subject: Re: [PATCH 4/5] xfsprogs: remove the SIZEOF_LONG substitution in platform_defs.h.in
Date: Sun, 26 Jan 2020 14:20:25 -0800	[thread overview]
Message-ID: <20200126222025.GH3447196@magnolia> (raw)
In-Reply-To: <20200126113541.787884-5-hch@lst.de>

On Sun, Jan 26, 2020 at 12:35:40PM +0100, Christoph Hellwig wrote:
> BITS_PER_LONG is now only checked in C expressions, so we can simply
> define it based on sizeof(long).
> 
> Signed-off-by: Christoph Hellwig <hch@lst.de>

Looks ok,
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>

--D

> ---
>  include/platform_defs.h.in | 4 +---
>  1 file changed, 1 insertion(+), 3 deletions(-)
> 
> diff --git a/include/platform_defs.h.in b/include/platform_defs.h.in
> index ff0a6a4e..36006cbf 100644
> --- a/include/platform_defs.h.in
> +++ b/include/platform_defs.h.in
> @@ -26,9 +26,7 @@
>  
>  typedef struct filldir		filldir_t;
>  
> -/* long and pointer must be either 32 bit or 64 bit */
> -#undef SIZEOF_LONG
> -#define BITS_PER_LONG (SIZEOF_LONG * CHAR_BIT)
> +#define BITS_PER_LONG (sizeof(long) * CHAR_BIT)
>  
>  /* Check whether to define umode_t ourselves. */
>  #ifndef HAVE_UMODE_T
> -- 
> 2.24.1
> 

  reply	other threads:[~2020-01-26 22:20 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-26 11:35 stop generating platform_defs.h Christoph Hellwig
2020-01-26 11:35 ` [PATCH 1/5] xfsprogs: remove the ENABLE_GETTEXT substitution in platform_defs.h.in Christoph Hellwig
2020-01-26 22:12   ` Darrick J. Wong
2020-01-26 11:35 ` [PATCH 2/5] xfsprogs: remove the SIZEOF_CHAR_P " Christoph Hellwig
2020-01-26 22:13   ` Darrick J. Wong
2020-01-26 11:35 ` [PATCH 3/5] repair: remove BITS_PER_LONG cpp checks in bmap.[ch] Christoph Hellwig
2020-01-26 22:20   ` Darrick J. Wong
2020-01-26 11:35 ` [PATCH 4/5] xfsprogs: remove the SIZEOF_LONG substitution in platform_defs.h.in Christoph Hellwig
2020-01-26 22:20   ` Darrick J. Wong [this message]
2020-01-26 11:35 ` [PATCH 5/5] xfsprogs: stop generating platform_defs.h Christoph Hellwig
2020-01-26 22:21   ` Darrick J. Wong
2020-01-29  6:49 stop generating platform_defs.h V2 Christoph Hellwig
2020-01-29  6:49 ` [PATCH 4/5] xfsprogs: remove the SIZEOF_LONG substitution in platform_defs.h.in Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200126222025.GH3447196@magnolia \
    --to=darrick.wong@oracle.com \
    --cc=hch@lst.de \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.