[PATCH] dmi: dmicheck: constify array dmi_used_by_kernel_table

Colin King colin.king at canonical.com
Mon Sep 4 13:00:41 UTC 2017


From: Colin Ian King <colin.king at canonical.com>

The array dmi_used_by_kernel_table is static and read-only so also
make it const

Signed-off-by: Colin Ian King <colin.king at canonical.com>
---
 src/dmi/dmicheck/dmicheck.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/dmi/dmicheck/dmicheck.c b/src/dmi/dmicheck/dmicheck.c
index 20f28b17..61c6b816 100644
--- a/src/dmi/dmicheck/dmicheck.c
+++ b/src/dmi/dmicheck/dmicheck.c
@@ -264,7 +264,7 @@ static const fwts_dmi_version dmi_versions[] = {
  *  we care that work,
  *	see drivers/firmware/dmi_scan.c, dmi_decode()
  */
-static fwts_dmi_used_by_kernel dmi_used_by_kernel_table[] = {
+static const fwts_dmi_used_by_kernel dmi_used_by_kernel_table[] = {
 	/* Type 0 BIOS Information fields */
 	{ 0, 4 },
 	{ 0, 5 },
-- 
2.14.1




More information about the fwts-devel mailing list