[PATCH 2/3] ata: bootstd: Staticize and constify driver ops

Simon Glass sjg at chromium.org
Fri May 8 18:41:42 CEST 2026


Hi Marek,

On 2026-05-07T16:42:06, Marek Vasut <marek.vasut+renesas at mailbox.org> wrote:
> ata: bootstd: Staticize and constify driver ops
>
> 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>
>
> drivers/ata/sata_bootdev.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)

> diff --git a/drivers/ata/sata_bootdev.c b/drivers/ata/sata_bootdev.c
> @@ -37,7 +37,7 @@ static int sata_bootdev_hunt(struct bootdev_hunter *info, bool show)
>       return 0;
>  }
>
> -struct bootdev_ops sata_bootdev_ops = {
> +static const struct bootdev_ops sata_bootdev_ops = {
>  };

Perhaps use 'ata: sata_bootdev:' for the subject, to match the other
two patches.

Reviewed-by: Simon Glass <sjg at chromium.org>

Regards,
Simon


More information about the U-Boot mailing list