Received: by 2002:a05:6a10:9e8c:0:0:0:0 with SMTP id y12csp3307488pxx; Mon, 2 Nov 2020 05:43:44 -0800 (PST) X-Google-Smtp-Source: ABdhPJxJo5l0V+UTmzJFrmv8XhW1NQOlnmr/podqL8i3gtyEZhyCvIhsHomUeE0xcPLfGH0pW565 X-Received: by 2002:a50:f98b:: with SMTP id q11mr2752326edn.345.1604324624413; Mon, 02 Nov 2020 05:43:44 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604324624; cv=none; d=google.com; s=arc-20160816; b=bs0aT5RjEiN7UqQyslHPu1NqVk1+zzWb2iURhBhuKgEgvuz8UCR9iCKNVR18av9TJZ O5EDTV84f7cRMV4+LF00jiNjMCofqQNCY/5tJLZ2Z1+STOjA+bQ/Zt2X3fi/t7Is8beY bK+RHu0tYZ6PL+xD+X09/3OrgcqYIYFD+j654B8JmK4RYsxRSnfqBP91wkkNXTulZB3W etjg6lYuKLrlgxzIN/ujW2+Dcev9ryIvhBGyRa34zhzbD2qiuRdD2zRobxkf7FlsWrCz uMowkphhBOnhMBGafFe5dFllKkiKVW0k5DjV0NSYaoq8CxRR5NUDUA8zhMpzkUBZ6H2q WPhg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from :dkim-signature; bh=O7ajfVJhA/2SrZ1qqXiraNpNRGFUerSLYYMnKjCNxEE=; b=Uh7tKruqN9415I7XKjuXz78mcKHaXkFhG4ADGKBWdDLzphhRNm0FWlBUDoK+tcM6s6 uyf6e69pEsMwJaOHAKIlAk4ZjP5Ods3n+4fAgnm0UKTFVgc7nHmPzxUSWhJFD+XdEhMN btsJI7Zdf4KEkb70TorVgFQapgBEFnvS7yc047Bi0HFk+Vb5FoDJzw1uf2sFBUxzlYFC Cn59Ezmmm0HXjrZHcnYQyccBS7yJZp1sf9xBXUkZ5zjbjiGU16DyC7n80rm0bZ7OmhsR 8nJ6wznlXAN6ga0PQBRuSCjopnXIPLMENgeKFSqimr2s8qc4AtTHH7m3gQs7gI/LervL Fpew== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ha+siYDn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t12si11556513edt.285.2020.11.02.05.43.20; Mon, 02 Nov 2020 05:43:44 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Ha+siYDn; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725911AbgKBNlx (ORCPT + 99 others); Mon, 2 Nov 2020 08:41:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41284 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725616AbgKBNlw (ORCPT ); Mon, 2 Nov 2020 08:41:52 -0500 Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BE07CC0617A6; Mon, 2 Nov 2020 05:41:52 -0800 (PST) Received: by mail-pf1-x442.google.com with SMTP id c20so11139915pfr.8; Mon, 02 Nov 2020 05:41:52 -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=O7ajfVJhA/2SrZ1qqXiraNpNRGFUerSLYYMnKjCNxEE=; b=Ha+siYDn0Yozgsc/1FY0xnDPTq4nF44CFktiLyT0Rzsak8O8Aukpvexcx+cWPv21ta xCec7BEaTZwhlEaIh3FDMcajCravZ99TxEDlpMf5dNrFKxk6NzY1hw7YfamtLOT9lOwt zf7PP+fNt2s9sX0BZ5d6t5gkQg6dFl5KLtuqqdBVPEK5K0GQRQtRvzAlHCpVVu1tAAfk NAAfMSVm4LEcT18KupgcNlw/KFe3p8NUey7/f9bbYAJj8u69b4rAPdXgm3++klH5QHZz rWu03cKJQFcn+OvWiyuA08E85JUOtVDKFD4hC9bEV92Vh+E0VXluytZFrjKUccQg8PWU PufA== 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=O7ajfVJhA/2SrZ1qqXiraNpNRGFUerSLYYMnKjCNxEE=; b=qbu3KwWmdgWzhUH9Xpws/2YwsL9j1otUn+08deJ67rKqZvYFeNsPpYldFsWyAmr+jJ gh1OP5RD4HW3i4F0Afn+deO/QPniJUtxf/fkUgT06HGPEijMLZ7X7mixOSIvPtC2UY6C MTTONlriDyykXwJIB/2NxqxF61D5YWEQq1XCx3VRG2XyGgwTl9bS1IirE26I31Tfq0v+ T5pOkYXV3oRhxm2oUTafdrXR9KY8Fk9gkKGtRZvyaqntsp+KkcNPiDMCx55OZAtys1yY 0xsp7aSoXqw0DA6TUD6ZBEhU2gViSA64+DY74e6nduu3JKJznHCmynf2vnUENIUZC4u4 xQmg== X-Gm-Message-State: AOAM53216EFOlqiujFv+YvSL35Cd5X9vKTe70LcoFPqnWaE8X+DmlLtU 8obSXOM/Q8oT0sdq4cYfTQ== X-Received: by 2002:a63:1825:: with SMTP id y37mr13208841pgl.284.1604324512329; Mon, 02 Nov 2020 05:41:52 -0800 (PST) Received: from localhost.localdomain ([8.210.180.83]) by smtp.gmail.com with ESMTPSA id k9sm14233438pfi.188.2020.11.02.05.41.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Nov 2020 05:41:51 -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] net: ethernet: mscc: fix missing brace warning for old compilers Date: Mon, 2 Nov 2020 21:41:36 +0800 Message-Id: <20201102134136.2565-1-shipujin.t@gmail.com> X-Mailer: git-send-email 2.18.4 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.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..b96eab4583e7 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 = {}; /* Overloaded field */ etype.value[0] = proto.value[0]; -- 2.18.1