]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
nvme: Staticize and constify driver ops
authorMarek Vasut <marek.vasut+renesas@mailbox.org>
Fri, 8 May 2026 12:21:21 +0000 (14:21 +0200)
committerNeil Armstrong <neil.armstrong@linaro.org>
Wed, 20 May 2026 07:44:37 +0000 (09:44 +0200)
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@mailbox.org>
Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://patch.msgid.link/20260508122128.512798-1-marek.vasut+renesas@mailbox.org
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
drivers/nvme/nvme-uclass.c

index 44c88ad27f3e20d70162b52a31356e1452e7dfd3..4ab9567450fd4d178215368b309b28d2c2fe9bf6 100644 (file)
@@ -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[] = {