Received: by 2002:a05:6a10:6d25:0:0:0:0 with SMTP id gq37csp1869147pxb; Mon, 13 Sep 2021 07:15:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyAWBOiwb7QnwWbmAF0TVB+EN+31CMSDDPpffnCXbmGlHqy+pPo4o85+ED/FOpuZ5SijoPH X-Received: by 2002:aa7:c998:: with SMTP id c24mr9703091edt.158.1631542511471; Mon, 13 Sep 2021 07:15:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631542511; cv=none; d=google.com; s=arc-20160816; b=f8tYnSzyCC4wXuFTXWVyWBcWeZAlJzni3PNzyXSck4mzQ08knwc/Kyvl9THZTyGXnc hdWiJhRPqDgqCdBtw2E9twhMiFCac8zFxWczvS/H79/rOKeQMmhS4X1H8SW2lJeZ/xxg OfHrhmbwz6g+fM1WyT6MEcp3gOddjYQQ52xFPTZf0ZNqXeTXkEdAOVbwHFZu1DDjt3vU yOYEMnXvLLuavvOZqUc7DTga88RJr+eOKx6nDX4TlNvtw8TP48X9RZtiuGGpaJsKMuDK qobSDE+ICAEK6Ejm9gXgsKpp6LDbV2WSzaiq0SfKhMBnwzFehqhGYywHqUVcouImIPJ1 D5gA== 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 :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=kAztDrTnix1vDTCJtdGVeThJ4UW8ACqUQDv8oXJAbLI=; b=f67GjFFTuA3aca0H8pthGVjDZ2Sk2sRbGdL/uJj1a183DxxYCIKD/AdvWT3VWbEE4U JLAmXOteqMyPQXSWZ3vRUphXNk/5OwkEe4Q9K6zJAiX1gb6XZM9BPn5B10my6QZx71nY ZIiRFKxylWXEPhyGwd0V7AuuYw712mIT7/zPYcXQ4YbDuNnbDv85NdDLrCzilQW5axQa e+O2kZSfqctLoWJMOduA9uJh2U5b1EdiUrQvKFe53Fp67j2JURQQ6RwjB4hu8cy/jZJk byqrvr4ZjEXIKFibcRwVfR2azVN9MZr6BBveCYCh0+x7Hrj5uyTlI67FcOc37kQm8qlf BOrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=bc9SiK7o; 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=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j7si6720279edw.370.2021.09.13.07.14.46; Mon, 13 Sep 2021 07:15:11 -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=@linuxfoundation.org header.s=korg header.b=bc9SiK7o; 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=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1344496AbhIMOLa (ORCPT + 99 others); Mon, 13 Sep 2021 10:11:30 -0400 Received: from mail.kernel.org ([198.145.29.99]:56004 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S244603AbhIMOHN (ORCPT ); Mon, 13 Sep 2021 10:07:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id CE8C661A80; Mon, 13 Sep 2021 13:40:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631540428; bh=1TmjPFWzP7rpVCua5cfpuecarH08NjizhvN5yZtrNh0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bc9SiK7oZjqlr2ZBpqggyCV0rkcsqkSEWatzeoTTOMr4zt+1/THSOW/0Hi5Z1LlT2 +l/HjBjxKWA9UOsJ+PtKFdIIxUuGeWFiWWzLXELGxivVBC+zRvcrADxGhRy3k3UlOW PiNg2G2pN8G5LS6ZExsSr33LSgK4aRDO9wA5jzlk= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Leon Romanovsky , "David S. Miller" , Sasha Levin Subject: [PATCH 5.13 188/300] devlink: Clear whole devlink_flash_notify struct Date: Mon, 13 Sep 2021 15:14:09 +0200 Message-Id: <20210913131115.738586762@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131109.253835823@linuxfoundation.org> References: <20210913131109.253835823@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leon Romanovsky [ Upstream commit ed43fbac717882165a2a4bd64f7b1f56f7467bb7 ] 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 Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- 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 170e44f5e7df..5d01bebffaca 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -3607,7 +3607,7 @@ out_free_msg: 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, @@ -3616,7 +3616,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.30.2