Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp67437pxb; Mon, 13 Sep 2021 13:07:58 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwXyy0F17EGIy65TLxSGB/uGEvcAK4IG2DftlP+Fu4YYOaipBiDVDsMEd21ScWktGYUSCja X-Received: by 2002:a17:906:f24d:: with SMTP id gy13mr14395767ejb.395.1631563677907; Mon, 13 Sep 2021 13:07:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631563677; cv=none; d=google.com; s=arc-20160816; b=BVMTYZ4tmTSeR+PfBKom4Aatvtu7YInVtPHNNTKjnySrdLmAcqg8axkxT4TaKYCnzs ehQCSB8P+JpOyJOwLgWCdkv2pjlhTgv89NmaYqp+nQyCEHdTb1su3By3DFlkPQX6MUZQ eOSwp2jCZAx3BKtWKkK691Zp+Aewknc2jZFsFagirBAYjJ0+a2SDWqqzQto1ATsDmkZw I3JIUsV/ytlGYW6ZHNAZke0Cc0ATaZAIj6gD2m59xLS/qXcehL/7ajVIYJfbjuiAcGu4 GLvUrX0lIxQ14q/8xzG/ICt8tZ6GOk0wag+HjAt8fbewuzAJGrR8xOBpqNFp5n7wCqTT vPFw== 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=DBkfGpgefXwLywmIzJS6L1wIQB+2iq++LFO0SqVKKuw=; b=1IJT1Jv2ssVkmNQbCsVKZbuHr0r/XMivNw+l4vnQ6Dln7o7rbm6tmsBjETMPFRdl2x N9wQeZXyP6Fj8DCJQIzX04tPhN9rlW/abSWkyp2/t7jYhKHwGzopBzcUGhduyQiSq5VG 0RSv+rKxnZLhVo762c9fOxxTOdiPchJYFXdB7MZD8/cxGLOnNgxQ7Gja0yZ4lnVoNZBW rG9Y6bixS/uifN6qN8c3k47EVBsa+ruEk8JBS9o6py0LVGe/jPfQQyvgIthJ6vARBYpV EU/eb1QyO8uDTHLJ16+JwhqKIlZoY8HKFq7u0ivT3q+xFWappVWlEZAYQU8wOhbODeYI 4qmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=tHfbV9Ss; 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 d11si8705484edj.442.2021.09.13.13.07.33; Mon, 13 Sep 2021 13:07:57 -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=tHfbV9Ss; 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 S242364AbhIMNqS (ORCPT + 99 others); Mon, 13 Sep 2021 09:46:18 -0400 Received: from mail.kernel.org ([198.145.29.99]:44480 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242653AbhIMNku (ORCPT ); Mon, 13 Sep 2021 09:40:50 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id A1906613D3; Mon, 13 Sep 2021 13:29:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631539774; bh=jpXnv+lOz7CF+EqMTV8TeBztP/jhrnZ8CpsUG2v5lOg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=tHfbV9SszmFXcpRWcbboB2drLC3PoqbBL4bSykpOWL6dJ0i6xK7+ubt9jhO4lBDUV CpFkxqDHTEIeR8zIZFCLCrOvZkyq+Z2EEq2P569DkVnJ9cZg9yaYUXAvaypbDwsD9J jqOHPQ+/NgJJ5LDhE34XrD3/XdfXj+D29PGAu8zY= 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.10 155/236] devlink: Clear whole devlink_flash_notify struct Date: Mon, 13 Sep 2021 15:14:20 +0200 Message-Id: <20210913131105.654865069@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131100.316353015@linuxfoundation.org> References: <20210913131100.316353015@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 6cc8c64ed62a..96cf4bc1f958 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -3403,7 +3403,7 @@ out_free_msg: 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, @@ -3413,7 +3413,7 @@ EXPORT_SYMBOL_GPL(devlink_flash_update_begin_notify); 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