Received: by 2002:a05:6a10:c7d3:0:0:0:0 with SMTP id h19csp142412pxy; Sat, 14 Aug 2021 03:00:03 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxhRtP3qre5tZ73Us0RTomTW8nTDwRAk6BNvjdmPWrXDqUnpe9C3Uxg0s3P3fYykHWL1ekB X-Received: by 2002:a17:906:a044:: with SMTP id bg4mr6806849ejb.312.1628935202884; Sat, 14 Aug 2021 03:00:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1628935202; cv=none; d=google.com; s=arc-20160816; b=kt68Lo12MAGQVjl3H2JljlgrgEFFCOLAktZJevHui+vE6REI6i/3/aO6i+IPO+4WSp geJbqgBrl5x1zM0PFuktrJRdUZisdDIBsQ/IxaREfHkza4TjWN+neANybbwhmIA0zJMr 0bIkRenwzVKEh3gJ6UzjKdWGkFfBlO3omdA8svXKXiF1p5HOOHpNntnHeTdIz3tApogk 9O/AtBerSDNIv+q5NTLdpzLRPMubPP3WJsBGFscMgL/ta6bO1qtBtdd87oOq27DV/mpy xRDSzzqHZkHJdH4Xon+DcjzJcsiXFVorlUExovxOXf2NcFI98Sj0xj4qktZG2JOAtjm5 tS8w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=U8VQmbozB+PhvpC4snauM7F4f4m6TYi4gDsdzxwyJlw=; b=WRt0zOPnJtGXLtRqyRttHq7st515cnNvYVBLqx6HO2l5eGmHD7ouJDUbP+dM0Ls1TX 3qAsccsCkFKK/sXrQyjuxpzZlWL2skwDbywZSukKZYk4Ep53t6uEGmFlNOrgQYdZfIyK wAxeH8EzJIzKji9fzykCk3StRsZjGct1pA1B0xIfqLBorrX67Fd6W1Wc8CkwYDxETXg7 +DbsZW7UlB6Pj8O55Eav1y9H6mmfEVPi1Y0/l7IKR8XhAs1zE8tfBTLDmWDyy0zsvBXD ANThCpmX6kpjsBtsr/4RjQY0IoktXHsOYnfZWHvDAy4vCHetdZJKSA/mdc9ss7ZMVl8c L+lw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=ttBpJ8uc; 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=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id z10si4046940eje.713.2021.08.14.02.59.39; Sat, 14 Aug 2021 03:00:02 -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=@kernel.org header.s=k20201202 header.b=ttBpJ8uc; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237933AbhHNJ6Y (ORCPT + 99 others); Sat, 14 Aug 2021 05:58:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:37794 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238028AbhHNJ6U (ORCPT ); Sat, 14 Aug 2021 05:58:20 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 4806D60E93; Sat, 14 Aug 2021 09:57:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1628935072; bh=G10PfifuW7zSncaUKdKeC95zgBDC68Nv+v9qApbeRGU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=ttBpJ8ucPiNLEAKZUjRroaI0VapCGRxsmkRRVOVQzgs5Kd2UVK1LeSwX7ZPuy6WP+ p79MhJB0ewWtKH/lNBh09mnn+YWkrzUguhKXMaopjByW+t3ao7HK9yhVt8+b9D+63W esc0+4+wzWsCMS89p8Wth96VF0VViMWmVTR7HIECHTj6U9VyGFjGvO01lLpiiLk+m8 9B5O6OWZsFGWhak7wdp7U4vm26fpk4ZInT0EWxt1giRxTITQiMakd+krix7MOX3/py lBrYl4g4Ciuov//g7SLzSe6ek4779KvMlWn6VfDKET9shZEKAfZzsydek9gb5CHomt u2vw+9+FASqkg== From: Leon Romanovsky To: "David S . Miller" , Jakub Kicinski Cc: Leon Romanovsky , Guangbin Huang , Jacob Keller , Jiri Pirko , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Salil Mehta , Shannon Nelson , Yisen Zhuang , Yufeng Mo Subject: [PATCH net-next 5/6] devlink: Clear whole devlink_flash_notify struct Date: Sat, 14 Aug 2021 12:57:30 +0300 Message-Id: X-Mailer: git-send-email 2.31.1 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leon Romanovsky The { 0 } doesn't clear all fields in the struct, but tells to the compiler to set all fields to zero and doesn't touch any sub-fields if they exists. The {} is an empty initialiser that instructs to fully initialize whole struct including sub-fields, which is error-prone for future devlink_flash_notify extensions. Fixes: 6700acc5f1fe ("devlink: collect flash notify params into a struct") Signed-off-by: Leon Romanovsky --- net/core/devlink.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/net/core/devlink.c b/net/core/devlink.c index d218f57ad8cf..a856ae401ea5 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -4169,7 +4169,7 @@ static void __devlink_flash_update_notify(struct devlink *devlink, static void devlink_flash_update_begin_notify(struct devlink *devlink) { - struct devlink_flash_notify params = { 0 }; + struct devlink_flash_notify params = {}; __devlink_flash_update_notify(devlink, DEVLINK_CMD_FLASH_UPDATE, @@ -4178,7 +4178,7 @@ static void devlink_flash_update_begin_notify(struct devlink *devlink) static void devlink_flash_update_end_notify(struct devlink *devlink) { - struct devlink_flash_notify params = { 0 }; + struct devlink_flash_notify params = {}; __devlink_flash_update_notify(devlink, DEVLINK_CMD_FLASH_UPDATE_END, -- 2.31.1