linux-fbdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] video: s3c-fb: fix checkpatch errors and warning
@ 2011-04-01  7:17 Jingoo Han
  2011-04-06 16:45 ` Paul Mundt
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Jingoo Han @ 2011-04-01  7:17 UTC (permalink / raw)
  To: linux-fbdev

This patch fixes the checkpatch errors listed below:

ERROR: space required before the open parenthesis '('
ERROR: need consistent spacing around '+' (ctx:WxV)
ERROR: space prohibited before that close parenthesis ')'

Also, following warning is fixed by adding 'platid' variable
which can reduce number of lines exceeding 80 characters.

WARNING: line over 80 characters

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/video/s3c-fb.c |    8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index 6817d18..3b6cdca 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -48,7 +48,7 @@
 #undef writel
 #define writel(v, r) do { \
 	printk(KERN_DEBUG "%s: %08x => %p\n", __func__, (unsigned int)v, r); \
-	__raw_writel(v, r); } while(0)
+	__raw_writel(v, r); } while (0)
 #endif /* FB_S3C_DEBUG_REGWRITE */
 
 /* irq_flags bits */
@@ -518,7 +518,7 @@ static int s3c_fb_set_par(struct fb_info *info)
 
 		data = VIDTCON2_LINEVAL(var->yres - 1) |
 		       VIDTCON2_HOZVAL(var->xres - 1);
-		writel(data, regs +sfb->variant.vidtcon + 8 );
+		writel(data, regs + sfb->variant.vidtcon + 8);
 	}
 
 	/* write the buffer address */
@@ -1304,6 +1304,7 @@ static void s3c_fb_clear_win(struct s3c_fb *sfb, int win)
 
 static int __devinit s3c_fb_probe(struct platform_device *pdev)
 {
+	const struct platform_device_id *platid;
 	struct s3c_fb_driverdata *fbdrv;
 	struct device *dev = &pdev->dev;
 	struct s3c_fb_platdata *pd;
@@ -1312,7 +1313,8 @@ static int __devinit s3c_fb_probe(struct platform_device *pdev)
 	int win;
 	int ret = 0;
 
-	fbdrv = (struct s3c_fb_driverdata *)platform_get_device_id(pdev)->driver_data;
+	platid = platform_get_device_id(pdev);
+	fbdrv = (struct s3c_fb_driverdata *)platid->driver_data;
 
 	if (fbdrv->variant.nr_windows > S3C_FB_MAX_WIN) {
 		dev_err(dev, "too many windows, cannot attach\n");
-- 
1.7.1


^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] video: s3c-fb: fix checkpatch errors and warning
  2011-04-01  7:17 [PATCH] video: s3c-fb: fix checkpatch errors and warning Jingoo Han
@ 2011-04-06 16:45 ` Paul Mundt
  2011-04-06 20:13 ` Tormod Volden
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Paul Mundt @ 2011-04-06 16:45 UTC (permalink / raw)
  To: linux-fbdev

On Fri, Apr 01, 2011 at 04:17:27PM +0900, Jingoo Han wrote:
> This patch fixes the checkpatch errors listed below:
> 
> ERROR: space required before the open parenthesis '('
> ERROR: need consistent spacing around '+' (ctx:WxV)
> ERROR: space prohibited before that close parenthesis ')'
> 
> Also, following warning is fixed by adding 'platid' variable
> which can reduce number of lines exceeding 80 characters.
> 
> WARNING: line over 80 characters
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Applied, thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] video: s3c-fb: fix checkpatch errors and warning
  2011-04-01  7:17 [PATCH] video: s3c-fb: fix checkpatch errors and warning Jingoo Han
  2011-04-06 16:45 ` Paul Mundt
