[PATCH] nvme: Staticize and constify driver ops
Neil Armstrong
neil.armstrong at linaro.org
Tue May 19 11:43:32 CEST 2026
On 5/8/26 14:21, Marek Vasut wrote:
> Set the ops structure as static const. The structure is not accessible
> from outside of this driver and is not going to be modified at runtime.
>
> Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
> ---
> Cc: Bin Meng <bmeng.cn at gmail.com>
> Cc: Tom Rini <trini at konsulko.com>
> Cc: u-boot at lists.denx.de
> ---
> drivers/nvme/nvme-uclass.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/nvme/nvme-uclass.c b/drivers/nvme/nvme-uclass.c
> index 44c88ad27f3..4ab9567450f 100644
> --- a/drivers/nvme/nvme-uclass.c
> +++ b/drivers/nvme/nvme-uclass.c
> @@ -44,7 +44,7 @@ UCLASS_DRIVER(nvme) = {
> .id = UCLASS_NVME,
> };
>
> -struct bootdev_ops nvme_bootdev_ops = {
> +static const struct bootdev_ops nvme_bootdev_ops = {
> };
>
> static const struct udevice_id nvme_bootdev_ids[] = {
Reviewed-by: Neil Armstrong <neil.armstrong at linaro.org>
Thanks,
Neil
More information about the U-Boot
mailing list