mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tom Lendacky <thomas.lendacky@amd.com>
To: Qianfeng Rong <rongqianfeng@vivo.com>,
	Ashish Kalra <ashish.kalra@amd.com>,
	John Allen <john.allen@amd.com>,
	Herbert Xu <herbert@gondor.apana.org.au>,
	"David S. Miller" <davem@davemloft.net>,
	"open list:AMD CRYPTOGRAPHIC COPROCESSOR (CCP) DRIVER - SE..."
	<linux-crypto@vger.kernel.org>,
	open list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 1/3] crypto: ccp - Use int type to store negative error codes
Date: Mon, 8 Sep 2025 11:00:48 -0500	[thread overview]
Message-ID: <cdd5f593-0ed7-099e-1a72-9a190edbf02c@amd.com> (raw)
In-Reply-To: <20250903132539.416439-2-rongqianfeng@vivo.com>

On 9/3/25 08:25, Qianfeng Rong wrote:
> Change the 'ret' variable in __sev_do_cmd_locked() from unsigned int to
> int, as it needs to store negative error codes.
> 
> No effect on runtime.
> 
> Signed-off-by: Qianfeng Rong <rongqianfeng@vivo.com>

Acked-by: Tom Lendacky <thomas.lendacky@amd.com>

Not sure it needs to be initialized either, but not worth changing that
as part of this patch.

> ---
>  drivers/crypto/ccp/sev-dev.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/crypto/ccp/sev-dev.c b/drivers/crypto/ccp/sev-dev.c
> index 4f000dc2e639..6c116f6f9b79 100644
> --- a/drivers/crypto/ccp/sev-dev.c
> +++ b/drivers/crypto/ccp/sev-dev.c
> @@ -848,9 +848,10 @@ static int __sev_do_cmd_locked(int cmd, void *data, int *psp_ret)
>  	struct sev_device *sev;
>  	unsigned int cmdbuff_hi, cmdbuff_lo;
>  	unsigned int phys_lsb, phys_msb;
> -	unsigned int reg, ret = 0;
> +	unsigned int reg;
>  	void *cmd_buf;
>  	int buf_len;
> +	int ret = 0;
>  
>  	if (!psp || !psp->sev_data)
>  		return -ENODEV;

  reply	other threads:[~2025-09-08 16:00 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-03 13:25 [PATCH 0/3] crypto: " Qianfeng Rong
2025-09-03 13:25 ` [PATCH 1/3] crypto: ccp - " Qianfeng Rong
2025-09-08 16:00   ` Tom Lendacky [this message]
2025-09-03 13:25 ` [PATCH 2/3] crypto: hisilicon/sec " Qianfeng Rong
2025-09-03 13:25 ` [PATCH 3/3] crypto: tegra " Qianfeng Rong
2025-09-13  4:27 ` [PATCH 0/3] crypto: " Herbert Xu

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=cdd5f593-0ed7-099e-1a72-9a190edbf02c@amd.com \
    --to=thomas.lendacky@amd.com \
    --cc=ashish.kalra@amd.com \
    --cc=davem@davemloft.net \
    --cc=herbert@gondor.apana.org.au \
    --cc=john.allen@amd.com \
    --cc=linux-crypto@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rongqianfeng@vivo.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®