public inbox for linux-s390@vger.kernel.org
 help / color / mirror / Atom feed
From: Heiko Carstens <hca@linux.ibm.com>
To: Harald Freudenberger <freude@linux.ibm.com>
Cc: seiden@linux.ibm.com, borntraeger@linux.ibm.com,
	frankja@linux.ibm.com, imbrenda@linux.ibm.com,
	linux-s390@vger.kernel.org
Subject: Re: [PATCH v3 1/1] s390/uv: Rename find_secret() to uv_find_secret() and publish
Date: Tue, 1 Apr 2025 16:58:48 +0200	[thread overview]
Message-ID: <20250401145848.7691Gae-hca@linux.ibm.com> (raw)
In-Reply-To: <20250401134331.50421-2-freude@linux.ibm.com>

On Tue, Apr 01, 2025 at 03:43:31PM +0200, Harald Freudenberger wrote:
> -static int find_secret(const u8 secret_id[UV_SECRET_ID_LEN],
> -		       struct uv_secret_list *list,
> -		       struct uv_secret_list_item_hdr *secret)
> +int uv_find_secret(const u8 secret_id[UV_SECRET_ID_LEN],
> +		   struct uv_secret_list *list,
> +		   struct uv_secret_list_item_hdr *secret)
>  {
>  	u16 start_idx = 0;
>  	u16 list_rc;
>  	int ret;
>  
> +	if (!list)
> +		return -ENOMEM;
> +

Without this sanity check, please. Callers really should know what
they are doing. Besides that looks good to me.

      reply	other threads:[~2025-04-01 14:58 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01 13:43 [PATCH v3 0/1] Remove the need to alloc memory in uv.c Harald Freudenberger
2025-04-01 13:43 ` [PATCH v3 1/1] s390/uv: Rename find_secret() to uv_find_secret() and publish Harald Freudenberger
2025-04-01 14:58   ` Heiko Carstens [this message]

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=20250401145848.7691Gae-hca@linux.ibm.com \
    --to=hca@linux.ibm.com \
    --cc=borntraeger@linux.ibm.com \
    --cc=frankja@linux.ibm.com \
    --cc=freude@linux.ibm.com \
    --cc=imbrenda@linux.ibm.com \
    --cc=linux-s390@vger.kernel.org \
    --cc=seiden@linux.ibm.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