From patchwork Tue Oct 23 21:34:58 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Igor Stoppa X-Patchwork-Id: 10653797 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 25BC814BB for ; Tue, 23 Oct 2018 21:38:31 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 131B22A14F for ; Tue, 23 Oct 2018 21:38:31 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 06FB22A1B5; Tue, 23 Oct 2018 21:38:31 +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=-5.0 required=2.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from mother.openwall.net (mother.openwall.net [195.42.179.200]) by mail.wl.linuxfoundation.org (Postfix) with SMTP id 358602A14F for ; Tue, 23 Oct 2018 21:38:29 +0000 (UTC) Received: (qmail 14259 invoked by uid 550); 23 Oct 2018 21:36:25 -0000 Mailing-List: contact kernel-hardening-help@lists.openwall.com; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-ID: Delivered-To: mailing list kernel-hardening@lists.openwall.com Received: (qmail 14222 invoked from network); 23 Oct 2018 21:36:24 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references:reply-to; bh=wfR+fMPqGcMIiSbYRT7t8ZKG+Wth8+A7neWCKMW39bo=; b=NSTm8KZSg3mTcjVAHwXvMefH1L9qCAsnuF0SiZouKOL34cs6TBhJ9u+3dCXhe9tcjj NFfLiY6U3spOFYXhmO/FSGNo5ANtqmnSBnyS1g7A1mskX9K0SgD6zO5VnE6s2fr91B4J htrS0hVNIEptrkthCgGEV+IvfGNvnkUYOg9mFPJCkmz/yP2S2JuRM+fzfkVpuKFgij/u XqqTPMKDADSrHYlCm1aZ6pkBs6MPXWIlMRyCaF2ABF6Ot8Ft8QdU54KQHlM1muamJZK/ RKcz16TjeZRaZsBmYR1rqRzq4xo0ph1FhdQbqY/RqDegyjmxrIiwnhBtLwP8EoMqWHwK 188w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:reply-to; bh=wfR+fMPqGcMIiSbYRT7t8ZKG+Wth8+A7neWCKMW39bo=; b=j1PjQcUoc01lzR900K8USZSkrbbiOPffly8BOf6lJt8c9qzIzdKVRoHWwWkj8YhfMZ kzsmblgHukR1WanZqKVvPnIg3NZRejJqxiUIdsL5m3qonxXrgGgsTTZALTz+hEl3Y5xB D3oYuly0b35ROaC24EIwYCVtWkVYV+cC65+B3OuGK8ze4TPjbdZyodO3iRgVWBVjb/7z f4G15wJpkV9emlwT9r/NQRXxTRaTKuBnbV/9N0eDY8lxqS+GiJ4qKRCf5ZSY45OoJoPn vuy5awrCV5d0b4Hr0usLLLrfznNSji6GWwkSpGtvmo55RSgcuaF92W1aGFuU4UEXeaNn Hm8A== X-Gm-Message-State: AGRZ1gJpHvOl4JAhlB0FFM1df2cp2OV86VUdVqJwwaMsUm8Y4BU/5mGK NYedu36lUGddB0/A3ZhSOcc= X-Google-Smtp-Source: AJdET5dVOeRLRbNE9ihJ7d4qwyx504gyotgQkH3VlmhhESWejLxDFLXxKx2mzRRXa361IDY4EQUANw== X-Received: by 2002:a2e:970d:: with SMTP id r13-v6mr5241lji.30.1540330573423; Tue, 23 Oct 2018 14:36:13 -0700 (PDT) From: Igor Stoppa X-Google-Original-From: Igor Stoppa To: Mimi Zohar , Kees Cook , Matthew Wilcox , Dave Chinner , James Morris , Michal Hocko , kernel-hardening@lists.openwall.com, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org Cc: igor.stoppa@huawei.com, Dave Hansen , Jonathan Corbet , Laura Abbott , Kate Stewart , "David S. Miller" , Edward Cree , Philippe Ombredanne , Greg Kroah-Hartman , linux-kernel@vger.kernel.org Subject: [PATCH 11/17] prmem: llist: use designated initializer Date: Wed, 24 Oct 2018 00:34:58 +0300 Message-Id: <20181023213504.28905-12-igor.stoppa@huawei.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20181023213504.28905-1-igor.stoppa@huawei.com> References: <20181023213504.28905-1-igor.stoppa@huawei.com> X-Virus-Scanned: ClamAV using ClamSMTP Using a list_head in an unnamed union poses a problem with the current implementation of the initializer, since it doesn't specify the names of the fields it is initializing. This patch makes it use designated initializers. Signed-off-by: Igor Stoppa CC: Kate Stewart CC: "David S. Miller" CC: Edward Cree CC: Philippe Ombredanne CC: Greg Kroah-Hartman CC: linux-kernel@vger.kernel.org --- include/linux/list.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/include/linux/list.h b/include/linux/list.h index de04cc5ed536..184a7b60436f 100644 --- a/include/linux/list.h +++ b/include/linux/list.h @@ -18,7 +18,10 @@ * using the generic single-entry routines. */ -#define LIST_HEAD_INIT(name) { &(name), &(name) } +#define LIST_HEAD_INIT(name) { \ + .next = &(name), \ + .prev = &(name), \ +} #define LIST_HEAD(name) \ struct list_head name = LIST_HEAD_INIT(name)