Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp223687pxb; Mon, 13 Sep 2021 17:36:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwhQM9FvOoQcZcxW33KjX01+fNMTFJYdaBVBVwjQlZ7g2iKKlr5RZisMyLSoAb62DwUquVr X-Received: by 2002:a05:6402:697:: with SMTP id f23mr15778666edy.253.1631579769113; Mon, 13 Sep 2021 17:36:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631579769; cv=none; d=google.com; s=arc-20160816; b=bwqmjsIwiVCYojUZkLL6SkDIBq4wLFuNVAV2nbgg3Vfjv9TslvvW4eMGJItsclipJP 8d8m6LgtbUwIHVSiEsQ6vzfx+U9kcdYchPNiZd1laxFFjwG28vGtbQandZSD/Z+JD9aF IgWgDddn331FFAdns94Dr90ku55SORm9iEOoIKxs/JJ9bVRD3P6DfU+4SuPorqq7Kg/t COIU+PeLdQBKbokOQmTOBaz5dHdaHs68SMNPhAXjNl6tTvqWdbS4v+IYAZXnDsuW1t0B x8ty9aB6fUx+IMgWpuVB71pc1nl6Z0g7Bu/bdBsr6NUozQ7GN5y2gXMOI5ruJl5UakSl XfpQ== 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=Z/1KhI7RuWihiHIrUkM/MbnKZT6jSHsn+8Hw4S8Q658=; b=DYVby69VLXCMFTqOWK9X+PKyx2nJYEdYEA4uGMWWVKQiBcdrzZNmIzMHZ4xcIB3IOA lLTh6hg3X/pBMAp1OtQhuS7Re+a74EZ+ctgCT7mrf3al+glHRLREz6AtWMlaIJVuN1p9 oXIRu7t/iEEyvfpZocR/HmHsHqtgvE+8TKOVgY7y44RSzDZmOkUuL43WzEYvuwr6u+fl bwtiArK7powkMVLrOuIIp1vQz68z7cxiA8jzO1qHaFEjAytB1gcG2BJlxAi9jy4Os288 r5iiVlTL8CSn8640IPrA1PIsPff2kmcbWMC6yerVxDjIy5TEhzbXT/usiC71Nt181Htd OrbA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linuxfoundation.org header.s=korg header.b=xqh1f+LR; 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 q17si9995371edd.631.2021.09.13.17.35.43; Mon, 13 Sep 2021 17:36:09 -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=xqh1f+LR; 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 S243403AbhIMOnj (ORCPT + 99 others); Mon, 13 Sep 2021 10:43:39 -0400 Received: from mail.kernel.org ([198.145.29.99]:56444 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1344700AbhIMOiQ (ORCPT ); Mon, 13 Sep 2021 10:38:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E76C161BFA; Mon, 13 Sep 2021 13:54:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=linuxfoundation.org; s=korg; t=1631541296; bh=1KxslZDYSzRSDVoMzpoXv6DNjpDe7gVNaxhtbnTnN0Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xqh1f+LR5ozP0+YGpZ0f4W3LAh+JZgNLcD0Ivk54CT2x/OlTZciR4GXw/EHuZS+Mn KbsICeg/kAJ+gErOD9CjoY8cFiFeU+Rqz0mRZHhoOttwPsVsaQQEQryDq2Su8reIJ9 RR3kYcRP9CM6v/+xVBAPBN/IKc9UhC8FGEKotVZ4= 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.14 209/334] devlink: Clear whole devlink_flash_notify struct Date: Mon, 13 Sep 2021 15:14:23 +0200 Message-Id: <20210913131120.485128665@linuxfoundation.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210913131113.390368911@linuxfoundation.org> References: <20210913131113.390368911@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 3963b1bc1e59..5a85a7b0feb2 100644 --- a/net/core/devlink.c +++ b/net/core/devlink.c @@ -4125,7 +4125,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, @@ -4134,7 +4134,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