From patchwork Sat Nov 18 18:50:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Trond Myklebust X-Patchwork-Id: 10064913 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id C4B2B6023A for ; Sat, 18 Nov 2017 18:50:21 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B789429BD0 for ; Sat, 18 Nov 2017 18:50:21 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id A95FE29BD9; Sat, 18 Nov 2017 18:50:21 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 27BA729BD0 for ; Sat, 18 Nov 2017 18:50:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1161161AbdKRSuT (ORCPT ); Sat, 18 Nov 2017 13:50:19 -0500 Received: from mail-io0-f196.google.com ([209.85.223.196]:35074 "EHLO mail-io0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1161145AbdKRSuQ (ORCPT ); Sat, 18 Nov 2017 13:50:16 -0500 Received: by mail-io0-f196.google.com with SMTP id i38so11982744iod.2; Sat, 18 Nov 2017 10:50:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=f2uxKMtWT6aw670paBWiFahhdhcSxwT6THiYO85vN7w=; b=N7pWPM1R0Y1aXpgNcLx8UAu0gOuu9aXn7NsDrB/Qy7Wv9FGt6RONtzbc0Ox3U8aFlv yP4arpqPR/Oi+t8FgW591NnA/suVBmQXpBt+9RhiuhBUxOpkktAzHaq2g4xxBu1oTnkq j6vFtetA34FciyrGZ4923b3p0dKKXzibsCuIK1tTM/Hkkv0a+BtXib2A7KyjzZdRIbJA uJtvnkNPXQjWCMz1RbvvbxhUJAJalFnYxCWipk/L8Us56bJzMgFpfx5zWz5ybASXRTZz uxbxonQU5MS9p6GxXgBbqmmjvI081zKdpLcaJbPoKEVpav03EL3JT8gWuMQvgqnfK67b MNzQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=f2uxKMtWT6aw670paBWiFahhdhcSxwT6THiYO85vN7w=; b=mrsQeD/OIBbpUuJKKWApi0JyTqc3brniNJohgtgSqpbzQKRoBb3ZDarIO0tIQGm+p6 yWtjmQbR78OmCwJ9etvoOzsrDVGa/l54fh3XWkzglOVx7cqZ02sCqr4al1Q5KXvx3aVL 50dEExJDz6ZYQlpiKrgkwK0cl709kbOmh8mevGObYgh2TICMBPsvEVCQZmb88pQ2d/ta ZfI5B+oYnDKHPKjZQluRFzJhNucSaqtswLG9m3XUZOITUwauPu9SqzdgUxqnnHUMpRWL PjaidA+FeTTXJgAb2jn3M8yKDO6U26p+TTMKWBaA2GqIsAlcrGXX0TIp723Di8WXRU3x VRpw== X-Gm-Message-State: AJaThX52S0mNnrfHVjN9s3RFIn8CPqDqgaJpm2bAGW2xL0PGKb7HUCwK heLTi8zJZctiU4xdl8Sn+y0A+m0= X-Google-Smtp-Source: AGs4zMZcRC+6cYo++OPeHuW5DKAhbfM0Np6tZpJd3zbH4nRvRju8iKWpLLX8VFfL37YVE5wlh0lpOA== X-Received: by 10.107.78.22 with SMTP id c22mr7953491iob.51.1511031015826; Sat, 18 Nov 2017 10:50:15 -0800 (PST) Received: from localhost.localdomain (c-68-49-162-121.hsd1.mi.comcast.net. [68.49.162.121]) by smtp.gmail.com with ESMTPSA id r79sm3328938ita.0.2017.11.18.10.50.13 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sat, 18 Nov 2017 10:50:14 -0800 (PST) From: Trond Myklebust To: Anna Schumaker Cc: Boris Ostrovsky , "linux-nfs @ vger . kernel . org" , "linux-kernel @ vger . kernel . org" Subject: [PATCH] NFSv4: Ensure gcc 4.4.4 can compile initialiser for "invalid_stateid" Date: Sat, 18 Nov 2017 13:50:11 -0500 Message-Id: <20171118185011.4729-1-trond.myklebust@primarydata.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: References: MIME-Version: 1.0 Sender: linux-nfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-nfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 Signed-off-by: Trond Myklebust Reviewed-by: Geert Uytterhoeven --- 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, };