Re: [PATCH v3 1/1] s390/uv: Rename find_secret() to uv_find_secret() and publish

Heiko Carstens
2025-04-01T14:58:55Z

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.