From patchwork Tue Nov 3 02:55:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Pujin Shi X-Patchwork-Id: 11875813 X-Patchwork-Delegate: kuba@kernel.org Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-12.6 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE363C388F2 for ; Tue, 3 Nov 2020 02:55:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7A3F822277 for ; Tue, 3 Nov 2020 02:55:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Bs4CGIEG" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727346AbgKCCzo (ORCPT ); Mon, 2 Nov 2020 21:55:44 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52478 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725953AbgKCCzo (ORCPT ); Mon, 2 Nov 2020 21:55:44 -0500 Received: from mail-pg1-x544.google.com (mail-pg1-x544.google.com [IPv6:2607:f8b0:4864:20::544]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 199B7C0617A6; Mon, 2 Nov 2020 18:55:44 -0800 (PST) Received: by mail-pg1-x544.google.com with SMTP id r10so12511436pgb.10; Mon, 02 Nov 2020 18:55:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=I2zaxNy7Koprks7U2CkvxZK+6R7/l1nRgPFPQ7Oc2Qk=; b=Bs4CGIEGxSOmM5e7SQELu7VnsVKiXgXuiZcJLhsGdv1iT7sK9LekeecJ+PcNiCLTPX ZcTafYgrEgC59QnMfCozRfFWaej31GL0105HOEN9E/Im7qpOGIUyrjvfz8Ab/xFdWt21 h/u6EBj6kV5cckfO17s+KLO7WVdcDLCR3gR/A0RO90opF7hA14vn3U+t6D23L6WCowzv FVf3kcWzCpefvVFROp+s1znZUBfFhpKTUg3ZZmeU1J2mkjkkWz3LT6hLqpduChqEnZax 4K1eW+HTlk0e0PC1f+jPVVSnVLEBdAWEzs+I8ylnJClH0GSC12M7zhJymaguMVEUVRPd yB2Q== 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; bh=I2zaxNy7Koprks7U2CkvxZK+6R7/l1nRgPFPQ7Oc2Qk=; b=pvoBG37GcVOLL2HeuOiHnr4ukDh07MR1U1naKMnWhAy0aTCHHVBim2UGMa2AZJcLIv HqV3k3EJtxpLVTvBYHHNF2XuI4qhSG2DKjVZBAtV1eKWUvpGf3LXQxYxwkiWkjfMwfw0 3B4i5f4wdhfGrqR7zSUOvkQrRhfuxzZrvgYc9+Oa177Vl5/cvpeF9mXUpjKXBXDPF7cr mQZZXPz0bmxeYiMCcCnRqicYBbLDvNJj4+DqYFCALqmLpYQig1H6Os9Oj3t/uu3CENrg zzs+fQ/CXEVkk+4sqoUK3tPKbVwS3IyRM2rX9wjpW4NLnJpnWfvmseJdzA5PNA8wuFjH TbHA== X-Gm-Message-State: AOAM533ONW1JiDvPm1bd7HHG8NAcFZ+fsmfZ17EqvLIvK2tg4ltkoiD5 jUhqY5CHblswjddXv8sftQGRjRPXpeJZif8= X-Google-Smtp-Source: ABdhPJyUoLiXtbIlw5FaqSiqJplGsFEIurmcVCO9suomj847kRWqWlL8+uK6HDpQVI0njLBzC1D0tA== X-Received: by 2002:a17:90a:3e4a:: with SMTP id t10mr1368239pjm.151.1604372143771; Mon, 02 Nov 2020 18:55:43 -0800 (PST) Received: from localhost.localdomain ([47.242.155.38]) by smtp.gmail.com with ESMTPSA id s23sm13401150pgl.47.2020.11.02.18.55.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 18:55:43 -0800 (PST) From: Pujin Shi To: Jakub Kicinski , "David S . Miller" Cc: Microchip Linux Driver Support , Vladimir Oltean , Claudiu Manoil , Alexandre Belloni , Xiaoliang Yang , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Pujin Shi Subject: [PATCH V2] net: ethernet: mscc: fix missing brace warning for old compilers Date: Tue, 3 Nov 2020 10:55:19 +0800 Message-Id: <20201103025519.1916-1-shipujin.t@gmail.com> X-Mailer: git-send-email 2.18.4 Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org X-Patchwork-Delegate: kuba@kernel.org For older versions of gcc, the array = {0}; will cause warnings: drivers/net/ethernet/mscc/ocelot_vcap.c: In function 'is1_entry_set': drivers/net/ethernet/mscc/ocelot_vcap.c:755:11: warning: missing braces around initializer [-Wmissing-braces] struct ocelot_vcap_u16 etype = {0}; ^ drivers/net/ethernet/mscc/ocelot_vcap.c:755:11: warning: (near initialization for 'etype.value') [-Wmissing-braces] 1 warnings generated Fixes: 75944fda1dfe ("net: mscc: ocelot: offload ingress skbedit and vlan actions to VCAP IS1") Signed-off-by: Pujin Shi --- drivers/net/ethernet/mscc/ocelot_vcap.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/mscc/ocelot_vcap.c b/drivers/net/ethernet/mscc/ocelot_vcap.c index d8c778ee6f1b..b5167570521c 100644 --- a/drivers/net/ethernet/mscc/ocelot_vcap.c +++ b/drivers/net/ethernet/mscc/ocelot_vcap.c @@ -752,7 +752,7 @@ static void is1_entry_set(struct ocelot *ocelot, int ix, dport); } else { /* IPv4 "other" frame */ - struct ocelot_vcap_u16 etype = {0}; + struct ocelot_vcap_u16 etype = {{0}}; /* Overloaded field */ etype.value[0] = proto.value[0];