All of lore.kernel.org
 help / color / mirror / Atom feed
From: James Simmons <jsimmons@infradead.org>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org,
	Thomas Winischhofer <thomas@winischhofer.net>,
	Joseph Chan <JosephChan@via.com.tw>,
	Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
	linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 21/25] drivers/video: Use static const char arrays
Date: Wed, 15 Sep 2010 20:02:27 +0100 (BST)	[thread overview]
Message-ID: <alpine.LFD.2.00.1009152002090.7965@casper.infradead.org> (raw)
In-Reply-To: <2435a9f5831685e3b7f06b93799a8836f4bfef61.1284406639.git.joe@perches.com>


> Signed-off-by: Joe Perches <joe@perches.com>

Acked-by: James Simmons <jsimmons@infradead.org>

> ---
>  drivers/video/sh_mipi_dsi.c  |    4 ++--
>  drivers/video/sis/sis_main.c |   10 +++++-----
>  drivers/video/via/viafbdev.c |    2 +-
>  3 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/video/sh_mipi_dsi.c b/drivers/video/sh_mipi_dsi.c
> index 5699ce0..4a8501b 100644
> --- a/drivers/video/sh_mipi_dsi.c
> +++ b/drivers/video/sh_mipi_dsi.c
> @@ -319,7 +319,7 @@ static int __init sh_mipi_probe(struct platform_device *pdev)
>  	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	unsigned long rate, f_current;
>  	int idx = pdev->id, ret;
> -	char dsip_clk[] = "dsi.p_clk";
> +	char dsip_clk[sizeof("dsiXp_clk")];
>  
>  	if (!res || idx >= ARRAY_SIZE(mipi_dsi) || !pdata)
>  		return -ENODEV;
> @@ -370,7 +370,7 @@ static int __init sh_mipi_probe(struct platform_device *pdev)
>  
>  	dev_dbg(&pdev->dev, "DSI-T clk %lu -> %lu\n", f_current, rate);
>  
> -	sprintf(dsip_clk, "dsi%1.1dp_clk", idx);
> +	sprintf(dsip_clk, "dsi%cp_clk", idx + '0');
>  	mipi->dsip_clk = clk_get(&pdev->dev, dsip_clk);
>  	if (IS_ERR(mipi->dsip_clk)) {
>  		ret = PTR_ERR(mipi->dsip_clk);
> diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c
> index 559bf17..4be65d1 100644
> --- a/drivers/video/sis/sis_main.c
> +++ b/drivers/video/sis/sis_main.c
> @@ -2387,8 +2387,8 @@ SiS_Sense30x(struct sis_video_info *ivideo)
>      u16 cvbs=0, cvbs_c=0;
>      u16 vga2=0, vga2_c=0;
>      int myflag, result;
> -    char stdstr[] = "sisfb: Detected";
> -    char tvstr[]  = "TV connected to";
> +    static const char stdstr[] = "sisfb: Detected";
> +    static const char tvstr[] = "TV connected to";
>  
>      if(ivideo->vbflags2 & VB2_301) {
>         svhs = 0x00b9; cvbs = 0x00b3; vga2 = 0x00d1;
> @@ -2525,7 +2525,7 @@ SiS_SenseCh(struct sis_video_info *ivideo)
>  {
>  #if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315)
>      u8 temp1, temp2;
> -    char stdstr[] = "sisfb: Chrontel: Detected TV connected to";
> +    static const char stdstr[] = "sisfb: Chrontel: Detected TV connected to";
>  #endif
>  #ifdef CONFIG_FB_SIS_300
>      unsigned char test[3];
> @@ -2648,8 +2648,8 @@ SiS_SenseCh(struct sis_video_info *ivideo)
>  static void __devinit
>  sisfb_get_VB_type(struct sis_video_info *ivideo)
>  {
> -	char stdstr[]    = "sisfb: Detected";
> -	char bridgestr[] = "video bridge";
> +	static const char stdstr[] = "sisfb: Detected";
> +	static const char bridgestr[] = "video bridge";
>  	u8 vb_chipid;
>  	u8 reg;
>  
> diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
> index 5a947b0..394ef48 100644
> --- a/drivers/video/via/viafbdev.c
> +++ b/drivers/video/via/viafbdev.c
> @@ -367,7 +367,7 @@ static int viafb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
>  	} u;
>  	u32 state_info = 0;
>  	u32 *viafb_gamma_table;
> -	char driver_name[] = "viafb";
> +	static const char driver_name[] = "viafb";
>  
>  	u32 __user *argp = (u32 __user *) arg;
>  	u32 gpu32;
> -- 
> 1.7.3.rc1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

WARNING: multiple messages have this Message-ID (diff)
From: James Simmons <jsimmons@infradead.org>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org,
	Thomas Winischhofer <thomas@winischhofer.net>,
	Joseph Chan <JosephChan@via.com.tw>,
	Florian Tobias Schandinat <FlorianSchandinat@gmx.de>,
	linux-fbdev@vger.kernel.org
Subject: Re: [PATCH 21/25] drivers/video: Use static const char arrays
Date: Wed, 15 Sep 2010 19:02:27 +0000	[thread overview]
Message-ID: <alpine.LFD.2.00.1009152002090.7965@casper.infradead.org> (raw)
In-Reply-To: <2435a9f5831685e3b7f06b93799a8836f4bfef61.1284406639.git.joe@perches.com>


> Signed-off-by: Joe Perches <joe@perches.com>

Acked-by: James Simmons <jsimmons@infradead.org>

> ---
>  drivers/video/sh_mipi_dsi.c  |    4 ++--
>  drivers/video/sis/sis_main.c |   10 +++++-----
>  drivers/video/via/viafbdev.c |    2 +-
>  3 files changed, 8 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/video/sh_mipi_dsi.c b/drivers/video/sh_mipi_dsi.c
> index 5699ce0..4a8501b 100644
> --- a/drivers/video/sh_mipi_dsi.c
> +++ b/drivers/video/sh_mipi_dsi.c
> @@ -319,7 +319,7 @@ static int __init sh_mipi_probe(struct platform_device *pdev)
>  	struct resource *res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
>  	unsigned long rate, f_current;
>  	int idx = pdev->id, ret;
> -	char dsip_clk[] = "dsi.p_clk";
> +	char dsip_clk[sizeof("dsiXp_clk")];
>  
>  	if (!res || idx >= ARRAY_SIZE(mipi_dsi) || !pdata)
>  		return -ENODEV;
> @@ -370,7 +370,7 @@ static int __init sh_mipi_probe(struct platform_device *pdev)
>  
>  	dev_dbg(&pdev->dev, "DSI-T clk %lu -> %lu\n", f_current, rate);
>  
> -	sprintf(dsip_clk, "dsi%1.1dp_clk", idx);
> +	sprintf(dsip_clk, "dsi%cp_clk", idx + '0');
>  	mipi->dsip_clk = clk_get(&pdev->dev, dsip_clk);
>  	if (IS_ERR(mipi->dsip_clk)) {
>  		ret = PTR_ERR(mipi->dsip_clk);
> diff --git a/drivers/video/sis/sis_main.c b/drivers/video/sis/sis_main.c
> index 559bf17..4be65d1 100644
> --- a/drivers/video/sis/sis_main.c
> +++ b/drivers/video/sis/sis_main.c
> @@ -2387,8 +2387,8 @@ SiS_Sense30x(struct sis_video_info *ivideo)
>      u16 cvbs=0, cvbs_c=0;
>      u16 vga2=0, vga2_c=0;
>      int myflag, result;
> -    char stdstr[] = "sisfb: Detected";
> -    char tvstr[]  = "TV connected to";
> +    static const char stdstr[] = "sisfb: Detected";
> +    static const char tvstr[] = "TV connected to";
>  
>      if(ivideo->vbflags2 & VB2_301) {
>         svhs = 0x00b9; cvbs = 0x00b3; vga2 = 0x00d1;
> @@ -2525,7 +2525,7 @@ SiS_SenseCh(struct sis_video_info *ivideo)
>  {
>  #if defined(CONFIG_FB_SIS_300) || defined(CONFIG_FB_SIS_315)
>      u8 temp1, temp2;
> -    char stdstr[] = "sisfb: Chrontel: Detected TV connected to";
> +    static const char stdstr[] = "sisfb: Chrontel: Detected TV connected to";
>  #endif
>  #ifdef CONFIG_FB_SIS_300
>      unsigned char test[3];
> @@ -2648,8 +2648,8 @@ SiS_SenseCh(struct sis_video_info *ivideo)
>  static void __devinit
>  sisfb_get_VB_type(struct sis_video_info *ivideo)
>  {
> -	char stdstr[]    = "sisfb: Detected";
> -	char bridgestr[] = "video bridge";
> +	static const char stdstr[] = "sisfb: Detected";
> +	static const char bridgestr[] = "video bridge";
>  	u8 vb_chipid;
>  	u8 reg;
>  
> diff --git a/drivers/video/via/viafbdev.c b/drivers/video/via/viafbdev.c
> index 5a947b0..394ef48 100644
> --- a/drivers/video/via/viafbdev.c
> +++ b/drivers/video/via/viafbdev.c
> @@ -367,7 +367,7 @@ static int viafb_ioctl(struct fb_info *info, u_int cmd, u_long arg)
>  	} u;
>  	u32 state_info = 0;
>  	u32 *viafb_gamma_table;
> -	char driver_name[] = "viafb";
> +	static const char driver_name[] = "viafb";
>  
>  	u32 __user *argp = (u32 __user *) arg;
>  	u32 gpu32;
> -- 
> 1.7.3.rc1
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 

  reply	other threads:[~2010-09-15 19:02 UTC|newest]

Thread overview: 88+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-13 19:47 [PATCH 00/25] treewide-next: Use static const char arrays Joe Perches
2010-09-13 19:47 ` Joe Perches
2010-09-13 19:47 ` Joe Perches
2010-09-13 19:47 ` Joe Perches
2010-09-13 19:47 ` [PATCH 01/25] arch/mips: " Joe Perches
2010-09-18 22:54   ` Ralf Baechle
2010-09-18 23:44     ` Joe Perches
2010-09-13 19:47 ` [PATCH 02/25] arch/powerpc: " Joe Perches
2010-09-13 19:47   ` Joe Perches
2010-09-14  2:02   ` Stephen Rothwell
2010-09-14  2:02     ` Stephen Rothwell
2010-09-14  2:04   ` Stephen Rothwell
2010-09-14  2:04     ` Stephen Rothwell
2010-09-13 19:47 ` [PATCH 03/25] drivers/acpi: " Joe Perches
2010-09-13 19:47 ` [PATCH 04/25] drivers/char: " Joe Perches
2010-09-14  2:06   ` Stephen Rothwell
2010-09-14  2:06     ` Stephen Rothwell
2010-09-13 19:47 ` [PATCH 05/25] drivers/i2c: " Joe Perches
2010-09-13 19:47   ` Joe Perches
2010-09-13 19:47   ` Joe Perches
2010-09-13 19:56   ` Russell King - ARM Linux
2010-09-13 19:56     ` Russell King - ARM Linux
2010-09-13 19:56     ` Russell King - ARM Linux
2010-09-13 20:08   ` Jonathan Cameron
2010-09-13 20:08     ` Jonathan Cameron
2010-09-13 20:08     ` Jonathan Cameron
2010-09-13 20:16     ` Joe Perches
2010-09-13 20:16       ` Joe Perches
2010-09-13 20:16       ` Joe Perches
2010-09-14  7:36     ` Lothar Waßmann
2010-09-14  7:36       ` Lothar Waßmann
2010-09-14  7:36       ` Lothar Waßmann
2010-09-14 12:57       ` Jonathan Cameron
2010-09-14 12:57         ` Jonathan Cameron
2010-09-14 12:57         ` Jonathan Cameron
2010-09-14 19:48         ` Russell King - ARM Linux
2010-09-14 19:48           ` Russell King - ARM Linux
2010-09-14 19:48           ` Russell King - ARM Linux
2010-09-14 23:23   ` Ben Dooks
2010-09-14 23:23     ` Ben Dooks
2010-09-14 23:23     ` Ben Dooks
2010-09-13 19:47 ` [PATCH 06/25] drivers/isdn: " Joe Perches
2010-09-13 19:47 ` [PATCH 07/25] drivers/media: " Joe Perches
2010-09-13 21:50   ` Mauro Carvalho Chehab
2010-09-13 22:07     ` [PATCH 07/25] drivers/media/video/zoran: Don't use initialized char array Joe Perches
2010-09-13 19:47 ` [PATCH 08/25] drivers/net/atl1c: Use static const char arrays Joe Perches
2010-09-13 19:47 ` [PATCH 09/25] drivers/net/atl1e: " Joe Perches
2010-09-13 19:47 ` [PATCH 10/25] drivers/net/(intel): " Joe Perches
2010-09-13 19:47   ` Joe Perches
2010-09-13 19:47 ` [PATCH 11/25] drivers/net/netxen: " Joe Perches
2010-09-13 19:47 ` [PATCH 12/25] drivers/net/qlcnic: " Joe Perches
2010-09-13 19:47 ` [PATCH 13/25] drivers/net/spider_net.c: " Joe Perches
2010-09-13 19:47 ` [PATCH 14/25] drivers/net/vnxnet3: " Joe Perches
2010-09-13 19:50   ` [Pv-drivers] " Bhavesh Davda
2010-09-13 20:07   ` Shreyas Bhatewara
2010-09-13 19:47 ` [PATCH 15/25] drivers/net/wireless/ipw2x00: " Joe Perches
2010-09-14 18:41   ` John W. Linville
2010-09-13 19:47 ` [PATCH 16/25] drivers/s390/char: " Joe Perches
2010-09-13 19:47 ` [PATCH 17/25] drivers/scsi: " Joe Perches
2010-09-13 19:47 ` [PATCH 18/25] drivers/serial/suncore.c: " Joe Perches
2010-09-13 19:47   ` Joe Perches
2010-09-13 20:36   ` Alan Cox
2010-09-13 20:36     ` [PATCH 18/25] drivers/serial/suncore.c: Use static const char Alan Cox
2010-09-13 20:22     ` [PATCH 18/25] drivers/serial/suncore.c: Use static const char arrays Joe Perches
2010-09-13 20:22       ` [PATCH 18/25] drivers/serial/suncore.c: Use static const char Joe Perches
2010-09-13 21:11       ` [PATCH 18/25] drivers/serial/suncore.c: Use static const char arrays Nick Bowler
2010-09-13 21:11         ` [PATCH 18/25] drivers/serial/suncore.c: Use static const char Nick Bowler
2010-09-13 21:17         ` [PATCH 18/25] drivers/serial/suncore.c: Use static const char arrays Joe Perches
2010-09-13 21:17           ` [PATCH 18/25] drivers/serial/suncore.c: Use static const char Joe Perches
2010-09-13 19:47 ` [PATCH 19/25] drivers/staging: Use static const char arrays Joe Perches
2010-09-13 19:47 ` [PATCH 20/25] drivers/usb: " Joe Perches
2010-09-13 20:38   ` Greg KH
2010-09-13 19:47 ` [PATCH 21/25] drivers/video: " Joe Perches
2010-09-13 19:47   ` Joe Perches
2010-09-15 19:02   ` James Simmons [this message]
2010-09-15 19:02     ` James Simmons
2010-09-13 19:48 ` [PATCH 22/25] net/dsa: " Joe Perches
2010-09-13 19:48 ` [PATCH 23/25] net/sunrpc: " Joe Perches
2010-09-13 19:48 ` [PATCH 24/25] sound: " Joe Perches
2010-09-13 20:30   ` Takashi Iwai
2010-09-13 20:30     ` Takashi Iwai
2010-09-13 20:47     ` Joe Perches
2010-09-13 21:33       ` Takashi Iwai
2010-09-13 21:33         ` Takashi Iwai
2010-09-13 19:48 ` [PATCH 25/25] tools/perf/util: " Joe Perches
2010-09-14  9:14 ` (unknown) David Howells
2010-09-14  9:14   ` (no subject) David Howells
2010-09-14  9:14   ` David Howells

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=alpine.LFD.2.00.1009152002090.7965@casper.infradead.org \
    --to=jsimmons@infradead.org \
    --cc=FlorianSchandinat@gmx.de \
    --cc=JosephChan@via.com.tw \
    --cc=joe@perches.com \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=thomas@winischhofer.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.