diff mbox series

[v4,2/5] sf: Use const for the stage name

Message ID 20210919214937.3829422-3-sjg@chromium.org
State Accepted
Commit ad4e0100541eb8a19de00f56bda10be576a7cde6
Delegated to: Simon Glass
Headers show
Series sf: Add documentation and an 'sf mmap' command | expand

Commit Message

Simon Glass Sept. 19, 2021, 9:49 p.m. UTC
This is not updated at runtime so should be marked const. Update the code
accordingly.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

(no changes since v1)

 cmd/sf.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Jagan Teki Oct. 8, 2021, 12:41 p.m. UTC | #1
On Mon, Sep 20, 2021 at 3:19 AM Simon Glass <sjg@chromium.org> wrote:
>
> This is not updated at runtime so should be marked const. Update the code
> accordingly.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
Reviewed-by: Jagan Teki <jagan@amarulasolutions.com>
Heinrich Schuchardt Nov. 13, 2021, 11:15 a.m. UTC | #2
On 9/19/21 23:49, Simon Glass wrote:
> This is not updated at runtime so should be marked const. Update the code
> accordingly.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

> ---
>
> (no changes since v1)
>
>   cmd/sf.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/cmd/sf.c b/cmd/sf.c
> index eac27ed2d77..15361a4bddf 100644
> --- a/cmd/sf.c
> +++ b/cmd/sf.c
> @@ -394,7 +394,7 @@ enum {
>   	STAGE_COUNT,
>   };
>
> -static char *stage_name[STAGE_COUNT] = {
> +static const char *stage_name[STAGE_COUNT] = {
>   	"erase",
>   	"check",
>   	"write",
>
Simon Glass Nov. 24, 2021, 5:47 p.m. UTC | #3
On 9/19/21 23:49, Simon Glass wrote:
> This is not updated at runtime so should be marked const. Update the code
> accordingly.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

> ---
>
> (no changes since v1)
>
>   cmd/sf.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
Applied to u-boot-dm, thanks!
Simon Glass Nov. 24, 2021, 5:47 p.m. UTC | #4
On 9/19/21 23:49, Simon Glass wrote:
> This is not updated at runtime so should be marked const. Update the code
> accordingly.
>
> Signed-off-by: Simon Glass <sjg@chromium.org>

Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

> ---
>
> (no changes since v1)
>
>   cmd/sf.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
Applied to u-boot-dm, thanks!
Applied to u-boot-dm/next, thanks!
diff mbox series

Patch

diff --git a/cmd/sf.c b/cmd/sf.c
index eac27ed2d77..15361a4bddf 100644
--- a/cmd/sf.c
+++ b/cmd/sf.c
@@ -394,7 +394,7 @@  enum {
 	STAGE_COUNT,
 };
 
-static char *stage_name[STAGE_COUNT] = {
+static const char *stage_name[STAGE_COUNT] = {
 	"erase",
 	"check",
 	"write",