mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Boris Ostrovsky <boris.ostrovsky@oracle.com>
To: Trond Myklebust <trond.myklebust@primarydata.com>,
	Anna Schumaker <anna.schumaker@netapp.com>
Cc: "linux-nfs @ vger . kernel . org" <linux-nfs@vger.kernel.org>,
	"linux-kernel @ vger . kernel . org"
	<linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] NFSv4: Ensure gcc 4.4.4 can compile initialiser for "invalid_stateid"
Date: Sat, 18 Nov 2017 14:26:16 -0500	[thread overview]
Message-ID: <5f7d708b-a362-1fc7-2993-cbcbdefe42cc@oracle.com> (raw)
In-Reply-To: <20171118185011.4729-1-trond.myklebust@primarydata.com>



On 11/18/2017 01:50 PM, Trond Myklebust wrote:
> gcc 4.4.4 is too old to have full C11 anonymous union support, so
> the current initialiser fails to compile.
> 
> Reported-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>


(compile-)Tested-by: Boris Ostrovsky <boris.ostrovsky@oracle.com>
> ---
>   fs/nfs/nfs4state.c | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/fs/nfs/nfs4state.c b/fs/nfs/nfs4state.c
> index 980462d577ca..231b5ea2464a 100644
> --- a/fs/nfs/nfs4state.c
> +++ b/fs/nfs/nfs4state.c
> @@ -71,8 +71,8 @@ const nfs4_stateid zero_stateid = {
>   };
>   const nfs4_stateid invalid_stateid = {
>   	{
> -		.seqid = cpu_to_be32(0xffffffffU),
> -		.other = { 0 },
> +		/* Funky initialiser keeps older gcc versions happy */
> +		.data = { 0xff, 0xff, 0xff, 0xff, 0 },
>   	},
>   	.type = NFS4_INVALID_STATEID_TYPE,
>   };
> 

  reply	other threads:[~2017-11-18 19:26 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-11-18 17:19 Commit fcd8843c40 breaks old compilers Boris Ostrovsky
2017-11-18 17:39 ` Trond Myklebust
2017-11-18 18:07   ` Boris Ostrovsky
2017-11-18 18:12     ` Trond Myklebust
2017-11-18 18:32       ` Boris Ostrovsky
2017-11-18 18:50         ` [PATCH] NFSv4: Ensure gcc 4.4.4 can compile initialiser for "invalid_stateid" Trond Myklebust
2017-11-18 19:26           ` Boris Ostrovsky [this message]
2017-11-19 10:58           ` Geert Uytterhoeven
2017-11-20 12:52     ` Commit fcd8843c40 breaks old compilers Arnd Bergmann
2017-11-20 14:11       ` Boris Ostrovsky

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=5f7d708b-a362-1fc7-2993-cbcbdefe42cc@oracle.com \
    --to=boris.ostrovsky@oracle.com \
    --cc=anna.schumaker@netapp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-nfs@vger.kernel.org \
    --cc=trond.myklebust@primarydata.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®