@ 2011-04-06 20:13 ` Tormod Volden
  2012-01-26 10:38 ` [PATCH] video: s3c-fb: fix checkpatch error Jingoo Han
  2012-01-30  5:18 ` Florian Tobias Schandinat
  3 siblings, 0 replies; 5+ messages in thread
From: Tormod Volden @ 2011-04-06 20:13 UTC (permalink / raw)
  To: linux-fbdev

> On Fri, Apr 01, 2011 at 04:17:27PM +0900, Jingoo Han wrote:
>>
>> Also, following warning is fixed by adding 'platid' variable
>> which can reduce number of lines exceeding 80 characters.
>>
>> WARNING: line over 80 characters

Hi, wouldn't it be better to just break the line somewhere instead of
introducing an extra variable to be used in a single place? Although
the variable will probably be optimized away by the compiler, it adds
unnecessary complexity (and slight confusion) to the code.

Sorry for not commenting on this earlier, I just subscribed to the list.

Best regards,
Tormod

^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH] video: s3c-fb: fix checkpatch error
  2011-04-01  7:17 [PATCH] video: s3c-fb: fix checkpatch errors and warning Jingoo Han
  2011-04-06 16:45 ` Paul Mundt
  2011-04-06 20:13 ` Tormod Volden
@ 2012-01-26 10:38 ` Jingoo Han
  2012-01-30  5:18 ` Florian Tobias Schandinat
  3 siblings, 0 replies; 5+ messages in thread
From: Jingoo Han @ 2012-01-26 10:38 UTC (permalink / raw)
  To: linux-fbdev

This patch fixes the checkpatch error listed below:

ERROR: trailing statements should be on next line

Signed-off-by: Jingoo Han <jg1.han@samsung.com>
---
 drivers/video/s3c-fb.c |    3 ++-
 1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
index 7c5158d..389189a 100644
--- a/drivers/video/s3c-fb.c
+++ b/drivers/video/s3c-fb.c
@@ -48,7 +48,8 @@
 #undef writel
 #define writel(v, r) do { \
 	printk(KERN_DEBUG "%s: %08x => %p\n", __func__, (unsigned int)v, r); \
-	__raw_writel(v, r); } while (0)
+	__raw_writel(v, r); \
+} while (0)
 #endif /* FB_S3C_DEBUG_REGWRITE */
 
 /* irq_flags bits */
-- 
1.7.1



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] video: s3c-fb: fix checkpatch error
  2011-04-01  7:17 [PATCH] video: s3c-fb: fix checkpatch errors and warning Jingoo Han
                   ` (2 preceding siblings ...)
  2012-01-26 10:38 ` [PATCH] video: s3c-fb: fix checkpatch error Jingoo Han
@ 2012-01-30  5:18 ` Florian Tobias Schandinat
  3 siblings, 0 replies; 5+ messages in thread
From: Florian Tobias Schandinat @ 2012-01-30  5:18 UTC (permalink / raw)
  To: linux-fbdev

On 01/26/2012 10:38 AM, Jingoo Han wrote:
> This patch fixes the checkpatch error listed below:
> 
> ERROR: trailing statements should be on next line
> 
> Signed-off-by: Jingoo Han <jg1.han@samsung.com>

Applied.


Thanks,

Florian Tobias Schandinat

> ---
>  drivers/video/s3c-fb.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/drivers/video/s3c-fb.c b/drivers/video/s3c-fb.c
> index 7c5158d..389189a 100644
> --- a/drivers/video/s3c-fb.c
> +++ b/drivers/video/s3c-fb.c
> @@ -48,7 +48,8 @@
>  #undef writel
>  #define writel(v, r) do { \
>  	printk(KERN_DEBUG "%s: %08x => %p\n", __func__, (unsigned int)v, r); \
> -	__raw_writel(v, r); } while (0)
> +	__raw_writel(v, r); \
> +} while (0)
>  #endif /* FB_S3C_DEBUG_REGWRITE */
>  
>  /* irq_flags bits */


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2012-01-30  5:18 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-04-01  7:17 [PATCH] video: s3c-fb: fix checkpatch errors and warning Jingoo Han
2011-04-06 16:45 ` Paul Mundt
2011-04-06 20:13 ` Tormod Volden
2012-01-26 10:38 ` [PATCH] video: s3c-fb: fix checkpatch error Jingoo Han
2012-01-30  5:18 ` Florian Tobias Schandinat

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).