diff mbox series

[v4,03/22] log: Add additional const qualifier to arrays

Message ID 20201027235541.706077-4-seanga2@gmail.com
State Accepted
Delegated to: Tom Rini
Headers show
Series log: Add commands for manipulating filters | expand

Commit Message

Sean Anderson Oct. 27, 2020, 11:55 p.m. UTC
Both these arrays and their members are const. Fixes checkpatch complaint.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
---

(no changes since v2)

Changes in v2:
- New

 common/log.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Tom Rini Oct. 30, 2020, 6:46 p.m. UTC | #1
On Tue, Oct 27, 2020 at 07:55:22PM -0400, Sean Anderson wrote:

> Both these arrays and their members are const. Fixes checkpatch complaint.
> 
> Signed-off-by: Sean Anderson <seanga2@gmail.com>
> Reviewed-by: Simon Glass <sjg@chromium.org>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/common/log.c b/common/log.c
index 6aab189a46..8d5d71ccb4 100644
--- a/common/log.c
+++ b/common/log.c
@@ -13,7 +13,7 @@ 
 
 DECLARE_GLOBAL_DATA_PTR;
 
-static const char *log_cat_name[LOGC_COUNT - LOGC_NONE] = {
+static const char *const log_cat_name[LOGC_COUNT - LOGC_NONE] = {
 	"none",
 	"arch",
 	"board",
@@ -28,7 +28,7 @@  static const char *log_cat_name[LOGC_COUNT - LOGC_NONE] = {
 	"acpi",
 };
 
-static const char *log_level_name[LOGL_COUNT] = {
+static const char *const log_level_name[LOGL_COUNT] = {
 	"EMERG",
 	"ALERT",
 	"CRIT",