From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755232Ab0IOTCc (ORCPT ); Wed, 15 Sep 2010 15:02:32 -0400 Received: from casper.infradead.org ([85.118.1.10]:45905 "EHLO casper.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752448Ab0IOTCb (ORCPT ); Wed, 15 Sep 2010 15:02:31 -0400 Date: Wed, 15 Sep 2010 20:02:27 +0100 (BST) From: James Simmons To: Joe Perches cc: linux-kernel@vger.kernel.org, Thomas Winischhofer , Joseph Chan , Florian Tobias Schandinat , linux-fbdev@vger.kernel.org Subject: Re: [PATCH 21/25] drivers/video: Use static const char arrays In-Reply-To: <2435a9f5831685e3b7f06b93799a8836f4bfef61.1284406639.git.joe@perches.com> Message-ID: References: <2435a9f5831685e3b7f06b93799a8836f4bfef61.1284406639.git.joe@perches.com> User-Agent: Alpine 2.00 (LFD 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > Signed-off-by: Joe Perches Acked-by: James Simmons > --- > 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 > From mboxrd@z Thu Jan 1 00:00:00 1970 From: James Simmons Date: Wed, 15 Sep 2010 19:02:27 +0000 Subject: Re: [PATCH 21/25] drivers/video: Use static const char arrays Message-Id: List-Id: References: <2435a9f5831685e3b7f06b93799a8836f4bfef61.1284406639.git.joe@perches.com> In-Reply-To: <2435a9f5831685e3b7f06b93799a8836f4bfef61.1284406639.git.joe@perches.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Joe Perches Cc: linux-kernel@vger.kernel.org, Thomas Winischhofer , Joseph Chan , Florian Tobias Schandinat , linux-fbdev@vger.kernel.org > Signed-off-by: Joe Perches Acked-by: James Simmons > --- > 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 >