Received: by 2002:a05:6a10:c604:0:0:0:0 with SMTP id y4csp3462895pxt; Tue, 10 Aug 2021 04:22:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz4PCkH2ns4gLinT46dxLibBdHaUklY8T8LGWsZp9+jAsxAJnGM1v7uQkT6+Owq1wZFb8io X-Received: by 2002:a17:906:3bd7:: with SMTP id v23mr9515397ejf.446.1628594542937; Tue, 10 Aug 2021 04:22:22 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1628594542; cv=pass; d=google.com; s=arc-20160816; b=E2F4/TrxJRJjOKUUXvbWHXOujd3pnkUq5aX10PHsz4E/sTAqCGdE/V8h+2xw8QiJfP dGXSUr0pLYukx52SDMGhZwX+pUrDucbhKsR2wmSscUr+gIp4Qfqr1Xx+3rseU835MuVr sVeQYUN2hpHel1WyW9tk1Ys3Zx7s91I9XDWKUYfc1dMaJxoo/tbmOEwZLlJLiQhLxod+ Z5RT6O3DqaaggDYIJQ+G8LsmnFfwl+Fw/Eh3qXG5u9cl2RK4UB6xV6IJwDx8v5cdFwiy WX5oK6N2kE0SJD30wD0FnhcyxaO1QsX1z2R0rayUVwuT4lJAmrwOd25E1O4jHCMKD6+n Kwjg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:content-transfer-encoding :content-id:content-language:accept-language:in-reply-to:references :message-id:date:thread-index:thread-topic:subject:cc:to:from :dkim-signature; bh=F6wetzpNNj6OvNCIF3shE/JiED8NEe6USLwMO7rBa8A=; b=EKBs0iac7kXkT/4wAKc8pgna/aXj48XY6aeqsCXiOFuX9qPKcZ8Z4ItCD04LiDPLJb fLBRaZ7jpwIinZzKlBKLmBKoQGBCxndb5AlwP0ndqze5pyI+lczKEjwNTBAwceb5xKZA GREGb4KDR9pyntL6M504WW4yJN6p+K5oqEOABTF7VuCTq2bBcnn9lD1ptlW8yQiWj0r7 yvWMXfZNFjNV569P13Qe2OALfzHH55ZaLL2RxKtjIx91TdLU3qhLanncjk+qZphH+921 La7FlPWHhhyjMNhK0x1n3s8XQi/AePvF3uM6A+bDR2n7eMGBIOUvpsuq65OUzYdKK7Ar /A9A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=NYwhThju; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=NONE dis=NONE) header.from=nxp.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g25si20482969edv.1.2021.08.10.04.21.58; Tue, 10 Aug 2021 04:22:22 -0700 (PDT) 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=@nxp.com header.s=selector2 header.b=NYwhThju; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); 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=NONE dis=NONE) header.from=nxp.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237283AbhHJIQo (ORCPT + 99 others); Tue, 10 Aug 2021 04:16:44 -0400 Received: from mail-eopbgr140078.outbound.protection.outlook.com ([40.107.14.78]:16387 "EHLO EUR01-VE1-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S235675AbhHJIQl (ORCPT ); Tue, 10 Aug 2021 04:16:41 -0400 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=am+FfgV+1ahT+SlVfwVsQi/AaoNdFm7Naah66iscLPg39lgen6otCue9t1IcuCoIussDzOH+oMRuivavzhjiO2DFsllp7N2fyCEGe0VO9upC5oA62MRH8uigCpxUkytBCGGBSEQpkCBPCNaqxq4j0dGnp3e28dKJ2Kh1iqJ3+LNsNvAD0wxmcZ3duX5ajSxfrH/RadzMJMwua9cb7h99/QwVJO0+BFcIYSLPCG4VCAOcuZoWL0uixurhlUOQogwH4MarvRQwoSOF3w7kdfNB8wYwJli5j7zmdt5ScgoMyNpyPJs18+hcDsN28WUMj6dfc1v9TrAIygU8mUwD6qL76A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=F6wetzpNNj6OvNCIF3shE/JiED8NEe6USLwMO7rBa8A=; b=ZaHd8FBO+TCDj2xDYaynjdczaSkUxBrzHK3nF5r568g9VonvorIRjB7w9xkcuOUMKhGDPJs6r0JQ3iz3drM7NRH4LU5K3cuJU/5So+dWBhuIxZZzvM5QLk31/rT9LYTH40wfUSZHhli4vIMxdLis5pJdD7NW0Ui6gSmZgDH7DdvHLrM7d7eUQv3PrCn9J/psQp0sq043BZPZsGL/T3LWicf8RjTEtYlrsbwlUiOPrjRJw2U0NPlLXOq0rp2lQePrrwp7yK0oFLJXkPURWNNlHXrCaMqlXLlmAM5zmIVl4WXH5aL8pYs7lfRzZhjSo0IzxoIrXH55QFb/s4Z5y2Ll9Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=F6wetzpNNj6OvNCIF3shE/JiED8NEe6USLwMO7rBa8A=; b=NYwhThjuZLAOLQkSRyWvaAjHfSMFJC/htBV4xEU0owPtohpUNztgwYd+Mh7APLubILZoW8i6dZFHx8hObGXm1Z+mdaEFdd8OaACi1v4cS95YT81NOEAWtBZ0Lhq6EvkjzdxU2EM1hHLco0rI4u25ZsYMYWN4oYDQCa6O1Xw3Ot8= Received: from VI1PR04MB5136.eurprd04.prod.outlook.com (2603:10a6:803:55::19) by VI1PR0401MB2302.eurprd04.prod.outlook.com (2603:10a6:800:2b::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4394.21; Tue, 10 Aug 2021 08:16:17 +0000 Received: from VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::109:1995:3e6b:5bd0]) by VI1PR04MB5136.eurprd04.prod.outlook.com ([fe80::109:1995:3e6b:5bd0%2]) with mapi id 15.20.4394.023; Tue, 10 Aug 2021 08:16:17 +0000 From: Vladimir Oltean To: Leon Romanovsky CC: "netdev@vger.kernel.org" , Jakub Kicinski , "David S. Miller" , Andrew Lunn , Florian Fainelli , Vivien Didelot , Vladimir Oltean , Vadym Kochan , Taras Chornyi , Saeed Mahameed , Jiri Pirko , Ido Schimmel , Lars Povlsen , Steen Hegelund , "UNGLinuxDriver@microchip.com" , Grygorii Strashko , Julian Wiedmann , Karsten Graul , Heiko Carstens , Vasily Gorbik , Christian Borntraeger , Jianbo Liu , Vlad Buslov , Bjarni Jonasson , Vignesh Raghavendra , Tobias Waldekranz , "linux-kernel@vger.kernel.org" , "linux-rdma@vger.kernel.org" , "linux-arm-kernel@lists.infradead.org" , "linux-omap@vger.kernel.org" , "linux-s390@vger.kernel.org" , Ido Schimmel Subject: Re: [PATCH net] net: switchdev: zero-initialize struct switchdev_notifier_fdb_info emitted by drivers towards the bridge Thread-Topic: [PATCH net] net: switchdev: zero-initialize struct switchdev_notifier_fdb_info emitted by drivers towards the bridge Thread-Index: AQHXjSAoM5FylMZBM0itAyPu8B/6WKtsTdGAgAAX6QA= Date: Tue, 10 Aug 2021 08:16:17 +0000 Message-ID: <20210810081616.wjx6jnlh3qxqsfm2@skbuf> References: <20210809131152.509092-1-vladimir.oltean@nxp.com> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: kernel.org; dkim=none (message not signed) header.d=none;kernel.org; dmarc=none action=none header.from=nxp.com; x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: e81c2070-3f94-4d74-7103-08d95bd720c9 x-ms-traffictypediagnostic: VI1PR0401MB2302: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:3968; x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: B7WVhOSYM0UQoRsrt/BCfUGbZAay8Ve203WZLLQiMJkJ1taAaqsjZIaiPtegrm05a80UASP4zN6gca5LCVIF5s+3dLV7Jmsq/tXZDKYOy2XTOhWEQOktPrfU+Ogqn5btMilc8waBcxjs0Xd68QHMCbaWGYAc9XpgSBVlRJ4pbPmSsAHwIB4/Fqm1/KXDLgZPxXgQy5B8YtJqMX0OCV1AHMmce/OEeI/22OrQIqshAqxjI9pa56mNhN7hgXQtK4uaHw8RXEqZI/JHzaJMGjI73yj2qvzYMqIilTeq7tSpRVYsDeElQ/XOFVv1HEHmC3wTmu2+x9VhrhoENNVBj4EKNhKOdMYza0aEM8wcWZlZC6xulDgANl5qqEDeamQdkRQbN2xTRhdDDY7OMdgx+cJIUTeztO6OBS8EQUHJV/+mtDDClNPRU6TpY91nk8V/bjIcrc4RRQm9NPb0WaJnFljW/NrtpQxGOqq0loZpZos0fYU697Uw18no72KBC7p1V+Mq0EUXG78XAeWYm5EbnBZxNEQc4c+uZQ7TXZxVl4CUgYwhO6mYDtVjUUxPL0nESm2bJ/jKeWycr2KtZIKEaTqTDoBubGyRboJ/cLN9GNb3nbwmelGLwcUAZmQ5H7vT6mhCqMsMnPf7Ubn1HOIETpQBGHj+D7TE7vPxRZjJCYEyV25IzFNyOm4EXLBUEz2F0f8GxnVfn2UTKxWxtEVOdG/FrpZXYgmtbOypEMm0pI2YizK5jbPZcC94GNFFYv/wru6B6MB82dQDOIQBa93qQiFKls25iV+IyEaRwc7bNABtKkY= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:VI1PR04MB5136.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(7916004)(4636009)(366004)(6486002)(4744005)(1076003)(316002)(4326008)(33716001)(71200400001)(6506007)(91956017)(44832011)(8676002)(76116006)(186003)(38100700002)(54906003)(5660300002)(966005)(66446008)(66556008)(66476007)(64756008)(7406005)(66946007)(8936002)(6512007)(7416002)(9686003)(6916009)(86362001)(508600001)(2906002)(38070700005)(26005)(122000001);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?us-ascii?Q?pWHW2jok8rYbQApHKaUuSd+fmQO7xlazRyVz85dwUxe7CV/UyQIWabz6/+o0?= =?us-ascii?Q?TIFopdW53XSStQJ1tfkiY+FoZ1vUlFjV1wYj/mHseD1rxfGX3Yd9OBqeVZ36?= =?us-ascii?Q?2IIyXqBQsej4n2L4tdbI8b3C2V3kAJKGD/Lp37vv/sESCMx5R8mLuA1gmf6B?= =?us-ascii?Q?fvPBgzB6RWat/qiW9rWUGOH+HhjLk68jCoRRbeVxOV7TBg7Rr/rF2MnSM7IW?= =?us-ascii?Q?lnQFKlipgFodmY0vzftY60Wj5iSBrYxiRL6JvGJa+IE+0kNjuhwmmNdm1g72?= =?us-ascii?Q?ZCQNO6CDXKY15WVD1Lff8w1DpCHRyif7cUeLu4cTzrseRbgGZls70UezpHRr?= =?us-ascii?Q?E3cA7fQbIe93bD9YNg0G7aKjh7YWmBTFVWJ5HMl+5G1ziPsNJRKg5hCdQ1+G?= =?us-ascii?Q?UYkFdzOoYLdKn9lv5OOP8hr0qN0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v+a/r7q38tkFO8D5UBk5t?= x-ms-exchange-transport-forked: True Content-Type: text/plain; charset="us-ascii" Content-ID: <62A1A85FC8707541AD9E1BAF0D1C4E80@eurprd04.prod.outlook.com> Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: VI1PR04MB5136.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: e81c2070-3f94-4d74-7103-08d95bd720c9 X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Aug 2021 08:16:17.5045 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: 4i054VArNdPxzoum9GcIiHfwo5qM58OwOrKfIePjxfro1H7mB8fCuoWNLzy2rwNTUTnEU383Xzw05eFQebOxdw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: VI1PR0401MB2302 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Leon, On Tue, Aug 10, 2021 at 09:50:41AM +0300, Leon Romanovsky wrote: > > + memset(&send_info, 0, sizeof(send_info)); >=20 > This can be written simpler. > struct switchdev_notifier_fdb_info send_info =3D {}; >=20 > In all places. Because the structure contains a sub-structure, I believe that a compound literal initializer would require additional braces for the initialization of its sub-objects too. At least I know that expressions like that have attracted the attention of clang people in the past: https://patchwork.ozlabs.org/project/netdev/patch/20190506202447.30907-1-na= techancellor@gmail.com/ So I went for the 'unambiguous' path.=