[OPW,kernel] staging: imx-drm: Fix warning for static const char * array in imx-ldb.c
diff mbox

Message ID 1382820189-7445-1-git-send-email-archanakumari959@gmail.com
State Rejected
Headers show

Commit Message

Archana kumari Oct. 26, 2013, 8:43 p.m. UTC
This patch fixes the warning "static const char * array should
probably be static const char * const" in imx-ldb.c.

Signed-off-by: Archana kumari <archanakumari959@gmail.com>
---
 drivers/staging/imx-drm/imx-ldb.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Waskiewicz Jr, Peter P Oct. 28, 2013, 12:50 a.m. UTC | #1
On Sun, 2013-10-27 at 02:13 +0530, Archana kumari wrote:
> This patch fixes the warning "static const char * array should
> probably be static const char * const" in imx-ldb.c.
> 
> Signed-off-by: Archana kumari <archanakumari959@gmail.com>
> ---
>  drivers/staging/imx-drm/imx-ldb.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/staging/imx-drm/imx-ldb.c b/drivers/staging/imx-drm/imx-ldb.c
> index 926f493..83bce85 100644
> --- a/drivers/staging/imx-drm/imx-ldb.c
> +++ b/drivers/staging/imx-drm/imx-ldb.c
> @@ -416,7 +416,7 @@ enum {
>  	LVDS_BIT_MAP_JEIDA
>  };
>  
> -static const char *imx_ldb_bit_mappings[] = {
> +static const char * const imx_ldb_bit_mappings[] = {

That can't be right.  Did you try test-compiling this?  The extra const
after char * may give you some grief...

>  	[LVDS_BIT_MAP_SPWG]  = "spwg",
>  	[LVDS_BIT_MAP_JEIDA] = "jeida",
>  };
> -- 
> 1.8.1.2
>
Archana kumari Oct. 30, 2013, 5:41 p.m. UTC | #2
yes  
 Waskiewicz Jr, Peter P I compiled it and it worked fine.
should I fix other issues in the file too to make this patch 
           accepted?please advice me in this regard
          
          Thanks
          Archana

On Sunday, October 27, 2013 2:13:09 AM UTC+5:30, Archana Kumari wrote:
>
> This patch fixes the warning "static const char * array should 
> probably be static const char * const" in imx-ldb.c. 
>
> Signed-off-by: Archana kumari <archanakumari959@gmail.com> 
> --- 
>  drivers/staging/imx-drm/imx-ldb.c | 2 +- 
>  1 file changed, 1 insertion(+), 1 deletion(-) 
>
> diff --git a/drivers/staging/imx-drm/imx-ldb.c 
> b/drivers/staging/imx-drm/imx-ldb.c 
> index 926f493..83bce85 100644 
> --- a/drivers/staging/imx-drm/imx-ldb.c 
> +++ b/drivers/staging/imx-drm/imx-ldb.c 
> @@ -416,7 +416,7 @@ enum { 
>          LVDS_BIT_MAP_JEIDA 
>  }; 
>   
> -static const char *imx_ldb_bit_mappings[] = { 
> +static const char * const imx_ldb_bit_mappings[] = { 
>          [LVDS_BIT_MAP_SPWG]  = "spwg", 
>          [LVDS_BIT_MAP_JEIDA] = "jeida", 
>  }; 
> -- 
> 1.8.1.2 
>
>
Waskiewicz Jr, Peter P Oct. 30, 2013, 6:20 p.m. UTC | #3
On Wed, 2013-10-30 at 10:41 -0700, Archana Kumari wrote:
>  yes  
> 
> Waskiewicz Jr, Peter P I compiled it and it worked fine.
> should I fix other issues in the file too to make this patch 
>            accepted?please advice me in this regard

As Greg has pointed out, please stop top-posting to replies.  Please
reply in-line to comments and feedback.  Also please make your email
client send plain text email, not rich-formatted or HTML.

As for the comment I had, please disregard it.  I have no idea what my
brain was thinking when I sent that.

-PJ
          
>           Thanks
>           Archana
> 
> On Sunday, October 27, 2013 2:13:09 AM UTC+5:30, Archana Kumari wrote:
>         This patch fixes the warning "static const char * array
>         should 
>         probably be static const char * const" in imx-ldb.c. 
>         
>         Signed-off-by: Archana kumari <archanakumari959@gmail.com> 
>         --- 
>          drivers/staging/imx-drm/imx-ldb.c | 2 +- 
>          1 file changed, 1 insertion(+), 1 deletion(-) 
>         
>         diff --git a/drivers/staging/imx-drm/imx-ldb.c
>         b/drivers/staging/imx-drm/imx-ldb.c 
>         index 926f493..83bce85 100644 
>         --- a/drivers/staging/imx-drm/imx-ldb.c 
>         +++ b/drivers/staging/imx-drm/imx-ldb.c 
>         @@ -416,7 +416,7 @@ enum { 
>                  LVDS_BIT_MAP_JEIDA 
>          }; 
>           
>         -static const char *imx_ldb_bit_mappings[] = { 
>         +static const char * const imx_ldb_bit_mappings[] = { 
>                  [LVDS_BIT_MAP_SPWG]  = "spwg", 
>                  [LVDS_BIT_MAP_JEIDA] = "jeida", 
>          }; 
>         -- 
>         1.8.1.2 
>

Patch
diff mbox

diff --git a/drivers/staging/imx-drm/imx-ldb.c b/drivers/staging/imx-drm/imx-ldb.c
index 926f493..83bce85 100644
--- a/drivers/staging/imx-drm/imx-ldb.c
+++ b/drivers/staging/imx-drm/imx-ldb.c
@@ -416,7 +416,7 @@  enum {
 	LVDS_BIT_MAP_JEIDA
 };
 
-static const char *imx_ldb_bit_mappings[] = {
+static const char * const imx_ldb_bit_mappings[] = {
 	[LVDS_BIT_MAP_SPWG]  = "spwg",
 	[LVDS_BIT_MAP_JEIDA] = "jeida",
 };