Received: by 2002:a89:48b:0:b0:1f5:f2ab:c469 with SMTP id a11csp675562lqd; Wed, 24 Apr 2024 13:26:47 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWqTGcjMb21UwHRY5mdey2cJg3S+UUy8MaFgWulwoBn9yBNI+V6zbicdzt77D+wsscHf3ySR3stHfYD4sZy/xZsVGC0QGCF9oXPfN4tDA== X-Google-Smtp-Source: AGHT+IEOehhru/u+WT6GUUrFshMgBmRZrH3fnoUnNsXJ3nbyT6ebETxujJxrbzbE4hNz/b3Sc9Fv X-Received: by 2002:a05:6870:158c:b0:220:a138:f59f with SMTP id j12-20020a056870158c00b00220a138f59fmr3807731oab.31.1713990407118; Wed, 24 Apr 2024 13:26:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1713990407; cv=pass; d=google.com; s=arc-20160816; b=RyMstuvMSbsoQznOF71HFzZwU3mAC8HZDQ7EHNRe98Pz39fcC0gPNhWehep2q85LX+ e6b+BhMtxUPCGeayVAyUSw24d5vKInnEoWECazuKCdq4+lrowGUWoh55wVWFMywMXQpn +3k5pC1S2uMFU5nhUPW2URhkyDabauQDWvXlfizGqsZKN7v+vYVH2lbcPzttl3Krxa+K ZwDQS6FR/miyCKAS5H5uWNXgF0Lq2ljevfJxsTvbxdOtwSyGc5rXqnfqnbq7uT9iOrpA ojpPjVQAgLWBsf68w7MErRqrry7ztCYcl3dVU+/7+sN3ftoPBEa34wCLPi2ln45+KiY5 ISIQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:date:message-id; bh=VCOZ5fFtY2aVLaMx5+QrStPL36lvYPPTa7bl/SsIyiQ=; fh=jKxM2EUJqL5B2c5syas9ZEAfQ1a6RcUeJf4+qoBrTW4=; b=j/G2o+cTBFMyse/IMTo/jbHtW8L1P/H4qNl+Z+/IAJ6ArOrYMwedMZsDV7mATY35ra +BYyoyCOFlkW3Gw+Qgl35Z7YWf7inmvTW+OlQ1WhfxJMUZEHVgQjgeaZV0ffAAbA0n31 YFETDHYAo7VdRVKDhDavupV4eVn3v6qLiTq8faswXHAjsMZvqKDEX7AOCb30EU7zTLpx P0lTqs/iwr4wMlUMIZ9FvLdX6Yj82lkkQc2vodEsHRokpVnjQJkTi78CsPOgGLVyow6p 5vmyCXjAoXLObMiHS977HTT889+VuC2XjZgRTJPoMWsGoP4PC4hLxgO4+N9gCJvjxcD4 hOIQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; arc=pass (i=1 spf=pass spfdomain=ghiti.fr); spf=pass (google.com: domain of linux-kernel+bounces-157684-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157684-linux.lists.archive=gmail.com@vger.kernel.org" Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id i123-20020a636d81000000b005f7fdc194f5si9580309pgc.118.2024.04.24.13.26.46 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Apr 2024 13:26:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-157684-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; arc=pass (i=1 spf=pass spfdomain=ghiti.fr); spf=pass (google.com: domain of linux-kernel+bounces-157684-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-157684-linux.lists.archive=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id BA1292872C5 for ; Wed, 24 Apr 2024 20:26:46 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E17941420A8; Wed, 24 Apr 2024 20:26:41 +0000 (UTC) Received: from relay7-d.mail.gandi.net (relay7-d.mail.gandi.net [217.70.183.200]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 86DA713C9C8 for ; Wed, 24 Apr 2024 20:26:39 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.70.183.200 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713990401; cv=none; b=YrTysMmwUQA02HKcAticbhnQBlFsyblMXE0cWBFxC+QPOj0s2S/fc5xcNagjfWcfNvZuvf0VyBwMyvyAsyqB77Xy8wX6FXw4RlDg1losN4cIjYZ7RWrrTno+ivHwUT25Kue5G4CLnkUNxB4o/RqpqrefQxAiwA5uzP2VgMDzVx4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713990401; c=relaxed/simple; bh=TurauYeb3cnp03IZkMuKWLmSx568+RI1c15xqqCBVJo=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=P6n1u0MNljw5pKpDjgQPpZypfdTVBOkKLyVafL/uEE5v07k6Wr0MVAb21eJXnj0Cf1J0In7rFD896E8ZREvNu9NgeitC8O1Gh3DjuIJxX+Nb9GCxR7dJKoXmdTcEeo5yug1ySSWR0s9s5eCS2Q5FjukRv9V0RylOP87HJ8zCF6M= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr; spf=pass smtp.mailfrom=ghiti.fr; arc=none smtp.client-ip=217.70.183.200 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=ghiti.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=ghiti.fr Received: by mail.gandi.net (Postfix) with ESMTPSA id F2F6120003; Wed, 24 Apr 2024 20:26:35 +0000 (UTC) Message-ID: <46925bcd-ad92-4c02-90f3-11da5c627391@ghiti.fr> Date: Wed, 24 Apr 2024 22:26:35 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH v1 2/5] firmware: microchip: don't unconditionally print validation success Content-Language: en-US To: Conor Dooley , linux-riscv@lists.infradead.org Cc: Conor Dooley , Daire McNamara , Cyril Jean , linux-kernel@vger.kernel.org References: <20240410-opulently-epic-8654bdac3422@spud> <20240410-throwing-sandworm-7d03e4e2f4e8@spud> From: Alexandre Ghiti In-Reply-To: <20240410-throwing-sandworm-7d03e4e2f4e8@spud> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-GND-Sasl: alex@ghiti.fr Hi Conor, On 10/04/2024 13:58, Conor Dooley wrote: > From: Conor Dooley > > If validation fails, both prints are made. Skip the success one in the > failure case. > > Fixes: ec5b0f1193ad ("firmware: microchip: add PolarFire SoC Auto Update support") > Signed-off-by: Conor Dooley > --- > drivers/firmware/microchip/mpfs-auto-update.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/firmware/microchip/mpfs-auto-update.c b/drivers/firmware/microchip/mpfs-auto-update.c > index 33343e83373c..298ad21e139b 100644 > --- a/drivers/firmware/microchip/mpfs-auto-update.c > +++ b/drivers/firmware/microchip/mpfs-auto-update.c > @@ -218,10 +218,12 @@ static int mpfs_auto_update_verify_image(struct fw_upload *fw_uploader) > if (ret | response->resp_status) { > dev_warn(priv->dev, "Verification of Upgrade Image failed!\n"); > ret = ret ? ret : -EBADMSG; > + goto free_message; > } > > dev_info(priv->dev, "Verification of Upgrade Image passed!\n"); > > +free_message: > devm_kfree(priv->dev, message); > free_response: > devm_kfree(priv->dev, response); This should go into -fixes, but not sure if you take care of this or if Palmer should, please let me know so that I can remove this from my list :) Thanks, Alex