All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sm750fb: coding style fixes lines over 80 chars
@ 2015-07-15 18:58 ` Vinay Simha BN
  0 siblings, 0 replies; 28+ messages in thread
From: Vinay Simha BN @ 2015-07-15 18:46 UTC (permalink / raw)
  Cc: Vinay Simha BN, Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

scripts/checkpatch.pl kernel coding style fixes of WARNING

WARNING: line over 80 characters

Signed-off-by: Vinay Simha BN <simhavcs@gmail.com>
---
 drivers/staging/sm750fb/ddk750_display.h | 10 +++++-----
 drivers/staging/sm750fb/ddk750_help.h    |  6 ++++--
 drivers/staging/sm750fb/ddk750_hwi2c.h   |  6 ++++--
 drivers/staging/sm750fb/ddk750_power.h   |  6 +++---
 drivers/staging/sm750fb/ddk750_sii164.h  | 12 +++++++-----
 drivers/staging/sm750fb/sm750.h          | 13 ++++++++-----
 drivers/staging/sm750fb/sm750_accel.h    | 19 ++++++++++++-------
 drivers/staging/sm750fb/sm750_help.h     | 24 ++++++++++++++++--------
 drivers/staging/sm750fb/sm750_hw.h       | 19 ++++++++++++-------
 9 files changed, 71 insertions(+), 44 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_display.h b/drivers/staging/sm750fb/ddk750_display.h
index ae0f84c..eb36a08 100644
--- a/drivers/staging/sm750fb/ddk750_display.h
+++ b/drivers/staging/sm750fb/ddk750_display.h
@@ -111,19 +111,19 @@ typedef enum _disp_output_t
 
 	/* LCD1 show secondary and DSUB show primary */
 	LCD1_DSUB_DUAL_SWAP = PNL_2_SEC|SEC_TP_ON|PNL_SEQ_ON|
-							CRT_2_PRI|PRI_TP_ON|DAC_ON,
+				CRT_2_PRI|PRI_TP_ON|DAC_ON,
 
 	LCD1_LCD2_PRI = PNL_2_PRI|PRI_TP_ON|PNL_SEQ_ON|
-					CRT_2_PRI|SEC_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
+				CRT_2_PRI|SEC_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
 
 	LCD1_LCD2_SEC = PNL_2_SEC|SEC_TP_ON|PNL_SEQ_ON|
-					CRT_2_SEC|PRI_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
+				CRT_2_SEC|PRI_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
 
 	LCD1_LCD2_DSUB_PRI = PNL_2_PRI|PRI_TP_ON|PNL_SEQ_ON|DAC_ON|
-						CRT_2_PRI|SEC_TP_OFF|DPMS_ON|DUAL_TFT_ON,
+				CRT_2_PRI|SEC_TP_OFF|DPMS_ON|DUAL_TFT_ON,
 
 	LCD1_LCD2_DSUB_SEC = PNL_2_SEC|SEC_TP_ON|PNL_SEQ_ON|DAC_ON|
-						CRT_2_SEC|PRI_TP_OFF|DPMS_ON|DUAL_TFT_ON,
+				CRT_2_SEC|PRI_TP_OFF|DPMS_ON|DUAL_TFT_ON,
 
 
 }
diff --git a/drivers/staging/sm750fb/ddk750_help.h b/drivers/staging/sm750fb/ddk750_help.h
index 4285b05..1cb6ea5 100644
--- a/drivers/staging/sm750fb/ddk750_help.h
+++ b/drivers/staging/sm750fb/ddk750_help.h
@@ -10,8 +10,10 @@
 
 
 #if 0
-/* if 718 big endian turned on,be aware that don't use this driver for general use,only for ppc big-endian */
-#warning "big endian on target cpu and enable nature big endian support of 718 capability !"
+/* if 718 big endian turned on,be aware that don't use this driver for general
+	 use,only for ppc big-endian */
+#warning "big endian on target cpu and enable nature big endian support of 718
+	capability !"
 #define PEEK32(addr)  			__raw_readl(mmio750 + addr)
 #define POKE32(addr, data) 		__raw_writel(data, mmio750 + addr)
 #else /* software control endianness */
diff --git a/drivers/staging/sm750fb/ddk750_hwi2c.h b/drivers/staging/sm750fb/ddk750_hwi2c.h
index 0b830ba6..3d4e48b 100644
--- a/drivers/staging/sm750fb/ddk750_hwi2c.h
+++ b/drivers/staging/sm750fb/ddk750_hwi2c.h
@@ -5,6 +5,8 @@
 int hwI2CInit(unsigned char busSpeedMode);
 void hwI2CClose(void);
 
-unsigned char hwI2CReadReg(unsigned char deviceAddress, unsigned char registerIndex);
-int hwI2CWriteReg(unsigned char deviceAddress, unsigned char registerIndex, unsigned char data);
+unsigned char hwI2CReadReg(unsigned char deviceAddress,
+	unsigned char registerIndex);
+int hwI2CWriteReg(unsigned char deviceAddress, unsigned char registerIndex,
+	unsigned char data);
 #endif
diff --git a/drivers/staging/sm750fb/ddk750_power.h b/drivers/staging/sm750fb/ddk750_power.h
index 4e00955..c5fe37e 100644
--- a/drivers/staging/sm750fb/ddk750_power.h
+++ b/drivers/staging/sm750fb/ddk750_power.h
@@ -13,9 +13,9 @@ DPMS_t;
 #define setDAC(off) \
 		{	\
 		POKE32(MISC_CTRL, FIELD_VALUE(PEEK32(MISC_CTRL), \
-									MISC_CTRL,	\
-									DAC_POWER,	\
-									off));	\
+			MISC_CTRL,	\
+			DAC_POWER,	\
+			off));		\
 		}
 
 void ddk750_setDPMS(DPMS_t);
diff --git a/drivers/staging/sm750fb/ddk750_sii164.h b/drivers/staging/sm750fb/ddk750_sii164.h
index 2b4c7d3..c57c799 100644
--- a/drivers/staging/sm750fb/ddk750_sii164.h
+++ b/drivers/staging/sm750fb/ddk750_sii164.h
@@ -6,10 +6,11 @@
 /* Hot Plug detection mode structure */
 typedef enum _sii164_hot_plug_mode_t
 {
-    SII164_HOTPLUG_DISABLE = 0,         /* Disable Hot Plug output bit (always high). */
-    SII164_HOTPLUG_USE_MDI,             /* Use Monitor Detect Interrupt bit. */
-    SII164_HOTPLUG_USE_RSEN,            /* Use Receiver Sense detect bit. */
-    SII164_HOTPLUG_USE_HTPLG            /* Use Hot Plug detect bit. */
+	SII164_HOTPLUG_DISABLE = 0,/* Disable Hot Plug output bit
+						 (always high). */
+	SII164_HOTPLUG_USE_MDI,    /* Use Monitor Detect Interrupt bit. */
+	SII164_HOTPLUG_USE_RSEN,   /* Use Receiver Sense detect bit. */
+	SII164_HOTPLUG_USE_HTPLG   /* Use Hot Plug detect bit. */
 } sii164_hot_plug_mode_t;
 
 
@@ -40,7 +41,8 @@ unsigned char sii164IsConnected(void);
 unsigned char sii164CheckInterrupt(void);
 void sii164ClearInterrupt(void);
 #endif
-/* below register definination is used for Silicon Image SiI164 DVI controller chip */
+/* below register definination is used for Silicon Image
+	SiI164 DVI controller chip */
 /*
  * Vendor ID registers
  */
diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index cc80580..4a3b001 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -32,9 +32,10 @@ struct lynx_accel{
 						u32, u32, u32, u32,
 						u32, u32, u32, u32);
 
-	int (*de_imageblit)(struct lynx_accel *, const char *, u32, u32, u32, u32,
-							       u32, u32, u32, u32,
-							       u32, u32, u32, u32);
+	int (*de_imageblit)(struct lynx_accel *, const char *,
+						u32, u32, u32, u32,
+						u32, u32, u32, u32,
+						u32, u32, u32, u32);
 
 };
 
@@ -100,7 +101,8 @@ struct lynxfb_crtc{
 	int channel;/* which channel this crtc stands for*/
 	resource_size_t vidmem_size;/* this view's video memory max size */
 
-	/* below attributes belong to info->fix, their value depends on specific adaptor*/
+	/* below attributes belong to info->fix, their value depends on
+		 specific adaptor*/
 	u16 line_pad;/* padding information:0,1,2,4,8,16,... */
 	u16 xpanstep;
 	u16 ypanstep;
@@ -113,7 +115,8 @@ struct lynxfb_crtc{
 						struct fb_fix_screeninfo*);
 
 	int(*proc_checkMode)(struct lynxfb_crtc*, struct fb_var_screeninfo*);
-	int(*proc_setColReg)(struct lynxfb_crtc*, ushort, ushort, ushort, ushort);
+	int (*proc_setColReg)(struct lynxfb_crtc*, ushort, ushort, ushort,
+				ushort);
 	void (*clear)(struct lynxfb_crtc*);
         /* pan display */
 	int (*proc_panDisplay)(struct lynxfb_crtc *,
diff --git a/drivers/staging/sm750fb/sm750_accel.h b/drivers/staging/sm750fb/sm750_accel.h
index d3d256c..9d91ca4 100644
--- a/drivers/staging/sm750fb/sm750_accel.h
+++ b/drivers/staging/sm750fb/sm750_accel.h
@@ -26,7 +26,7 @@
 #define DE_SOURCE_WRAP_ENABLE                           1
 #define DE_SOURCE_X_K1                                  29:16
 #define DE_SOURCE_Y_K2                                  15:0
-#define DE_SOURCE_X_K1_MONO 							20:16
+#define DE_SOURCE_X_K1_MONO				{ 20:16 }
 
 #define DE_DESTINATION                                  0x4
 #define DE_DESTINATION_WRAP                             31:31
@@ -259,17 +259,22 @@ unsigned int height, /* width and height of rectangle in pixel value */
 unsigned int rop2);
 
 int hw_imageblit(struct lynx_accel *accel,
-		 const char *pSrcbuf, /* pointer to start of source buffer in system memory */
-		 u32 srcDelta,          /* Pitch value (in bytes) of the source buffer, +ive means top down and -ive mean button up */
-		 u32 startBit, /* Mono data can start at any bit in a byte, this value should be 0 to 7 */
-		 u32 dBase,    /* Address of destination: offset in frame buffer */
+		 const char *pSrcbuf, /* pointer to start of source
+					buffer in system memory */
+		 u32 srcDelta, /* Pitch value (in bytes) of the source buffer,
+				+ive means top down and -ive mean button up */
+		 u32 startBit, /* Mono data can start at any bit in a byte,
+				 this value should be 0 to 7 */
+		 u32 dBase, /* Address of destination: offset in frame buffer */
 		 u32 dPitch,   /* Pitch value of destination surface in BYTE */
 		 u32 bytePerPixel,      /* Color depth of destination surface */
 		 u32 dx,
 		 u32 dy,       /* Starting coordinate of destination surface */
 		 u32 width,
 		 u32 height,   /* width and height of rectange in pixel value */
-		 u32 fColor,   /* Foreground color (corresponding to a 1 in the monochrome data */
-		 u32 bColor,   /* Background color (corresponding to a 0 in the monochrome data */
+		 u32 fColor,   /* Foreground color (corresponding to a 1 in the
+				 monochrome data */
+		 u32 bColor,   /* Background color (corresponding to a 0 in the
+				 monochrome data */
 		 u32 rop2);
 #endif
diff --git a/drivers/staging/sm750fb/sm750_help.h b/drivers/staging/sm750fb/sm750_help.h
index 05777f7..15ab927 100644
--- a/drivers/staging/sm750fb/sm750_help.h
+++ b/drivers/staging/sm750fb/sm750_help.h
@@ -49,17 +49,24 @@
 /* Field Macros */
 #define FIELD_START(field)              (0 ? field)
 #define FIELD_END(field)                (1 ? field)
-#define FIELD_SIZE(field)               (1 + FIELD_END(field) - FIELD_START(field))
-#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) | ((1 << (FIELD_SIZE(field)-1)) - 1)) << FIELD_START(field))
-#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> FIELD_START(field))
-#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & FIELD_MASK(field))
+#define FIELD_SIZE(field)               (1 + FIELD_END(field) - \
+					FIELD_START(field))
+#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) | \
+					 ((1 << (FIELD_SIZE(field)-1)) - 1)) \
+					<< FIELD_START(field))
+#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> \
+					FIELD_START(field))
+#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & \
+					FIELD_MASK(field))
 
 #define FIELD_INIT(reg, field, value)   FIELD_DENORMALIZE(reg ## _ ## field, \
-                                                          reg ## _ ## field ## _ ## value)
+					reg ## _ ## field ## _ ## value)
 #define FIELD_INIT_VAL(reg, field, value) \
-                                        (FIELD_DENORMALIZE(reg ## _ ## field, value))
+					(FIELD_DENORMALIZE( \
+					reg ## _ ## field, value))
 #define FIELD_VAL_SET(x, r, f, v)       x = x & ~FIELD_MASK(r ## _ ## f) \
-                                              | FIELD_DENORMALIZE(r ## _ ## f, r ## _ ## f ## _ ## v)
+					| FIELD_DENORMALIZE(r ## _ ## f, \
+						r ## _ ## f ## _ ## v)
 
 #define RGB(r, g, b) \
 ( \
@@ -68,7 +75,8 @@
 
 #define RGB16(r, g, b) \
 ( \
-    (unsigned short) ((((r) & 0xF8) << 8) | (((g) & 0xFC) << 3) | (((b) & 0xF8) >> 3)) \
+	(unsigned short) ((((r) & 0xF8) << 8) | (((g) & 0xFC) << 3) | \
+		(((b) & 0xF8) >> 3)) \
 )
 
 static inline unsigned int absDiff(unsigned int a, unsigned int b)
diff --git a/drivers/staging/sm750fb/sm750_hw.h b/drivers/staging/sm750fb/sm750_hw.h
index 93288b3..e96341a 100644
--- a/drivers/staging/sm750fb/sm750_hw.h
+++ b/drivers/staging/sm750fb/sm750_hw.h
@@ -61,13 +61,15 @@ struct sm750_state{
 	int yLCD;
 };
 
-/* 	sm750_share stands for a presentation of two frame buffer
-	that use one sm750 adaptor, it is similar to the super class of lynx_share
-	in C++
+/*
+	sm750_share stands for a presentation of two frame buffer
+	that use one sm750 adaptor, it is similar to the super
+	class of lynx_share in C++
 */
 
 struct sm750_share{
-	/* it's better to put lynx_share struct to the first place of sm750_share */
+	/* it's better to put lynx_share struct to the first place
+		of sm750_share */
 	struct lynx_share share;
 	struct sm750_state state;
 	int hwCursor;
@@ -85,10 +87,13 @@ int hw_sm750_deWait(void);
 int hw_sm750le_deWait(void);
 
 resource_size_t hw_sm750_getVMSize(struct lynx_share *);
-int hw_sm750_output_checkMode(struct lynxfb_output*, struct fb_var_screeninfo*);
-int hw_sm750_output_setMode(struct lynxfb_output*, struct fb_var_screeninfo*, struct fb_fix_screeninfo*);
+int hw_sm750_output_checkMode(struct lynxfb_output*,
+		struct fb_var_screeninfo*);
+int hw_sm750_output_setMode(struct lynxfb_output*,
+		struct fb_var_screeninfo*, struct fb_fix_screeninfo*);
 int hw_sm750_crtc_checkMode(struct lynxfb_crtc*, struct fb_var_screeninfo*);
-int hw_sm750_crtc_setMode(struct lynxfb_crtc*, struct fb_var_screeninfo*, struct fb_fix_screeninfo*);
+int hw_sm750_crtc_setMode(struct lynxfb_crtc*, struct fb_var_screeninfo*,
+		struct fb_fix_screeninfo*);
 int hw_sm750_setColReg(struct lynxfb_crtc*, ushort, ushort, ushort, ushort);
 int hw_sm750_setBLANK(struct lynxfb_output*, int);
 int hw_sm750le_setBLANK(struct lynxfb_output*, int);
-- 
1.9.1


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

* [PATCH] sm750fb: coding style fixes lines over 80 chars
@ 2015-07-15 18:58 ` Vinay Simha BN
  0 siblings, 0 replies; 28+ messages in thread
From: Vinay Simha BN @ 2015-07-15 18:58 UTC (permalink / raw)
  Cc: Vinay Simha BN, Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

scripts/checkpatch.pl kernel coding style fixes of WARNING

WARNING: line over 80 characters

Signed-off-by: Vinay Simha BN <simhavcs@gmail.com>
---
 drivers/staging/sm750fb/ddk750_display.h | 10 +++++-----
 drivers/staging/sm750fb/ddk750_help.h    |  6 ++++--
 drivers/staging/sm750fb/ddk750_hwi2c.h   |  6 ++++--
 drivers/staging/sm750fb/ddk750_power.h   |  6 +++---
 drivers/staging/sm750fb/ddk750_sii164.h  | 12 +++++++-----
 drivers/staging/sm750fb/sm750.h          | 13 ++++++++-----
 drivers/staging/sm750fb/sm750_accel.h    | 19 ++++++++++++-------
 drivers/staging/sm750fb/sm750_help.h     | 24 ++++++++++++++++--------
 drivers/staging/sm750fb/sm750_hw.h       | 19 ++++++++++++-------
 9 files changed, 71 insertions(+), 44 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_display.h b/drivers/staging/sm750fb/ddk750_display.h
index ae0f84c..eb36a08 100644
--- a/drivers/staging/sm750fb/ddk750_display.h
+++ b/drivers/staging/sm750fb/ddk750_display.h
@@ -111,19 +111,19 @@ typedef enum _disp_output_t
 
 	/* LCD1 show secondary and DSUB show primary */
 	LCD1_DSUB_DUAL_SWAP = PNL_2_SEC|SEC_TP_ON|PNL_SEQ_ON|
-							CRT_2_PRI|PRI_TP_ON|DAC_ON,
+				CRT_2_PRI|PRI_TP_ON|DAC_ON,
 
 	LCD1_LCD2_PRI = PNL_2_PRI|PRI_TP_ON|PNL_SEQ_ON|
-					CRT_2_PRI|SEC_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
+				CRT_2_PRI|SEC_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
 
 	LCD1_LCD2_SEC = PNL_2_SEC|SEC_TP_ON|PNL_SEQ_ON|
-					CRT_2_SEC|PRI_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
+				CRT_2_SEC|PRI_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
 
 	LCD1_LCD2_DSUB_PRI = PNL_2_PRI|PRI_TP_ON|PNL_SEQ_ON|DAC_ON|
-						CRT_2_PRI|SEC_TP_OFF|DPMS_ON|DUAL_TFT_ON,
+				CRT_2_PRI|SEC_TP_OFF|DPMS_ON|DUAL_TFT_ON,
 
 	LCD1_LCD2_DSUB_SEC = PNL_2_SEC|SEC_TP_ON|PNL_SEQ_ON|DAC_ON|
-						CRT_2_SEC|PRI_TP_OFF|DPMS_ON|DUAL_TFT_ON,
+				CRT_2_SEC|PRI_TP_OFF|DPMS_ON|DUAL_TFT_ON,
 
 
 }
diff --git a/drivers/staging/sm750fb/ddk750_help.h b/drivers/staging/sm750fb/ddk750_help.h
index 4285b05..1cb6ea5 100644
--- a/drivers/staging/sm750fb/ddk750_help.h
+++ b/drivers/staging/sm750fb/ddk750_help.h
@@ -10,8 +10,10 @@
 
 
 #if 0
-/* if 718 big endian turned on,be aware that don't use this driver for general use,only for ppc big-endian */
-#warning "big endian on target cpu and enable nature big endian support of 718 capability !"
+/* if 718 big endian turned on,be aware that don't use this driver for general
+	 use,only for ppc big-endian */
+#warning "big endian on target cpu and enable nature big endian support of 718
+	capability !"
 #define PEEK32(addr)  			__raw_readl(mmio750 + addr)
 #define POKE32(addr, data) 		__raw_writel(data, mmio750 + addr)
 #else /* software control endianness */
diff --git a/drivers/staging/sm750fb/ddk750_hwi2c.h b/drivers/staging/sm750fb/ddk750_hwi2c.h
index 0b830ba6..3d4e48b 100644
--- a/drivers/staging/sm750fb/ddk750_hwi2c.h
+++ b/drivers/staging/sm750fb/ddk750_hwi2c.h
@@ -5,6 +5,8 @@
 int hwI2CInit(unsigned char busSpeedMode);
 void hwI2CClose(void);
 
-unsigned char hwI2CReadReg(unsigned char deviceAddress, unsigned char registerIndex);
-int hwI2CWriteReg(unsigned char deviceAddress, unsigned char registerIndex, unsigned char data);
+unsigned char hwI2CReadReg(unsigned char deviceAddress,
+	unsigned char registerIndex);
+int hwI2CWriteReg(unsigned char deviceAddress, unsigned char registerIndex,
+	unsigned char data);
 #endif
diff --git a/drivers/staging/sm750fb/ddk750_power.h b/drivers/staging/sm750fb/ddk750_power.h
index 4e00955..c5fe37e 100644
--- a/drivers/staging/sm750fb/ddk750_power.h
+++ b/drivers/staging/sm750fb/ddk750_power.h
@@ -13,9 +13,9 @@ DPMS_t;
 #define setDAC(off) \
 		{	\
 		POKE32(MISC_CTRL, FIELD_VALUE(PEEK32(MISC_CTRL), \
-									MISC_CTRL,	\
-									DAC_POWER,	\
-									off));	\
+			MISC_CTRL,	\
+			DAC_POWER,	\
+			off));		\
 		}
 
 void ddk750_setDPMS(DPMS_t);
diff --git a/drivers/staging/sm750fb/ddk750_sii164.h b/drivers/staging/sm750fb/ddk750_sii164.h
index 2b4c7d3..c57c799 100644
--- a/drivers/staging/sm750fb/ddk750_sii164.h
+++ b/drivers/staging/sm750fb/ddk750_sii164.h
@@ -6,10 +6,11 @@
 /* Hot Plug detection mode structure */
 typedef enum _sii164_hot_plug_mode_t
 {
-    SII164_HOTPLUG_DISABLE = 0,         /* Disable Hot Plug output bit (always high). */
-    SII164_HOTPLUG_USE_MDI,             /* Use Monitor Detect Interrupt bit. */
-    SII164_HOTPLUG_USE_RSEN,            /* Use Receiver Sense detect bit. */
-    SII164_HOTPLUG_USE_HTPLG            /* Use Hot Plug detect bit. */
+	SII164_HOTPLUG_DISABLE = 0,/* Disable Hot Plug output bit
+						 (always high). */
+	SII164_HOTPLUG_USE_MDI,    /* Use Monitor Detect Interrupt bit. */
+	SII164_HOTPLUG_USE_RSEN,   /* Use Receiver Sense detect bit. */
+	SII164_HOTPLUG_USE_HTPLG   /* Use Hot Plug detect bit. */
 } sii164_hot_plug_mode_t;
 
 
@@ -40,7 +41,8 @@ unsigned char sii164IsConnected(void);
 unsigned char sii164CheckInterrupt(void);
 void sii164ClearInterrupt(void);
 #endif
-/* below register definination is used for Silicon Image SiI164 DVI controller chip */
+/* below register definination is used for Silicon Image
+	SiI164 DVI controller chip */
 /*
  * Vendor ID registers
  */
diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index cc80580..4a3b001 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -32,9 +32,10 @@ struct lynx_accel{
 						u32, u32, u32, u32,
 						u32, u32, u32, u32);
 
-	int (*de_imageblit)(struct lynx_accel *, const char *, u32, u32, u32, u32,
-							       u32, u32, u32, u32,
-							       u32, u32, u32, u32);
+	int (*de_imageblit)(struct lynx_accel *, const char *,
+						u32, u32, u32, u32,
+						u32, u32, u32, u32,
+						u32, u32, u32, u32);
 
 };
 
@@ -100,7 +101,8 @@ struct lynxfb_crtc{
 	int channel;/* which channel this crtc stands for*/
 	resource_size_t vidmem_size;/* this view's video memory max size */
 
-	/* below attributes belong to info->fix, their value depends on specific adaptor*/
+	/* below attributes belong to info->fix, their value depends on
+		 specific adaptor*/
 	u16 line_pad;/* padding information:0,1,2,4,8,16,... */
 	u16 xpanstep;
 	u16 ypanstep;
@@ -113,7 +115,8 @@ struct lynxfb_crtc{
 						struct fb_fix_screeninfo*);
 
 	int(*proc_checkMode)(struct lynxfb_crtc*, struct fb_var_screeninfo*);
-	int(*proc_setColReg)(struct lynxfb_crtc*, ushort, ushort, ushort, ushort);
+	int (*proc_setColReg)(struct lynxfb_crtc*, ushort, ushort, ushort,
+				ushort);
 	void (*clear)(struct lynxfb_crtc*);
         /* pan display */
 	int (*proc_panDisplay)(struct lynxfb_crtc *,
diff --git a/drivers/staging/sm750fb/sm750_accel.h b/drivers/staging/sm750fb/sm750_accel.h
index d3d256c..9d91ca4 100644
--- a/drivers/staging/sm750fb/sm750_accel.h
+++ b/drivers/staging/sm750fb/sm750_accel.h
@@ -26,7 +26,7 @@
 #define DE_SOURCE_WRAP_ENABLE                           1
 #define DE_SOURCE_X_K1                                  29:16
 #define DE_SOURCE_Y_K2                                  15:0
-#define DE_SOURCE_X_K1_MONO 							20:16
+#define DE_SOURCE_X_K1_MONO				{ 20:16 }
 
 #define DE_DESTINATION                                  0x4
 #define DE_DESTINATION_WRAP                             31:31
@@ -259,17 +259,22 @@ unsigned int height, /* width and height of rectangle in pixel value */
 unsigned int rop2);
 
 int hw_imageblit(struct lynx_accel *accel,
-		 const char *pSrcbuf, /* pointer to start of source buffer in system memory */
-		 u32 srcDelta,          /* Pitch value (in bytes) of the source buffer, +ive means top down and -ive mean button up */
-		 u32 startBit, /* Mono data can start at any bit in a byte, this value should be 0 to 7 */
-		 u32 dBase,    /* Address of destination: offset in frame buffer */
+		 const char *pSrcbuf, /* pointer to start of source
+					buffer in system memory */
+		 u32 srcDelta, /* Pitch value (in bytes) of the source buffer,
+				+ive means top down and -ive mean button up */
+		 u32 startBit, /* Mono data can start at any bit in a byte,
+				 this value should be 0 to 7 */
+		 u32 dBase, /* Address of destination: offset in frame buffer */
 		 u32 dPitch,   /* Pitch value of destination surface in BYTE */
 		 u32 bytePerPixel,      /* Color depth of destination surface */
 		 u32 dx,
 		 u32 dy,       /* Starting coordinate of destination surface */
 		 u32 width,
 		 u32 height,   /* width and height of rectange in pixel value */
-		 u32 fColor,   /* Foreground color (corresponding to a 1 in the monochrome data */
-		 u32 bColor,   /* Background color (corresponding to a 0 in the monochrome data */
+		 u32 fColor,   /* Foreground color (corresponding to a 1 in the
+				 monochrome data */
+		 u32 bColor,   /* Background color (corresponding to a 0 in the
+				 monochrome data */
 		 u32 rop2);
 #endif
diff --git a/drivers/staging/sm750fb/sm750_help.h b/drivers/staging/sm750fb/sm750_help.h
index 05777f7..15ab927 100644
--- a/drivers/staging/sm750fb/sm750_help.h
+++ b/drivers/staging/sm750fb/sm750_help.h
@@ -49,17 +49,24 @@
 /* Field Macros */
 #define FIELD_START(field)              (0 ? field)
 #define FIELD_END(field)                (1 ? field)
-#define FIELD_SIZE(field)               (1 + FIELD_END(field) - FIELD_START(field))
-#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) | ((1 << (FIELD_SIZE(field)-1)) - 1)) << FIELD_START(field))
-#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> FIELD_START(field))
-#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & FIELD_MASK(field))
+#define FIELD_SIZE(field)               (1 + FIELD_END(field) - \
+					FIELD_START(field))
+#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) | \
+					 ((1 << (FIELD_SIZE(field)-1)) - 1)) \
+					<< FIELD_START(field))
+#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> \
+					FIELD_START(field))
+#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & \
+					FIELD_MASK(field))
 
 #define FIELD_INIT(reg, field, value)   FIELD_DENORMALIZE(reg ## _ ## field, \
-                                                          reg ## _ ## field ## _ ## value)
+					reg ## _ ## field ## _ ## value)
 #define FIELD_INIT_VAL(reg, field, value) \
-                                        (FIELD_DENORMALIZE(reg ## _ ## field, value))
+					(FIELD_DENORMALIZE( \
+					reg ## _ ## field, value))
 #define FIELD_VAL_SET(x, r, f, v)       x = x & ~FIELD_MASK(r ## _ ## f) \
-                                              | FIELD_DENORMALIZE(r ## _ ## f, r ## _ ## f ## _ ## v)
+					| FIELD_DENORMALIZE(r ## _ ## f, \
+						r ## _ ## f ## _ ## v)
 
 #define RGB(r, g, b) \
 ( \
@@ -68,7 +75,8 @@
 
 #define RGB16(r, g, b) \
 ( \
-    (unsigned short) ((((r) & 0xF8) << 8) | (((g) & 0xFC) << 3) | (((b) & 0xF8) >> 3)) \
+	(unsigned short) ((((r) & 0xF8) << 8) | (((g) & 0xFC) << 3) | \
+		(((b) & 0xF8) >> 3)) \
 )
 
 static inline unsigned int absDiff(unsigned int a, unsigned int b)
diff --git a/drivers/staging/sm750fb/sm750_hw.h b/drivers/staging/sm750fb/sm750_hw.h
index 93288b3..e96341a 100644
--- a/drivers/staging/sm750fb/sm750_hw.h
+++ b/drivers/staging/sm750fb/sm750_hw.h
@@ -61,13 +61,15 @@ struct sm750_state{
 	int yLCD;
 };
 
-/* 	sm750_share stands for a presentation of two frame buffer
-	that use one sm750 adaptor, it is similar to the super class of lynx_share
-	in C++
+/*
+	sm750_share stands for a presentation of two frame buffer
+	that use one sm750 adaptor, it is similar to the super
+	class of lynx_share in C++
 */
 
 struct sm750_share{
-	/* it's better to put lynx_share struct to the first place of sm750_share */
+	/* it's better to put lynx_share struct to the first place
+		of sm750_share */
 	struct lynx_share share;
 	struct sm750_state state;
 	int hwCursor;
@@ -85,10 +87,13 @@ int hw_sm750_deWait(void);
 int hw_sm750le_deWait(void);
 
 resource_size_t hw_sm750_getVMSize(struct lynx_share *);
-int hw_sm750_output_checkMode(struct lynxfb_output*, struct fb_var_screeninfo*);
-int hw_sm750_output_setMode(struct lynxfb_output*, struct fb_var_screeninfo*, struct fb_fix_screeninfo*);
+int hw_sm750_output_checkMode(struct lynxfb_output*,
+		struct fb_var_screeninfo*);
+int hw_sm750_output_setMode(struct lynxfb_output*,
+		struct fb_var_screeninfo*, struct fb_fix_screeninfo*);
 int hw_sm750_crtc_checkMode(struct lynxfb_crtc*, struct fb_var_screeninfo*);
-int hw_sm750_crtc_setMode(struct lynxfb_crtc*, struct fb_var_screeninfo*, struct fb_fix_screeninfo*);
+int hw_sm750_crtc_setMode(struct lynxfb_crtc*, struct fb_var_screeninfo*,
+		struct fb_fix_screeninfo*);
 int hw_sm750_setColReg(struct lynxfb_crtc*, ushort, ushort, ushort, ushort);
 int hw_sm750_setBLANK(struct lynxfb_output*, int);
 int hw_sm750le_setBLANK(struct lynxfb_output*, int);
-- 
1.9.1


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

* Re: [PATCH] sm750fb: coding style fixes lines over 80 chars
  2015-07-15 18:58 ` Vinay Simha BN
@ 2015-07-16  3:57   ` Joe Perches
  -1 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2015-07-16  3:57 UTC (permalink / raw)
  To: Vinay Simha BN
  Cc: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

On Thu, 2015-07-16 at 00:16 +0530, Vinay Simha BN wrote:
> scripts/checkpatch.pl kernel coding style fixes of WARNING

Please don't be a checkpatch robot.

Use tools to prompt your brain, but don't ever turn
your brain off.

> diff --git a/drivers/staging/sm750fb/ddk750_help.h b/drivers/staging/sm750fb/ddk750_help.h


> +/* if 718 big endian turned on,be aware that don't use this driver for general
> +	 use,only for ppc big-endian */
> +#warning "big endian on target cpu and enable nature big endian support of 718
> +	capability !"

Yes, this if #if 0, but it's also obviously incorrect

I didn't look at the rest.



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

* Re: [PATCH] sm750fb: coding style fixes lines over 80 chars
@ 2015-07-16  3:57   ` Joe Perches
  0 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2015-07-16  3:57 UTC (permalink / raw)
  To: Vinay Simha BN
  Cc: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

On Thu, 2015-07-16 at 00:16 +0530, Vinay Simha BN wrote:
> scripts/checkpatch.pl kernel coding style fixes of WARNING

Please don't be a checkpatch robot.

Use tools to prompt your brain, but don't ever turn
your brain off.

> diff --git a/drivers/staging/sm750fb/ddk750_help.h b/drivers/staging/sm750fb/ddk750_help.h


> +/* if 718 big endian turned on,be aware that don't use this driver for general
> +	 use,only for ppc big-endian */
> +#warning "big endian on target cpu and enable nature big endian support of 718
> +	capability !"

Yes, this if #if 0, but it's also obviously incorrect

I didn't look at the rest.



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

* Re: [PATCH] sm750fb: coding style fixes lines over 80 chars
  2015-07-16  3:57   ` Joe Perches
@ 2015-07-17  7:28     ` Vinay Simha
  -1 siblings, 0 replies; 28+ messages in thread
From: Vinay Simha @ 2015-07-17  7:16 UTC (permalink / raw)
  To: Joe Perches
  Cc: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

#if 0, but it's also obviously incorrect

It supposed to be some tag #ifdef CONFIG_** .
Could anybody in the loop can reply?

i was just checking on style checks.
Will skip this file , will take up later

On Thu, Jul 16, 2015 at 9:27 AM, Joe Perches <joe@perches.com> wrote:
> On Thu, 2015-07-16 at 00:16 +0530, Vinay Simha BN wrote:
>> scripts/checkpatch.pl kernel coding style fixes of WARNING
>
> Please don't be a checkpatch robot.
>
> Use tools to prompt your brain, but don't ever turn
> your brain off.
>
>> diff --git a/drivers/staging/sm750fb/ddk750_help.h b/drivers/staging/sm750fb/ddk750_help.h
>
>
>> +/* if 718 big endian turned on,be aware that don't use this driver for general
>> +      use,only for ppc big-endian */
>> +#warning "big endian on target cpu and enable nature big endian support of 718
>> +     capability !"
>
> Yes, this if #if 0, but it's also obviously incorrect
>
> I didn't look at the rest.
>
>



-- 
Regards,

Vinay Simha.B.N.

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

* [PATCH] sm750fb: coding style fixes lines over 80 chars
  2015-07-15 18:58 ` Vinay Simha BN
@ 2015-07-17  7:40 ` Vinay Simha BN
  -1 siblings, 0 replies; 28+ messages in thread
From: Vinay Simha BN @ 2015-07-17  7:28 UTC (permalink / raw)
  Cc: Vinay Simha BN, Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

scripts/checkpatch.pl kernel coding style fixes of WARNING

WARNING: line over 80 characters

Signed-off-by: Vinay Simha BN <simhavcs@gmail.com>
---
 drivers/staging/sm750fb/ddk750_display.h | 10 +++++-----
 drivers/staging/sm750fb/ddk750_hwi2c.h   |  6 ++++--
 drivers/staging/sm750fb/ddk750_power.h   |  6 +++---
 drivers/staging/sm750fb/ddk750_sii164.h  | 12 +++++++-----
 drivers/staging/sm750fb/sm750.h          | 13 ++++++++-----
 drivers/staging/sm750fb/sm750_accel.h    | 19 ++++++++++++-------
 drivers/staging/sm750fb/sm750_help.h     | 21 ++++++++++++++-------
 drivers/staging/sm750fb/sm750_hw.h       | 21 +++++++++++++--------
 8 files changed, 66 insertions(+), 42 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_display.h b/drivers/staging/sm750fb/ddk750_display.h
index abccf84..9afa366 100644
--- a/drivers/staging/sm750fb/ddk750_display.h
+++ b/drivers/staging/sm750fb/ddk750_display.h
@@ -110,19 +110,19 @@ typedef enum _disp_output_t {
 
 	/* LCD1 show secondary and DSUB show primary */
 	LCD1_DSUB_DUAL_SWAP = PNL_2_SEC|SEC_TP_ON|PNL_SEQ_ON|
-							CRT_2_PRI|PRI_TP_ON|DAC_ON,
+				CRT_2_PRI|PRI_TP_ON|DAC_ON,
 
 	LCD1_LCD2_PRI = PNL_2_PRI|PRI_TP_ON|PNL_SEQ_ON|
-					CRT_2_PRI|SEC_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
+				CRT_2_PRI|SEC_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
 
 	LCD1_LCD2_SEC = PNL_2_SEC|SEC_TP_ON|PNL_SEQ_ON|
-					CRT_2_SEC|PRI_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
+				CRT_2_SEC|PRI_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
 
 	LCD1_LCD2_DSUB_PRI = PNL_2_PRI|PRI_TP_ON|PNL_SEQ_ON|DAC_ON|
-						CRT_2_PRI|SEC_TP_OFF|DPMS_ON|DUAL_TFT_ON,
+				CRT_2_PRI|SEC_TP_OFF|DPMS_ON|DUAL_TFT_ON,
 
 	LCD1_LCD2_DSUB_SEC = PNL_2_SEC|SEC_TP_ON|PNL_SEQ_ON|DAC_ON|
-						CRT_2_SEC|PRI_TP_OFF|DPMS_ON|DUAL_TFT_ON,
+				CRT_2_SEC|PRI_TP_OFF|DPMS_ON|DUAL_TFT_ON,
 
 
 }
diff --git a/drivers/staging/sm750fb/ddk750_hwi2c.h b/drivers/staging/sm750fb/ddk750_hwi2c.h
index 0b830ba6..3d4e48b 100644
--- a/drivers/staging/sm750fb/ddk750_hwi2c.h
+++ b/drivers/staging/sm750fb/ddk750_hwi2c.h
@@ -5,6 +5,8 @@
 int hwI2CInit(unsigned char busSpeedMode);
 void hwI2CClose(void);
 
-unsigned char hwI2CReadReg(unsigned char deviceAddress, unsigned char registerIndex);
-int hwI2CWriteReg(unsigned char deviceAddress, unsigned char registerIndex, unsigned char data);
+unsigned char hwI2CReadReg(unsigned char deviceAddress,
+	unsigned char registerIndex);
+int hwI2CWriteReg(unsigned char deviceAddress, unsigned char registerIndex,
+	unsigned char data);
 #endif
diff --git a/drivers/staging/sm750fb/ddk750_power.h b/drivers/staging/sm750fb/ddk750_power.h
index b7cf6b2..abad4fe 100644
--- a/drivers/staging/sm750fb/ddk750_power.h
+++ b/drivers/staging/sm750fb/ddk750_power.h
@@ -12,9 +12,9 @@ DPMS_t;
 #define setDAC(off) \
 		{	\
 		POKE32(MISC_CTRL, FIELD_VALUE(PEEK32(MISC_CTRL), \
-									MISC_CTRL,	\
-									DAC_POWER,	\
-									off));	\
+			MISC_CTRL,	\
+			DAC_POWER,	\
+			off));		\
 		}
 
 void ddk750_setDPMS(DPMS_t);
diff --git a/drivers/staging/sm750fb/ddk750_sii164.h b/drivers/staging/sm750fb/ddk750_sii164.h
index f2610c9..a5246bd 100644
--- a/drivers/staging/sm750fb/ddk750_sii164.h
+++ b/drivers/staging/sm750fb/ddk750_sii164.h
@@ -5,10 +5,11 @@
 
 /* Hot Plug detection mode structure */
 typedef enum _sii164_hot_plug_mode_t {
-	SII164_HOTPLUG_DISABLE = 0,         /* Disable Hot Plug output bit (always high). */
-	SII164_HOTPLUG_USE_MDI,             /* Use Monitor Detect Interrupt bit. */
-	SII164_HOTPLUG_USE_RSEN,            /* Use Receiver Sense detect bit. */
-	SII164_HOTPLUG_USE_HTPLG            /* Use Hot Plug detect bit. */
+	SII164_HOTPLUG_DISABLE = 0, /* Disable Hot Plug output bit
+					(always high) */
+	SII164_HOTPLUG_USE_MDI,     /* Use Monitor Detect Interrupt bit. */
+	SII164_HOTPLUG_USE_RSEN,    /* Use Receiver Sense detect bit. */
+	SII164_HOTPLUG_USE_HTPLG    /* Use Hot Plug detect bit. */
 } sii164_hot_plug_mode_t;
 
 
@@ -39,7 +40,8 @@ unsigned char sii164IsConnected(void);
 unsigned char sii164CheckInterrupt(void);
 void sii164ClearInterrupt(void);
 #endif
-/* below register definination is used for Silicon Image SiI164 DVI controller chip */
+/* below register definination is used for Silicon Image
+	SiI164 DVI controller chip */
 /*
  * Vendor ID registers
  */
diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index 9b101a9..e2bd920 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -32,9 +32,10 @@ struct lynx_accel {
 						u32, u32, u32, u32,
 						u32, u32, u32, u32);
 
-	int (*de_imageblit)(struct lynx_accel *, const char *, u32, u32, u32, u32,
-							       u32, u32, u32, u32,
-							       u32, u32, u32, u32);
+	int (*de_imageblit)(struct lynx_accel *, const char *,
+						u32, u32, u32, u32,
+						u32, u32, u32, u32,
+						u32, u32, u32, u32);
 
 };
 
@@ -100,7 +101,8 @@ struct lynxfb_crtc {
 	int channel;/* which channel this crtc stands for*/
 	resource_size_t vidmem_size;/* this view's video memory max size */
 
-	/* below attributes belong to info->fix, their value depends on specific adaptor*/
+	/* below attributes belong to info->fix, their value depends on
+		 specific adaptor*/
 	u16 line_pad;/* padding information:0,1,2,4,8,16,... */
 	u16 xpanstep;
 	u16 ypanstep;
@@ -113,7 +115,8 @@ struct lynxfb_crtc {
 						struct fb_fix_screeninfo*);
 
 	int (*proc_checkMode)(struct lynxfb_crtc*, struct fb_var_screeninfo*);
-	int (*proc_setColReg)(struct lynxfb_crtc*, ushort, ushort, ushort, ushort);
+	int (*proc_setColReg)(struct lynxfb_crtc*, ushort, ushort, ushort,
+				 ushort);
 	void (*clear)(struct lynxfb_crtc*);
 	/* pan display */
 	int (*proc_panDisplay)(struct lynxfb_crtc *,
diff --git a/drivers/staging/sm750fb/sm750_accel.h b/drivers/staging/sm750fb/sm750_accel.h
index f252e47..da067a0 100644
--- a/drivers/staging/sm750fb/sm750_accel.h
+++ b/drivers/staging/sm750fb/sm750_accel.h
@@ -26,7 +26,7 @@
 #define DE_SOURCE_WRAP_ENABLE                           1
 #define DE_SOURCE_X_K1                                  29:16
 #define DE_SOURCE_Y_K2                                  15:0
-#define DE_SOURCE_X_K1_MONO				20:16
+#define DE_SOURCE_X_K1_MONO				{ 20:16 }
 
 #define DE_DESTINATION                                  0x4
 #define DE_DESTINATION_WRAP                             31:31
@@ -259,17 +259,22 @@ unsigned int height, /* width and height of rectangle in pixel value */
 unsigned int rop2);
 
 int hw_imageblit(struct lynx_accel *accel,
-		 const char *pSrcbuf, /* pointer to start of source buffer in system memory */
-		 u32 srcDelta,          /* Pitch value (in bytes) of the source buffer, +ive means top down and -ive mean button up */
-		 u32 startBit, /* Mono data can start at any bit in a byte, this value should be 0 to 7 */
-		 u32 dBase,    /* Address of destination: offset in frame buffer */
+		 const char *pSrcbuf, /* pointer to start of source
+					buffer in system memory */
+		 u32 srcDelta, /* Pitch value (in bytes) of the source buffer,
+				+ive means top down and -ive mean button up */
+		 u32 startBit, /* Mono data can start at any bit in a byte,
+				 this value should be 0 to 7 */
+		 u32 dBase, /* Address of destination: offset in frame buffer */
 		 u32 dPitch,   /* Pitch value of destination surface in BYTE */
 		 u32 bytePerPixel,      /* Color depth of destination surface */
 		 u32 dx,
 		 u32 dy,       /* Starting coordinate of destination surface */
 		 u32 width,
 		 u32 height,   /* width and height of rectange in pixel value */
-		 u32 fColor,   /* Foreground color (corresponding to a 1 in the monochrome data */
-		 u32 bColor,   /* Background color (corresponding to a 0 in the monochrome data */
+		 u32 fColor,   /* Foreground color (corresponding to a 1 in the
+				 monochrome data */
+		 u32 bColor,   /* Background color (corresponding to a 0 in the
+				 monochrome data */
 		 u32 rop2);
 #endif
diff --git a/drivers/staging/sm750fb/sm750_help.h b/drivers/staging/sm750fb/sm750_help.h
index 8dc6bd2..43d700b 100644
--- a/drivers/staging/sm750fb/sm750_help.h
+++ b/drivers/staging/sm750fb/sm750_help.h
@@ -49,17 +49,23 @@
 /* Field Macros */
 #define FIELD_START(field)              (0 ? field)
 #define FIELD_END(field)                (1 ? field)
-#define FIELD_SIZE(field)               (1 + FIELD_END(field) - FIELD_START(field))
-#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) | ((1 << (FIELD_SIZE(field)-1)) - 1)) << FIELD_START(field))
-#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> FIELD_START(field))
-#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & FIELD_MASK(field))
+#define FIELD_SIZE(field)               (1 + FIELD_END(field) - \
+						FIELD_START(field))
+#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) \
+					| ((1 << (FIELD_SIZE(field)-1)) - 1)) \
+					<< FIELD_START(field))
+#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> \
+					FIELD_START(field))
+#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & \
+					 FIELD_MASK(field))
 
 #define FIELD_INIT(reg, field, value)   FIELD_DENORMALIZE(reg ## _ ## field, \
-							  reg ## _ ## field ## _ ## value)
+					  reg ## _ ## field ## _ ## value)
 #define FIELD_INIT_VAL(reg, field, value) \
 	(FIELD_DENORMALIZE(reg ## _ ## field, value))
 #define FIELD_VAL_SET(x, r, f, v)       x = x & ~FIELD_MASK(r ## _ ## f) \
-					| FIELD_DENORMALIZE(r ## _ ## f, r ## _ ## f ## _ ## v)
+					| FIELD_DENORMALIZE(r ## _ ## f, \
+					 r ## _ ## f ## _ ## v)
 
 #define RGB(r, g, b) \
 ( \
@@ -68,7 +74,8 @@
 
 #define RGB16(r, g, b) \
 ( \
-	(unsigned short) ((((r) & 0xF8) << 8) | (((g) & 0xFC) << 3) | (((b) & 0xF8) >> 3)) \
+	(unsigned short) ((((r) & 0xF8) << 8) | (((g) & 0xFC) << 3) | \
+			 (((b) & 0xF8) >> 3)) \
 )
 
 static inline unsigned int absDiff(unsigned int a, unsigned int b)
diff --git a/drivers/staging/sm750fb/sm750_hw.h b/drivers/staging/sm750fb/sm750_hw.h
index ef0a16f..eceea39 100644
--- a/drivers/staging/sm750fb/sm750_hw.h
+++ b/drivers/staging/sm750fb/sm750_hw.h
@@ -61,13 +61,15 @@ struct sm750_state {
 	int yLCD;
 };
 
-/* sm750_share stands for a presentation of two frame buffer
-   that use one sm750 adaptor, it is similar to the super class of lynx_share
-   in C++
- */
+/*
+ sm750_share stands for a presentation of two frame buffer
+ that use one sm750 adaptor, it is similar to the super
+ class of lynx_share in C++
+*/
 
 struct sm750_share {
-	/* it's better to put lynx_share struct to the first place of sm750_share */
+	/* it's better to put lynx_share struct to the first place of
+	sm750_share */
 	struct lynx_share share;
 	struct sm750_state state;
 	int hwCursor;
@@ -85,10 +87,13 @@ int hw_sm750_deWait(void);
 int hw_sm750le_deWait(void);
 
 resource_size_t hw_sm750_getVMSize(struct lynx_share *);
-int hw_sm750_output_checkMode(struct lynxfb_output*, struct fb_var_screeninfo*);
-int hw_sm750_output_setMode(struct lynxfb_output*, struct fb_var_screeninfo*, struct fb_fix_screeninfo*);
+int hw_sm750_output_checkMode(struct lynxfb_output*,
+		struct fb_var_screeninfo*);
+int hw_sm750_output_setMode(struct lynxfb_output*,
+		struct fb_var_screeninfo*, struct fb_fix_screeninfo*);
 int hw_sm750_crtc_checkMode(struct lynxfb_crtc*, struct fb_var_screeninfo*);
-int hw_sm750_crtc_setMode(struct lynxfb_crtc*, struct fb_var_screeninfo*, struct fb_fix_screeninfo*);
+int hw_sm750_crtc_setMode(struct lynxfb_crtc*, struct fb_var_screeninfo*,
+		struct fb_fix_screeninfo*);
 int hw_sm750_setColReg(struct lynxfb_crtc*, ushort, ushort, ushort, ushort);
 int hw_sm750_setBLANK(struct lynxfb_output*, int);
 int hw_sm750le_setBLANK(struct lynxfb_output*, int);
-- 
2.1.2


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

* Re: [PATCH] sm750fb: coding style fixes lines over 80 chars
@ 2015-07-17  7:28     ` Vinay Simha
  0 siblings, 0 replies; 28+ messages in thread
From: Vinay Simha @ 2015-07-17  7:28 UTC (permalink / raw)
  To: Joe Perches
  Cc: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

#if 0, but it's also obviously incorrect

It supposed to be some tag #ifdef CONFIG_** .
Could anybody in the loop can reply?

i was just checking on style checks.
Will skip this file , will take up later

On Thu, Jul 16, 2015 at 9:27 AM, Joe Perches <joe@perches.com> wrote:
> On Thu, 2015-07-16 at 00:16 +0530, Vinay Simha BN wrote:
>> scripts/checkpatch.pl kernel coding style fixes of WARNING
>
> Please don't be a checkpatch robot.
>
> Use tools to prompt your brain, but don't ever turn
> your brain off.
>
>> diff --git a/drivers/staging/sm750fb/ddk750_help.h b/drivers/staging/sm750fb/ddk750_help.h
>
>
>> +/* if 718 big endian turned on,be aware that don't use this driver for general
>> +      use,only for ppc big-endian */
>> +#warning "big endian on target cpu and enable nature big endian support of 718
>> +     capability !"
>
> Yes, this if #if 0, but it's also obviously incorrect
>
> I didn't look at the rest.
>
>



-- 
Regards,

Vinay Simha.B.N.

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

* Re: [PATCH] sm750fb: coding style fixes lines over 80 chars
  2015-07-17  7:40 ` Vinay Simha BN
@ 2015-07-17  7:38   ` Joe Perches
  -1 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2015-07-17  7:38 UTC (permalink / raw)
  To: Vinay Simha BN
  Cc: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

On Fri, 2015-07-17 at 12:58 +0530, Vinay Simha BN wrote:
> scripts/checkpatch.pl kernel coding style fixes of WARNING

Please use checkpatch's --strict option until you know
kernel style much better.

> diff --git a/drivers/staging/sm750fb/sm750_accel.h b/drivers/staging/sm750fb/sm750_accel.h
[]
> @@ -259,17 +259,22 @@ unsigned int height, /* width and height of rectangle in pixel value */
>  unsigned int rop2);
>  
>  int hw_imageblit(struct lynx_accel *accel,
> -		 const char *pSrcbuf, /* pointer to start of source buffer in system memory */
> -		 u32 srcDelta,          /* Pitch value (in bytes) of the source buffer, +ive means top down and -ive mean button up */
> -		 u32 startBit, /* Mono data can start at any bit in a byte, this value should be 0 to 7 */
> -		 u32 dBase,    /* Address of destination: offset in frame buffer */
> +		 const char *pSrcbuf, /* pointer to start of source
> +					buffer in system memory */

If you change these lines, please use normal kernel comment style.
/*
 * comment block
 */

> diff --git a/drivers/staging/sm750fb/sm750_help.h b/drivers/staging/sm750fb/sm750_help.h
[]
> @@ -49,17 +49,23 @@
>  /* Field Macros */
>  #define FIELD_START(field)              (0 ? field)
>  #define FIELD_END(field)                (1 ? field)

Odd statements.

> -#define FIELD_SIZE(field)               (1 + FIELD_END(field) - FIELD_START(field))
> -#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) | ((1 << (FIELD_SIZE(field)-1)) - 1)) << FIELD_START(field))
> -#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> FIELD_START(field))
> -#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & FIELD_MASK(field))
> +#define FIELD_SIZE(field)               (1 + FIELD_END(field) - \
> +						FIELD_START(field))
> +#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) \
> +					| ((1 << (FIELD_SIZE(field)-1)) - 1)) \
> +					<< FIELD_START(field))
> +#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> \
> +					FIELD_START(field))
> +#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & \
> +					 FIELD_MASK(field))
>  
>  #define FIELD_INIT(reg, field, value)   FIELD_DENORMALIZE(reg ## _ ## field, \
> -							  reg ## _ ## field ## _ ## value)
> +					  reg ## _ ## field ## _ ## value)
>  #define FIELD_INIT_VAL(reg, field, value) \
>  	(FIELD_DENORMALIZE(reg ## _ ## field, value))
>  #define FIELD_VAL_SET(x, r, f, v)       x = x & ~FIELD_MASK(r ## _ ## f) \
> -					| FIELD_DENORMALIZE(r ## _ ## f, r ## _ ## f ## _ ## v)
> +					| FIELD_DENORMALIZE(r ## _ ## f, \
> +					 r ## _ ## f ## _ ## v)

I think _none_ of these are actually used so it'd
be better to delete them instead.


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

* Re: [PATCH] sm750fb: coding style fixes lines over 80 chars
@ 2015-07-17  7:38   ` Joe Perches
  0 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2015-07-17  7:38 UTC (permalink / raw)
  To: Vinay Simha BN
  Cc: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

On Fri, 2015-07-17 at 12:58 +0530, Vinay Simha BN wrote:
> scripts/checkpatch.pl kernel coding style fixes of WARNING

Please use checkpatch's --strict option until you know
kernel style much better.

> diff --git a/drivers/staging/sm750fb/sm750_accel.h b/drivers/staging/sm750fb/sm750_accel.h
[]
> @@ -259,17 +259,22 @@ unsigned int height, /* width and height of rectangle in pixel value */
>  unsigned int rop2);
>  
>  int hw_imageblit(struct lynx_accel *accel,
> -		 const char *pSrcbuf, /* pointer to start of source buffer in system memory */
> -		 u32 srcDelta,          /* Pitch value (in bytes) of the source buffer, +ive means top down and -ive mean button up */
> -		 u32 startBit, /* Mono data can start at any bit in a byte, this value should be 0 to 7 */
> -		 u32 dBase,    /* Address of destination: offset in frame buffer */
> +		 const char *pSrcbuf, /* pointer to start of source
> +					buffer in system memory */

If you change these lines, please use normal kernel comment style.
/*
 * comment block
 */

> diff --git a/drivers/staging/sm750fb/sm750_help.h b/drivers/staging/sm750fb/sm750_help.h
[]
> @@ -49,17 +49,23 @@
>  /* Field Macros */
>  #define FIELD_START(field)              (0 ? field)
>  #define FIELD_END(field)                (1 ? field)

Odd statements.

> -#define FIELD_SIZE(field)               (1 + FIELD_END(field) - FIELD_START(field))
> -#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) | ((1 << (FIELD_SIZE(field)-1)) - 1)) << FIELD_START(field))
> -#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> FIELD_START(field))
> -#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & FIELD_MASK(field))
> +#define FIELD_SIZE(field)               (1 + FIELD_END(field) - \
> +						FIELD_START(field))
> +#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) \
> +					| ((1 << (FIELD_SIZE(field)-1)) - 1)) \
> +					<< FIELD_START(field))
> +#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> \
> +					FIELD_START(field))
> +#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & \
> +					 FIELD_MASK(field))
>  
>  #define FIELD_INIT(reg, field, value)   FIELD_DENORMALIZE(reg ## _ ## field, \
> -							  reg ## _ ## field ## _ ## value)
> +					  reg ## _ ## field ## _ ## value)
>  #define FIELD_INIT_VAL(reg, field, value) \
>  	(FIELD_DENORMALIZE(reg ## _ ## field, value))
>  #define FIELD_VAL_SET(x, r, f, v)       x = x & ~FIELD_MASK(r ## _ ## f) \
> -					| FIELD_DENORMALIZE(r ## _ ## f, r ## _ ## f ## _ ## v)
> +					| FIELD_DENORMALIZE(r ## _ ## f, \
> +					 r ## _ ## f ## _ ## v)

I think _none_ of these are actually used so it'd
be better to delete them instead.


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

* [PATCH] sm750fb: coding style fixes lines over 80 chars
@ 2015-07-17  7:40 ` Vinay Simha BN
  0 siblings, 0 replies; 28+ messages in thread
From: Vinay Simha BN @ 2015-07-17  7:40 UTC (permalink / raw)
  Cc: Vinay Simha BN, Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

scripts/checkpatch.pl kernel coding style fixes of WARNING

WARNING: line over 80 characters

Signed-off-by: Vinay Simha BN <simhavcs@gmail.com>
---
 drivers/staging/sm750fb/ddk750_display.h | 10 +++++-----
 drivers/staging/sm750fb/ddk750_hwi2c.h   |  6 ++++--
 drivers/staging/sm750fb/ddk750_power.h   |  6 +++---
 drivers/staging/sm750fb/ddk750_sii164.h  | 12 +++++++-----
 drivers/staging/sm750fb/sm750.h          | 13 ++++++++-----
 drivers/staging/sm750fb/sm750_accel.h    | 19 ++++++++++++-------
 drivers/staging/sm750fb/sm750_help.h     | 21 ++++++++++++++-------
 drivers/staging/sm750fb/sm750_hw.h       | 21 +++++++++++++--------
 8 files changed, 66 insertions(+), 42 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_display.h b/drivers/staging/sm750fb/ddk750_display.h
index abccf84..9afa366 100644
--- a/drivers/staging/sm750fb/ddk750_display.h
+++ b/drivers/staging/sm750fb/ddk750_display.h
@@ -110,19 +110,19 @@ typedef enum _disp_output_t {
 
 	/* LCD1 show secondary and DSUB show primary */
 	LCD1_DSUB_DUAL_SWAP = PNL_2_SEC|SEC_TP_ON|PNL_SEQ_ON|
-							CRT_2_PRI|PRI_TP_ON|DAC_ON,
+				CRT_2_PRI|PRI_TP_ON|DAC_ON,
 
 	LCD1_LCD2_PRI = PNL_2_PRI|PRI_TP_ON|PNL_SEQ_ON|
-					CRT_2_PRI|SEC_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
+				CRT_2_PRI|SEC_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
 
 	LCD1_LCD2_SEC = PNL_2_SEC|SEC_TP_ON|PNL_SEQ_ON|
-					CRT_2_SEC|PRI_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
+				CRT_2_SEC|PRI_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
 
 	LCD1_LCD2_DSUB_PRI = PNL_2_PRI|PRI_TP_ON|PNL_SEQ_ON|DAC_ON|
-						CRT_2_PRI|SEC_TP_OFF|DPMS_ON|DUAL_TFT_ON,
+				CRT_2_PRI|SEC_TP_OFF|DPMS_ON|DUAL_TFT_ON,
 
 	LCD1_LCD2_DSUB_SEC = PNL_2_SEC|SEC_TP_ON|PNL_SEQ_ON|DAC_ON|
-						CRT_2_SEC|PRI_TP_OFF|DPMS_ON|DUAL_TFT_ON,
+				CRT_2_SEC|PRI_TP_OFF|DPMS_ON|DUAL_TFT_ON,
 
 
 }
diff --git a/drivers/staging/sm750fb/ddk750_hwi2c.h b/drivers/staging/sm750fb/ddk750_hwi2c.h
index 0b830ba6..3d4e48b 100644
--- a/drivers/staging/sm750fb/ddk750_hwi2c.h
+++ b/drivers/staging/sm750fb/ddk750_hwi2c.h
@@ -5,6 +5,8 @@
 int hwI2CInit(unsigned char busSpeedMode);
 void hwI2CClose(void);
 
-unsigned char hwI2CReadReg(unsigned char deviceAddress, unsigned char registerIndex);
-int hwI2CWriteReg(unsigned char deviceAddress, unsigned char registerIndex, unsigned char data);
+unsigned char hwI2CReadReg(unsigned char deviceAddress,
+	unsigned char registerIndex);
+int hwI2CWriteReg(unsigned char deviceAddress, unsigned char registerIndex,
+	unsigned char data);
 #endif
diff --git a/drivers/staging/sm750fb/ddk750_power.h b/drivers/staging/sm750fb/ddk750_power.h
index b7cf6b2..abad4fe 100644
--- a/drivers/staging/sm750fb/ddk750_power.h
+++ b/drivers/staging/sm750fb/ddk750_power.h
@@ -12,9 +12,9 @@ DPMS_t;
 #define setDAC(off) \
 		{	\
 		POKE32(MISC_CTRL, FIELD_VALUE(PEEK32(MISC_CTRL), \
-									MISC_CTRL,	\
-									DAC_POWER,	\
-									off));	\
+			MISC_CTRL,	\
+			DAC_POWER,	\
+			off));		\
 		}
 
 void ddk750_setDPMS(DPMS_t);
diff --git a/drivers/staging/sm750fb/ddk750_sii164.h b/drivers/staging/sm750fb/ddk750_sii164.h
index f2610c9..a5246bd 100644
--- a/drivers/staging/sm750fb/ddk750_sii164.h
+++ b/drivers/staging/sm750fb/ddk750_sii164.h
@@ -5,10 +5,11 @@
 
 /* Hot Plug detection mode structure */
 typedef enum _sii164_hot_plug_mode_t {
-	SII164_HOTPLUG_DISABLE = 0,         /* Disable Hot Plug output bit (always high). */
-	SII164_HOTPLUG_USE_MDI,             /* Use Monitor Detect Interrupt bit. */
-	SII164_HOTPLUG_USE_RSEN,            /* Use Receiver Sense detect bit. */
-	SII164_HOTPLUG_USE_HTPLG            /* Use Hot Plug detect bit. */
+	SII164_HOTPLUG_DISABLE = 0, /* Disable Hot Plug output bit
+					(always high) */
+	SII164_HOTPLUG_USE_MDI,     /* Use Monitor Detect Interrupt bit. */
+	SII164_HOTPLUG_USE_RSEN,    /* Use Receiver Sense detect bit. */
+	SII164_HOTPLUG_USE_HTPLG    /* Use Hot Plug detect bit. */
 } sii164_hot_plug_mode_t;
 
 
@@ -39,7 +40,8 @@ unsigned char sii164IsConnected(void);
 unsigned char sii164CheckInterrupt(void);
 void sii164ClearInterrupt(void);
 #endif
-/* below register definination is used for Silicon Image SiI164 DVI controller chip */
+/* below register definination is used for Silicon Image
+	SiI164 DVI controller chip */
 /*
  * Vendor ID registers
  */
diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index 9b101a9..e2bd920 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -32,9 +32,10 @@ struct lynx_accel {
 						u32, u32, u32, u32,
 						u32, u32, u32, u32);
 
-	int (*de_imageblit)(struct lynx_accel *, const char *, u32, u32, u32, u32,
-							       u32, u32, u32, u32,
-							       u32, u32, u32, u32);
+	int (*de_imageblit)(struct lynx_accel *, const char *,
+						u32, u32, u32, u32,
+						u32, u32, u32, u32,
+						u32, u32, u32, u32);
 
 };
 
@@ -100,7 +101,8 @@ struct lynxfb_crtc {
 	int channel;/* which channel this crtc stands for*/
 	resource_size_t vidmem_size;/* this view's video memory max size */
 
-	/* below attributes belong to info->fix, their value depends on specific adaptor*/
+	/* below attributes belong to info->fix, their value depends on
+		 specific adaptor*/
 	u16 line_pad;/* padding information:0,1,2,4,8,16,... */
 	u16 xpanstep;
 	u16 ypanstep;
@@ -113,7 +115,8 @@ struct lynxfb_crtc {
 						struct fb_fix_screeninfo*);
 
 	int (*proc_checkMode)(struct lynxfb_crtc*, struct fb_var_screeninfo*);
-	int (*proc_setColReg)(struct lynxfb_crtc*, ushort, ushort, ushort, ushort);
+	int (*proc_setColReg)(struct lynxfb_crtc*, ushort, ushort, ushort,
+				 ushort);
 	void (*clear)(struct lynxfb_crtc*);
 	/* pan display */
 	int (*proc_panDisplay)(struct lynxfb_crtc *,
diff --git a/drivers/staging/sm750fb/sm750_accel.h b/drivers/staging/sm750fb/sm750_accel.h
index f252e47..da067a0 100644
--- a/drivers/staging/sm750fb/sm750_accel.h
+++ b/drivers/staging/sm750fb/sm750_accel.h
@@ -26,7 +26,7 @@
 #define DE_SOURCE_WRAP_ENABLE                           1
 #define DE_SOURCE_X_K1                                  29:16
 #define DE_SOURCE_Y_K2                                  15:0
-#define DE_SOURCE_X_K1_MONO				20:16
+#define DE_SOURCE_X_K1_MONO				{ 20:16 }
 
 #define DE_DESTINATION                                  0x4
 #define DE_DESTINATION_WRAP                             31:31
@@ -259,17 +259,22 @@ unsigned int height, /* width and height of rectangle in pixel value */
 unsigned int rop2);
 
 int hw_imageblit(struct lynx_accel *accel,
-		 const char *pSrcbuf, /* pointer to start of source buffer in system memory */
-		 u32 srcDelta,          /* Pitch value (in bytes) of the source buffer, +ive means top down and -ive mean button up */
-		 u32 startBit, /* Mono data can start at any bit in a byte, this value should be 0 to 7 */
-		 u32 dBase,    /* Address of destination: offset in frame buffer */
+		 const char *pSrcbuf, /* pointer to start of source
+					buffer in system memory */
+		 u32 srcDelta, /* Pitch value (in bytes) of the source buffer,
+				+ive means top down and -ive mean button up */
+		 u32 startBit, /* Mono data can start at any bit in a byte,
+				 this value should be 0 to 7 */
+		 u32 dBase, /* Address of destination: offset in frame buffer */
 		 u32 dPitch,   /* Pitch value of destination surface in BYTE */
 		 u32 bytePerPixel,      /* Color depth of destination surface */
 		 u32 dx,
 		 u32 dy,       /* Starting coordinate of destination surface */
 		 u32 width,
 		 u32 height,   /* width and height of rectange in pixel value */
-		 u32 fColor,   /* Foreground color (corresponding to a 1 in the monochrome data */
-		 u32 bColor,   /* Background color (corresponding to a 0 in the monochrome data */
+		 u32 fColor,   /* Foreground color (corresponding to a 1 in the
+				 monochrome data */
+		 u32 bColor,   /* Background color (corresponding to a 0 in the
+				 monochrome data */
 		 u32 rop2);
 #endif
diff --git a/drivers/staging/sm750fb/sm750_help.h b/drivers/staging/sm750fb/sm750_help.h
index 8dc6bd2..43d700b 100644
--- a/drivers/staging/sm750fb/sm750_help.h
+++ b/drivers/staging/sm750fb/sm750_help.h
@@ -49,17 +49,23 @@
 /* Field Macros */
 #define FIELD_START(field)              (0 ? field)
 #define FIELD_END(field)                (1 ? field)
-#define FIELD_SIZE(field)               (1 + FIELD_END(field) - FIELD_START(field))
-#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) | ((1 << (FIELD_SIZE(field)-1)) - 1)) << FIELD_START(field))
-#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> FIELD_START(field))
-#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & FIELD_MASK(field))
+#define FIELD_SIZE(field)               (1 + FIELD_END(field) - \
+						FIELD_START(field))
+#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) \
+					| ((1 << (FIELD_SIZE(field)-1)) - 1)) \
+					<< FIELD_START(field))
+#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> \
+					FIELD_START(field))
+#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & \
+					 FIELD_MASK(field))
 
 #define FIELD_INIT(reg, field, value)   FIELD_DENORMALIZE(reg ## _ ## field, \
-							  reg ## _ ## field ## _ ## value)
+					  reg ## _ ## field ## _ ## value)
 #define FIELD_INIT_VAL(reg, field, value) \
 	(FIELD_DENORMALIZE(reg ## _ ## field, value))
 #define FIELD_VAL_SET(x, r, f, v)       x = x & ~FIELD_MASK(r ## _ ## f) \
-					| FIELD_DENORMALIZE(r ## _ ## f, r ## _ ## f ## _ ## v)
+					| FIELD_DENORMALIZE(r ## _ ## f, \
+					 r ## _ ## f ## _ ## v)
 
 #define RGB(r, g, b) \
 ( \
@@ -68,7 +74,8 @@
 
 #define RGB16(r, g, b) \
 ( \
-	(unsigned short) ((((r) & 0xF8) << 8) | (((g) & 0xFC) << 3) | (((b) & 0xF8) >> 3)) \
+	(unsigned short) ((((r) & 0xF8) << 8) | (((g) & 0xFC) << 3) | \
+			 (((b) & 0xF8) >> 3)) \
 )
 
 static inline unsigned int absDiff(unsigned int a, unsigned int b)
diff --git a/drivers/staging/sm750fb/sm750_hw.h b/drivers/staging/sm750fb/sm750_hw.h
index ef0a16f..eceea39 100644
--- a/drivers/staging/sm750fb/sm750_hw.h
+++ b/drivers/staging/sm750fb/sm750_hw.h
@@ -61,13 +61,15 @@ struct sm750_state {
 	int yLCD;
 };
 
-/* sm750_share stands for a presentation of two frame buffer
-   that use one sm750 adaptor, it is similar to the super class of lynx_share
-   in C++
- */
+/*
+ sm750_share stands for a presentation of two frame buffer
+ that use one sm750 adaptor, it is similar to the super
+ class of lynx_share in C++
+*/
 
 struct sm750_share {
-	/* it's better to put lynx_share struct to the first place of sm750_share */
+	/* it's better to put lynx_share struct to the first place of
+	sm750_share */
 	struct lynx_share share;
 	struct sm750_state state;
 	int hwCursor;
@@ -85,10 +87,13 @@ int hw_sm750_deWait(void);
 int hw_sm750le_deWait(void);
 
 resource_size_t hw_sm750_getVMSize(struct lynx_share *);
-int hw_sm750_output_checkMode(struct lynxfb_output*, struct fb_var_screeninfo*);
-int hw_sm750_output_setMode(struct lynxfb_output*, struct fb_var_screeninfo*, struct fb_fix_screeninfo*);
+int hw_sm750_output_checkMode(struct lynxfb_output*,
+		struct fb_var_screeninfo*);
+int hw_sm750_output_setMode(struct lynxfb_output*,
+		struct fb_var_screeninfo*, struct fb_fix_screeninfo*);
 int hw_sm750_crtc_checkMode(struct lynxfb_crtc*, struct fb_var_screeninfo*);
-int hw_sm750_crtc_setMode(struct lynxfb_crtc*, struct fb_var_screeninfo*, struct fb_fix_screeninfo*);
+int hw_sm750_crtc_setMode(struct lynxfb_crtc*, struct fb_var_screeninfo*,
+		struct fb_fix_screeninfo*);
 int hw_sm750_setColReg(struct lynxfb_crtc*, ushort, ushort, ushort, ushort);
 int hw_sm750_setBLANK(struct lynxfb_output*, int);
 int hw_sm750le_setBLANK(struct lynxfb_output*, int);
-- 
2.1.2


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

* [PATCH] sm750fb: coding style fixes in _accel.h,__help.h
  2015-07-17  7:38   ` Joe Perches
@ 2015-07-21  6:56     ` Vinay Simha BN
  -1 siblings, 0 replies; 28+ messages in thread
From: Vinay Simha BN @ 2015-07-21  6:44 UTC (permalink / raw)
  To: Joe Perches
  Cc: Vinay Simha BN, Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

WARNING: line over 80 characters
comment block , odd statement fixes

Signed-off-by: Vinay Simha BN <simhavcs@gmail.com>
---
 drivers/staging/sm750fb/sm750_accel.h | 30 ++++++++++++++++++++----------
 drivers/staging/sm750fb/sm750_help.h  | 23 +----------------------
 2 files changed, 21 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750_accel.h b/drivers/staging/sm750fb/sm750_accel.h
index da067a0..c56fa99 100644
--- a/drivers/staging/sm750fb/sm750_accel.h
+++ b/drivers/staging/sm750fb/sm750_accel.h
@@ -259,12 +259,18 @@ unsigned int height, /* width and height of rectangle in pixel value */
 unsigned int rop2);
 
 int hw_imageblit(struct lynx_accel *accel,
-		 const char *pSrcbuf, /* pointer to start of source
-					buffer in system memory */
-		 u32 srcDelta, /* Pitch value (in bytes) of the source buffer,
-				+ive means top down and -ive mean button up */
-		 u32 startBit, /* Mono data can start at any bit in a byte,
-				 this value should be 0 to 7 */
+		 const char *pSrcbuf,  /*
+					* pointer to start of source
+					* buffer in system memory
+					*/
+		 u32 srcDelta, /*
+				* Pitch value (in bytes) of the source buffer,
+				* +ive means top down and -ive mean button up
+				*/
+		 u32 startBit, /*
+				* Mono data can start at any bit in a byte,
+				* this value should be 0 to 7
+				*/
 		 u32 dBase, /* Address of destination: offset in frame buffer */
 		 u32 dPitch,   /* Pitch value of destination surface in BYTE */
 		 u32 bytePerPixel,      /* Color depth of destination surface */
@@ -272,9 +278,13 @@ int hw_imageblit(struct lynx_accel *accel,
 		 u32 dy,       /* Starting coordinate of destination surface */
 		 u32 width,
 		 u32 height,   /* width and height of rectange in pixel value */
-		 u32 fColor,   /* Foreground color (corresponding to a 1 in the
-				 monochrome data */
-		 u32 bColor,   /* Background color (corresponding to a 0 in the
-				 monochrome data */
+		 u32 fColor,   /*
+				* Foreground color (corresponding to a 1 in the
+				* monochrome data
+				*/
+		 u32 bColor,   /*
+				* Background color (corresponding to a 0 in the
+				* monochrome data
+				*/
 		 u32 rop2);
 #endif
diff --git a/drivers/staging/sm750fb/sm750_help.h b/drivers/staging/sm750fb/sm750_help.h
index 43d700b..c9378e2 100644
--- a/drivers/staging/sm750fb/sm750_help.h
+++ b/drivers/staging/sm750fb/sm750_help.h
@@ -1,7 +1,7 @@
 #ifndef LYNX_HELP_H__
 #define LYNX_HELP_H__
 
-/*  FIELD MACROS */
+/* FIELD MACROS */
 #define _LSB(f)             (0 ? f)
 #define _MSB(f)             (1 ? f)
 #define _COUNT(f)           (_MSB(f) - _LSB(f) + 1)
@@ -46,27 +46,6 @@
 	~ _F_MASK(reg ## _ ## field) \
 )
 
-/* Field Macros */
-#define FIELD_START(field)              (0 ? field)
-#define FIELD_END(field)                (1 ? field)
-#define FIELD_SIZE(field)               (1 + FIELD_END(field) - \
-						FIELD_START(field))
-#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) \
-					| ((1 << (FIELD_SIZE(field)-1)) - 1)) \
-					<< FIELD_START(field))
-#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> \
-					FIELD_START(field))
-#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & \
-					 FIELD_MASK(field))
-
-#define FIELD_INIT(reg, field, value)   FIELD_DENORMALIZE(reg ## _ ## field, \
-					  reg ## _ ## field ## _ ## value)
-#define FIELD_INIT_VAL(reg, field, value) \
-	(FIELD_DENORMALIZE(reg ## _ ## field, value))
-#define FIELD_VAL_SET(x, r, f, v)       x = x & ~FIELD_MASK(r ## _ ## f) \
-					| FIELD_DENORMALIZE(r ## _ ## f, \
-					 r ## _ ## f ## _ ## v)
-
 #define RGB(r, g, b) \
 ( \
 	(unsigned long) (((r) << 16) | ((g) << 8) | (b)) \
-- 
2.1.2


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

* [PATCH] sm750fb: coding style fixes in _accel.h,__help.h
@ 2015-07-21  6:56     ` Vinay Simha BN
  0 siblings, 0 replies; 28+ messages in thread
From: Vinay Simha BN @ 2015-07-21  6:56 UTC (permalink / raw)
  To: Joe Perches
  Cc: Vinay Simha BN, Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

WARNING: line over 80 characters
comment block , odd statement fixes

Signed-off-by: Vinay Simha BN <simhavcs@gmail.com>
---
 drivers/staging/sm750fb/sm750_accel.h | 30 ++++++++++++++++++++----------
 drivers/staging/sm750fb/sm750_help.h  | 23 +----------------------
 2 files changed, 21 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750_accel.h b/drivers/staging/sm750fb/sm750_accel.h
index da067a0..c56fa99 100644
--- a/drivers/staging/sm750fb/sm750_accel.h
+++ b/drivers/staging/sm750fb/sm750_accel.h
@@ -259,12 +259,18 @@ unsigned int height, /* width and height of rectangle in pixel value */
 unsigned int rop2);
 
 int hw_imageblit(struct lynx_accel *accel,
-		 const char *pSrcbuf, /* pointer to start of source
-					buffer in system memory */
-		 u32 srcDelta, /* Pitch value (in bytes) of the source buffer,
-				+ive means top down and -ive mean button up */
-		 u32 startBit, /* Mono data can start at any bit in a byte,
-				 this value should be 0 to 7 */
+		 const char *pSrcbuf,  /*
+					* pointer to start of source
+					* buffer in system memory
+					*/
+		 u32 srcDelta, /*
+				* Pitch value (in bytes) of the source buffer,
+				* +ive means top down and -ive mean button up
+				*/
+		 u32 startBit, /*
+				* Mono data can start at any bit in a byte,
+				* this value should be 0 to 7
+				*/
 		 u32 dBase, /* Address of destination: offset in frame buffer */
 		 u32 dPitch,   /* Pitch value of destination surface in BYTE */
 		 u32 bytePerPixel,      /* Color depth of destination surface */
@@ -272,9 +278,13 @@ int hw_imageblit(struct lynx_accel *accel,
 		 u32 dy,       /* Starting coordinate of destination surface */
 		 u32 width,
 		 u32 height,   /* width and height of rectange in pixel value */
-		 u32 fColor,   /* Foreground color (corresponding to a 1 in the
-				 monochrome data */
-		 u32 bColor,   /* Background color (corresponding to a 0 in the
-				 monochrome data */
+		 u32 fColor,   /*
+				* Foreground color (corresponding to a 1 in the
+				* monochrome data
+				*/
+		 u32 bColor,   /*
+				* Background color (corresponding to a 0 in the
+				* monochrome data
+				*/
 		 u32 rop2);
 #endif
diff --git a/drivers/staging/sm750fb/sm750_help.h b/drivers/staging/sm750fb/sm750_help.h
index 43d700b..c9378e2 100644
--- a/drivers/staging/sm750fb/sm750_help.h
+++ b/drivers/staging/sm750fb/sm750_help.h
@@ -1,7 +1,7 @@
 #ifndef LYNX_HELP_H__
 #define LYNX_HELP_H__
 
-/*  FIELD MACROS */
+/* FIELD MACROS */
 #define _LSB(f)             (0 ? f)
 #define _MSB(f)             (1 ? f)
 #define _COUNT(f)           (_MSB(f) - _LSB(f) + 1)
@@ -46,27 +46,6 @@
 	~ _F_MASK(reg ## _ ## field) \
 )
 
-/* Field Macros */
-#define FIELD_START(field)              (0 ? field)
-#define FIELD_END(field)                (1 ? field)
-#define FIELD_SIZE(field)               (1 + FIELD_END(field) - \
-						FIELD_START(field))
-#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) \
-					| ((1 << (FIELD_SIZE(field)-1)) - 1)) \
-					<< FIELD_START(field))
-#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> \
-					FIELD_START(field))
-#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & \
-					 FIELD_MASK(field))
-
-#define FIELD_INIT(reg, field, value)   FIELD_DENORMALIZE(reg ## _ ## field, \
-					  reg ## _ ## field ## _ ## value)
-#define FIELD_INIT_VAL(reg, field, value) \
-	(FIELD_DENORMALIZE(reg ## _ ## field, value))
-#define FIELD_VAL_SET(x, r, f, v)       x = x & ~FIELD_MASK(r ## _ ## f) \
-					| FIELD_DENORMALIZE(r ## _ ## f, \
-					 r ## _ ## f ## _ ## v)
-
 #define RGB(r, g, b) \
 ( \
 	(unsigned long) (((r) << 16) | ((g) << 8) | (b)) \
-- 
2.1.2


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

* Re: [PATCH] sm750fb: coding style fixes in _accel.h,__help.h
  2015-07-21  6:56     ` Vinay Simha BN
@ 2015-07-21  7:29       ` Sudip Mukherjee
  -1 siblings, 0 replies; 28+ messages in thread
From: Sudip Mukherjee @ 2015-07-21  7:17 UTC (permalink / raw)
  To: Vinay Simha BN
  Cc: Joe Perches, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

On Tue, Jul 21, 2015 at 12:14:43PM +0530, Vinay Simha BN wrote:
> WARNING: line over 80 characters
> comment block , odd statement fixes
This is not applying. I think you have done the changes on top of your
previous patch.

regards
sudip

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

* Re: [PATCH] sm750fb: coding style fixes in _accel.h,__help.h
@ 2015-07-21  7:29       ` Sudip Mukherjee
  0 siblings, 0 replies; 28+ messages in thread
From: Sudip Mukherjee @ 2015-07-21  7:29 UTC (permalink / raw)
  To: Vinay Simha BN
  Cc: Joe Perches, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

On Tue, Jul 21, 2015 at 12:14:43PM +0530, Vinay Simha BN wrote:
> WARNING: line over 80 characters
> comment block , odd statement fixes
This is not applying. I think you have done the changes on top of your
previous patch.

regards
sudip

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

* Re: [PATCH] sm750fb: coding style fixes in _accel.h,__help.h
       [not found]       ` <CAGWqDJ5AkG5PwQOkboZfiC1PzXw0j+x5zwaYn0SWWtiks+OP2A@mail.gmail.com>
@ 2015-07-21  7:43           ` Sudip Mukherjee
  0 siblings, 0 replies; 28+ messages in thread
From: Sudip Mukherjee @ 2015-07-21  7:31 UTC (permalink / raw)
  To: Vinay Simha
  Cc: Joe Perches, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

On Tue, Jul 21, 2015 at 12:48:00PM +0530, Vinay Simha wrote:
> Yes,
> Shall i send both the patches together, patch 1 and 2 ?
yes, please send a patch giving a version number like v2 or v3 which
should apply to staging-testing keeping in mind the review that Joe has
given on your previous patch.

regards
sudip

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

* [PATCH 1/2] sm750fb: coding style fixes lines over 80 chars
  2015-07-21  6:56     ` Vinay Simha BN
@ 2015-07-21  7:52       ` Vinay Simha BN
  -1 siblings, 0 replies; 28+ messages in thread
From: Vinay Simha BN @ 2015-07-21  7:40 UTC (permalink / raw)
  Cc: Vinay Simha BN, Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

scripts/checkpatch.pl kernel coding style fixes of WARNING

WARNING: line over 80 characters

Signed-off-by: Vinay Simha BN <simhavcs@gmail.com>
---
 drivers/staging/sm750fb/ddk750_display.h | 10 +++++-----
 drivers/staging/sm750fb/ddk750_hwi2c.h   |  6 ++++--
 drivers/staging/sm750fb/ddk750_power.h   |  6 +++---
 drivers/staging/sm750fb/ddk750_sii164.h  | 12 +++++++-----
 drivers/staging/sm750fb/sm750.h          | 13 ++++++++-----
 drivers/staging/sm750fb/sm750_accel.h    | 19 ++++++++++++-------
 drivers/staging/sm750fb/sm750_help.h     | 21 ++++++++++++++-------
 drivers/staging/sm750fb/sm750_hw.h       | 21 +++++++++++++--------
 8 files changed, 66 insertions(+), 42 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_display.h b/drivers/staging/sm750fb/ddk750_display.h
index abccf84..9afa366 100644
--- a/drivers/staging/sm750fb/ddk750_display.h
+++ b/drivers/staging/sm750fb/ddk750_display.h
@@ -110,19 +110,19 @@ typedef enum _disp_output_t {
 
 	/* LCD1 show secondary and DSUB show primary */
 	LCD1_DSUB_DUAL_SWAP = PNL_2_SEC|SEC_TP_ON|PNL_SEQ_ON|
-							CRT_2_PRI|PRI_TP_ON|DAC_ON,
+				CRT_2_PRI|PRI_TP_ON|DAC_ON,
 
 	LCD1_LCD2_PRI = PNL_2_PRI|PRI_TP_ON|PNL_SEQ_ON|
-					CRT_2_PRI|SEC_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
+				CRT_2_PRI|SEC_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
 
 	LCD1_LCD2_SEC = PNL_2_SEC|SEC_TP_ON|PNL_SEQ_ON|
-					CRT_2_SEC|PRI_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
+				CRT_2_SEC|PRI_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
 
 	LCD1_LCD2_DSUB_PRI = PNL_2_PRI|PRI_TP_ON|PNL_SEQ_ON|DAC_ON|
-						CRT_2_PRI|SEC_TP_OFF|DPMS_ON|DUAL_TFT_ON,
+				CRT_2_PRI|SEC_TP_OFF|DPMS_ON|DUAL_TFT_ON,
 
 	LCD1_LCD2_DSUB_SEC = PNL_2_SEC|SEC_TP_ON|PNL_SEQ_ON|DAC_ON|
-						CRT_2_SEC|PRI_TP_OFF|DPMS_ON|DUAL_TFT_ON,
+				CRT_2_SEC|PRI_TP_OFF|DPMS_ON|DUAL_TFT_ON,
 
 
 }
diff --git a/drivers/staging/sm750fb/ddk750_hwi2c.h b/drivers/staging/sm750fb/ddk750_hwi2c.h
index 0b830ba6..3d4e48b 100644
--- a/drivers/staging/sm750fb/ddk750_hwi2c.h
+++ b/drivers/staging/sm750fb/ddk750_hwi2c.h
@@ -5,6 +5,8 @@
 int hwI2CInit(unsigned char busSpeedMode);
 void hwI2CClose(void);
 
-unsigned char hwI2CReadReg(unsigned char deviceAddress, unsigned char registerIndex);
-int hwI2CWriteReg(unsigned char deviceAddress, unsigned char registerIndex, unsigned char data);
+unsigned char hwI2CReadReg(unsigned char deviceAddress,
+	unsigned char registerIndex);
+int hwI2CWriteReg(unsigned char deviceAddress, unsigned char registerIndex,
+	unsigned char data);
 #endif
diff --git a/drivers/staging/sm750fb/ddk750_power.h b/drivers/staging/sm750fb/ddk750_power.h
index b7cf6b2..abad4fe 100644
--- a/drivers/staging/sm750fb/ddk750_power.h
+++ b/drivers/staging/sm750fb/ddk750_power.h
@@ -12,9 +12,9 @@ DPMS_t;
 #define setDAC(off) \
 		{	\
 		POKE32(MISC_CTRL, FIELD_VALUE(PEEK32(MISC_CTRL), \
-									MISC_CTRL,	\
-									DAC_POWER,	\
-									off));	\
+			MISC_CTRL,	\
+			DAC_POWER,	\
+			off));		\
 		}
 
 void ddk750_setDPMS(DPMS_t);
diff --git a/drivers/staging/sm750fb/ddk750_sii164.h b/drivers/staging/sm750fb/ddk750_sii164.h
index f2610c9..a5246bd 100644
--- a/drivers/staging/sm750fb/ddk750_sii164.h
+++ b/drivers/staging/sm750fb/ddk750_sii164.h
@@ -5,10 +5,11 @@
 
 /* Hot Plug detection mode structure */
 typedef enum _sii164_hot_plug_mode_t {
-	SII164_HOTPLUG_DISABLE = 0,         /* Disable Hot Plug output bit (always high). */
-	SII164_HOTPLUG_USE_MDI,             /* Use Monitor Detect Interrupt bit. */
-	SII164_HOTPLUG_USE_RSEN,            /* Use Receiver Sense detect bit. */
-	SII164_HOTPLUG_USE_HTPLG            /* Use Hot Plug detect bit. */
+	SII164_HOTPLUG_DISABLE = 0, /* Disable Hot Plug output bit
+					(always high) */
+	SII164_HOTPLUG_USE_MDI,     /* Use Monitor Detect Interrupt bit. */
+	SII164_HOTPLUG_USE_RSEN,    /* Use Receiver Sense detect bit. */
+	SII164_HOTPLUG_USE_HTPLG    /* Use Hot Plug detect bit. */
 } sii164_hot_plug_mode_t;
 
 
@@ -39,7 +40,8 @@ unsigned char sii164IsConnected(void);
 unsigned char sii164CheckInterrupt(void);
 void sii164ClearInterrupt(void);
 #endif
-/* below register definination is used for Silicon Image SiI164 DVI controller chip */
+/* below register definination is used for Silicon Image
+	SiI164 DVI controller chip */
 /*
  * Vendor ID registers
  */
diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index 9b101a9..e2bd920 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -32,9 +32,10 @@ struct lynx_accel {
 						u32, u32, u32, u32,
 						u32, u32, u32, u32);
 
-	int (*de_imageblit)(struct lynx_accel *, const char *, u32, u32, u32, u32,
-							       u32, u32, u32, u32,
-							       u32, u32, u32, u32);
+	int (*de_imageblit)(struct lynx_accel *, const char *,
+						u32, u32, u32, u32,
+						u32, u32, u32, u32,
+						u32, u32, u32, u32);
 
 };
 
@@ -100,7 +101,8 @@ struct lynxfb_crtc {
 	int channel;/* which channel this crtc stands for*/
 	resource_size_t vidmem_size;/* this view's video memory max size */
 
-	/* below attributes belong to info->fix, their value depends on specific adaptor*/
+	/* below attributes belong to info->fix, their value depends on
+		 specific adaptor*/
 	u16 line_pad;/* padding information:0,1,2,4,8,16,... */
 	u16 xpanstep;
 	u16 ypanstep;
@@ -113,7 +115,8 @@ struct lynxfb_crtc {
 						struct fb_fix_screeninfo*);
 
 	int (*proc_checkMode)(struct lynxfb_crtc*, struct fb_var_screeninfo*);
-	int (*proc_setColReg)(struct lynxfb_crtc*, ushort, ushort, ushort, ushort);
+	int (*proc_setColReg)(struct lynxfb_crtc*, ushort, ushort, ushort,
+				 ushort);
 	void (*clear)(struct lynxfb_crtc*);
 	/* pan display */
 	int (*proc_panDisplay)(struct lynxfb_crtc *,
diff --git a/drivers/staging/sm750fb/sm750_accel.h b/drivers/staging/sm750fb/sm750_accel.h
index f252e47..da067a0 100644
--- a/drivers/staging/sm750fb/sm750_accel.h
+++ b/drivers/staging/sm750fb/sm750_accel.h
@@ -26,7 +26,7 @@
 #define DE_SOURCE_WRAP_ENABLE                           1
 #define DE_SOURCE_X_K1                                  29:16
 #define DE_SOURCE_Y_K2                                  15:0
-#define DE_SOURCE_X_K1_MONO				20:16
+#define DE_SOURCE_X_K1_MONO				{ 20:16 }
 
 #define DE_DESTINATION                                  0x4
 #define DE_DESTINATION_WRAP                             31:31
@@ -259,17 +259,22 @@ unsigned int height, /* width and height of rectangle in pixel value */
 unsigned int rop2);
 
 int hw_imageblit(struct lynx_accel *accel,
-		 const char *pSrcbuf, /* pointer to start of source buffer in system memory */
-		 u32 srcDelta,          /* Pitch value (in bytes) of the source buffer, +ive means top down and -ive mean button up */
-		 u32 startBit, /* Mono data can start at any bit in a byte, this value should be 0 to 7 */
-		 u32 dBase,    /* Address of destination: offset in frame buffer */
+		 const char *pSrcbuf, /* pointer to start of source
+					buffer in system memory */
+		 u32 srcDelta, /* Pitch value (in bytes) of the source buffer,
+				+ive means top down and -ive mean button up */
+		 u32 startBit, /* Mono data can start at any bit in a byte,
+				 this value should be 0 to 7 */
+		 u32 dBase, /* Address of destination: offset in frame buffer */
 		 u32 dPitch,   /* Pitch value of destination surface in BYTE */
 		 u32 bytePerPixel,      /* Color depth of destination surface */
 		 u32 dx,
 		 u32 dy,       /* Starting coordinate of destination surface */
 		 u32 width,
 		 u32 height,   /* width and height of rectange in pixel value */
-		 u32 fColor,   /* Foreground color (corresponding to a 1 in the monochrome data */
-		 u32 bColor,   /* Background color (corresponding to a 0 in the monochrome data */
+		 u32 fColor,   /* Foreground color (corresponding to a 1 in the
+				 monochrome data */
+		 u32 bColor,   /* Background color (corresponding to a 0 in the
+				 monochrome data */
 		 u32 rop2);
 #endif
diff --git a/drivers/staging/sm750fb/sm750_help.h b/drivers/staging/sm750fb/sm750_help.h
index 8dc6bd2..43d700b 100644
--- a/drivers/staging/sm750fb/sm750_help.h
+++ b/drivers/staging/sm750fb/sm750_help.h
@@ -49,17 +49,23 @@
 /* Field Macros */
 #define FIELD_START(field)              (0 ? field)
 #define FIELD_END(field)                (1 ? field)
-#define FIELD_SIZE(field)               (1 + FIELD_END(field) - FIELD_START(field))
-#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) | ((1 << (FIELD_SIZE(field)-1)) - 1)) << FIELD_START(field))
-#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> FIELD_START(field))
-#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & FIELD_MASK(field))
+#define FIELD_SIZE(field)               (1 + FIELD_END(field) - \
+						FIELD_START(field))
+#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) \
+					| ((1 << (FIELD_SIZE(field)-1)) - 1)) \
+					<< FIELD_START(field))
+#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> \
+					FIELD_START(field))
+#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & \
+					 FIELD_MASK(field))
 
 #define FIELD_INIT(reg, field, value)   FIELD_DENORMALIZE(reg ## _ ## field, \
-							  reg ## _ ## field ## _ ## value)
+					  reg ## _ ## field ## _ ## value)
 #define FIELD_INIT_VAL(reg, field, value) \
 	(FIELD_DENORMALIZE(reg ## _ ## field, value))
 #define FIELD_VAL_SET(x, r, f, v)       x = x & ~FIELD_MASK(r ## _ ## f) \
-					| FIELD_DENORMALIZE(r ## _ ## f, r ## _ ## f ## _ ## v)
+					| FIELD_DENORMALIZE(r ## _ ## f, \
+					 r ## _ ## f ## _ ## v)
 
 #define RGB(r, g, b) \
 ( \
@@ -68,7 +74,8 @@
 
 #define RGB16(r, g, b) \
 ( \
-	(unsigned short) ((((r) & 0xF8) << 8) | (((g) & 0xFC) << 3) | (((b) & 0xF8) >> 3)) \
+	(unsigned short) ((((r) & 0xF8) << 8) | (((g) & 0xFC) << 3) | \
+			 (((b) & 0xF8) >> 3)) \
 )
 
 static inline unsigned int absDiff(unsigned int a, unsigned int b)
diff --git a/drivers/staging/sm750fb/sm750_hw.h b/drivers/staging/sm750fb/sm750_hw.h
index ef0a16f..eceea39 100644
--- a/drivers/staging/sm750fb/sm750_hw.h
+++ b/drivers/staging/sm750fb/sm750_hw.h
@@ -61,13 +61,15 @@ struct sm750_state {
 	int yLCD;
 };
 
-/* sm750_share stands for a presentation of two frame buffer
-   that use one sm750 adaptor, it is similar to the super class of lynx_share
-   in C++
- */
+/*
+ sm750_share stands for a presentation of two frame buffer
+ that use one sm750 adaptor, it is similar to the super
+ class of lynx_share in C++
+*/
 
 struct sm750_share {
-	/* it's better to put lynx_share struct to the first place of sm750_share */
+	/* it's better to put lynx_share struct to the first place of
+	sm750_share */
 	struct lynx_share share;
 	struct sm750_state state;
 	int hwCursor;
@@ -85,10 +87,13 @@ int hw_sm750_deWait(void);
 int hw_sm750le_deWait(void);
 
 resource_size_t hw_sm750_getVMSize(struct lynx_share *);
-int hw_sm750_output_checkMode(struct lynxfb_output*, struct fb_var_screeninfo*);
-int hw_sm750_output_setMode(struct lynxfb_output*, struct fb_var_screeninfo*, struct fb_fix_screeninfo*);
+int hw_sm750_output_checkMode(struct lynxfb_output*,
+		struct fb_var_screeninfo*);
+int hw_sm750_output_setMode(struct lynxfb_output*,
+		struct fb_var_screeninfo*, struct fb_fix_screeninfo*);
 int hw_sm750_crtc_checkMode(struct lynxfb_crtc*, struct fb_var_screeninfo*);
-int hw_sm750_crtc_setMode(struct lynxfb_crtc*, struct fb_var_screeninfo*, struct fb_fix_screeninfo*);
+int hw_sm750_crtc_setMode(struct lynxfb_crtc*, struct fb_var_screeninfo*,
+		struct fb_fix_screeninfo*);
 int hw_sm750_setColReg(struct lynxfb_crtc*, ushort, ushort, ushort, ushort);
 int hw_sm750_setBLANK(struct lynxfb_output*, int);
 int hw_sm750le_setBLANK(struct lynxfb_output*, int);
-- 
2.1.2


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

* [PATCH 2/2] sm750fb: coding style fixes lines over 80 chars - v2
  2015-07-21  7:52       ` Vinay Simha BN
@ 2015-07-21  7:52         ` Vinay Simha BN
  -1 siblings, 0 replies; 28+ messages in thread
From: Vinay Simha BN @ 2015-07-21  7:40 UTC (permalink / raw)
  Cc: Vinay Simha BN, Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

---
 drivers/staging/sm750fb/sm750_accel.h | 30 ++++++++++++++++++++----------
 drivers/staging/sm750fb/sm750_help.h  | 23 +----------------------
 2 files changed, 21 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750_accel.h b/drivers/staging/sm750fb/sm750_accel.h
index da067a0..c56fa99 100644
--- a/drivers/staging/sm750fb/sm750_accel.h
+++ b/drivers/staging/sm750fb/sm750_accel.h
@@ -259,12 +259,18 @@ unsigned int height, /* width and height of rectangle in pixel value */
 unsigned int rop2);
 
 int hw_imageblit(struct lynx_accel *accel,
-		 const char *pSrcbuf, /* pointer to start of source
-					buffer in system memory */
-		 u32 srcDelta, /* Pitch value (in bytes) of the source buffer,
-				+ive means top down and -ive mean button up */
-		 u32 startBit, /* Mono data can start at any bit in a byte,
-				 this value should be 0 to 7 */
+		 const char *pSrcbuf,  /*
+					* pointer to start of source
+					* buffer in system memory
+					*/
+		 u32 srcDelta, /*
+				* Pitch value (in bytes) of the source buffer,
+				* +ive means top down and -ive mean button up
+				*/
+		 u32 startBit, /*
+				* Mono data can start at any bit in a byte,
+				* this value should be 0 to 7
+				*/
 		 u32 dBase, /* Address of destination: offset in frame buffer */
 		 u32 dPitch,   /* Pitch value of destination surface in BYTE */
 		 u32 bytePerPixel,      /* Color depth of destination surface */
@@ -272,9 +278,13 @@ int hw_imageblit(struct lynx_accel *accel,
 		 u32 dy,       /* Starting coordinate of destination surface */
 		 u32 width,
 		 u32 height,   /* width and height of rectange in pixel value */
-		 u32 fColor,   /* Foreground color (corresponding to a 1 in the
-				 monochrome data */
-		 u32 bColor,   /* Background color (corresponding to a 0 in the
-				 monochrome data */
+		 u32 fColor,   /*
+				* Foreground color (corresponding to a 1 in the
+				* monochrome data
+				*/
+		 u32 bColor,   /*
+				* Background color (corresponding to a 0 in the
+				* monochrome data
+				*/
 		 u32 rop2);
 #endif
diff --git a/drivers/staging/sm750fb/sm750_help.h b/drivers/staging/sm750fb/sm750_help.h
index 43d700b..c9378e2 100644
--- a/drivers/staging/sm750fb/sm750_help.h
+++ b/drivers/staging/sm750fb/sm750_help.h
@@ -1,7 +1,7 @@
 #ifndef LYNX_HELP_H__
 #define LYNX_HELP_H__
 
-/*  FIELD MACROS */
+/* FIELD MACROS */
 #define _LSB(f)             (0 ? f)
 #define _MSB(f)             (1 ? f)
 #define _COUNT(f)           (_MSB(f) - _LSB(f) + 1)
@@ -46,27 +46,6 @@
 	~ _F_MASK(reg ## _ ## field) \
 )
 
-/* Field Macros */
-#define FIELD_START(field)              (0 ? field)
-#define FIELD_END(field)                (1 ? field)
-#define FIELD_SIZE(field)               (1 + FIELD_END(field) - \
-						FIELD_START(field))
-#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) \
-					| ((1 << (FIELD_SIZE(field)-1)) - 1)) \
-					<< FIELD_START(field))
-#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> \
-					FIELD_START(field))
-#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & \
-					 FIELD_MASK(field))
-
-#define FIELD_INIT(reg, field, value)   FIELD_DENORMALIZE(reg ## _ ## field, \
-					  reg ## _ ## field ## _ ## value)
-#define FIELD_INIT_VAL(reg, field, value) \
-	(FIELD_DENORMALIZE(reg ## _ ## field, value))
-#define FIELD_VAL_SET(x, r, f, v)       x = x & ~FIELD_MASK(r ## _ ## f) \
-					| FIELD_DENORMALIZE(r ## _ ## f, \
-					 r ## _ ## f ## _ ## v)
-
 #define RGB(r, g, b) \
 ( \
 	(unsigned long) (((r) << 16) | ((g) << 8) | (b)) \
-- 
2.1.2


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

* Re: [PATCH] sm750fb: coding style fixes in _accel.h,__help.h
@ 2015-07-21  7:43           ` Sudip Mukherjee
  0 siblings, 0 replies; 28+ messages in thread
From: Sudip Mukherjee @ 2015-07-21  7:43 UTC (permalink / raw)
  To: Vinay Simha
  Cc: Joe Perches, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

On Tue, Jul 21, 2015 at 12:48:00PM +0530, Vinay Simha wrote:
> Yes,
> Shall i send both the patches together, patch 1 and 2 ?
yes, please send a patch giving a version number like v2 or v3 which
should apply to staging-testing keeping in mind the review that Joe has
given on your previous patch.

regards
sudip

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

* [PATCH 1/2] sm750fb: coding style fixes lines over 80 chars
@ 2015-07-21  7:52       ` Vinay Simha BN
  0 siblings, 0 replies; 28+ messages in thread
From: Vinay Simha BN @ 2015-07-21  7:52 UTC (permalink / raw)
  Cc: Vinay Simha BN, Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

scripts/checkpatch.pl kernel coding style fixes of WARNING

WARNING: line over 80 characters

Signed-off-by: Vinay Simha BN <simhavcs@gmail.com>
---
 drivers/staging/sm750fb/ddk750_display.h | 10 +++++-----
 drivers/staging/sm750fb/ddk750_hwi2c.h   |  6 ++++--
 drivers/staging/sm750fb/ddk750_power.h   |  6 +++---
 drivers/staging/sm750fb/ddk750_sii164.h  | 12 +++++++-----
 drivers/staging/sm750fb/sm750.h          | 13 ++++++++-----
 drivers/staging/sm750fb/sm750_accel.h    | 19 ++++++++++++-------
 drivers/staging/sm750fb/sm750_help.h     | 21 ++++++++++++++-------
 drivers/staging/sm750fb/sm750_hw.h       | 21 +++++++++++++--------
 8 files changed, 66 insertions(+), 42 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_display.h b/drivers/staging/sm750fb/ddk750_display.h
index abccf84..9afa366 100644
--- a/drivers/staging/sm750fb/ddk750_display.h
+++ b/drivers/staging/sm750fb/ddk750_display.h
@@ -110,19 +110,19 @@ typedef enum _disp_output_t {
 
 	/* LCD1 show secondary and DSUB show primary */
 	LCD1_DSUB_DUAL_SWAP = PNL_2_SEC|SEC_TP_ON|PNL_SEQ_ON|
-							CRT_2_PRI|PRI_TP_ON|DAC_ON,
+				CRT_2_PRI|PRI_TP_ON|DAC_ON,
 
 	LCD1_LCD2_PRI = PNL_2_PRI|PRI_TP_ON|PNL_SEQ_ON|
-					CRT_2_PRI|SEC_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
+				CRT_2_PRI|SEC_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
 
 	LCD1_LCD2_SEC = PNL_2_SEC|SEC_TP_ON|PNL_SEQ_ON|
-					CRT_2_SEC|PRI_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
+				CRT_2_SEC|PRI_TP_OFF|DPMS_OFF|DUAL_TFT_ON,
 
 	LCD1_LCD2_DSUB_PRI = PNL_2_PRI|PRI_TP_ON|PNL_SEQ_ON|DAC_ON|
-						CRT_2_PRI|SEC_TP_OFF|DPMS_ON|DUAL_TFT_ON,
+				CRT_2_PRI|SEC_TP_OFF|DPMS_ON|DUAL_TFT_ON,
 
 	LCD1_LCD2_DSUB_SEC = PNL_2_SEC|SEC_TP_ON|PNL_SEQ_ON|DAC_ON|
-						CRT_2_SEC|PRI_TP_OFF|DPMS_ON|DUAL_TFT_ON,
+				CRT_2_SEC|PRI_TP_OFF|DPMS_ON|DUAL_TFT_ON,
 
 
 }
diff --git a/drivers/staging/sm750fb/ddk750_hwi2c.h b/drivers/staging/sm750fb/ddk750_hwi2c.h
index 0b830ba6..3d4e48b 100644
--- a/drivers/staging/sm750fb/ddk750_hwi2c.h
+++ b/drivers/staging/sm750fb/ddk750_hwi2c.h
@@ -5,6 +5,8 @@
 int hwI2CInit(unsigned char busSpeedMode);
 void hwI2CClose(void);
 
-unsigned char hwI2CReadReg(unsigned char deviceAddress, unsigned char registerIndex);
-int hwI2CWriteReg(unsigned char deviceAddress, unsigned char registerIndex, unsigned char data);
+unsigned char hwI2CReadReg(unsigned char deviceAddress,
+	unsigned char registerIndex);
+int hwI2CWriteReg(unsigned char deviceAddress, unsigned char registerIndex,
+	unsigned char data);
 #endif
diff --git a/drivers/staging/sm750fb/ddk750_power.h b/drivers/staging/sm750fb/ddk750_power.h
index b7cf6b2..abad4fe 100644
--- a/drivers/staging/sm750fb/ddk750_power.h
+++ b/drivers/staging/sm750fb/ddk750_power.h
@@ -12,9 +12,9 @@ DPMS_t;
 #define setDAC(off) \
 		{	\
 		POKE32(MISC_CTRL, FIELD_VALUE(PEEK32(MISC_CTRL), \
-									MISC_CTRL,	\
-									DAC_POWER,	\
-									off));	\
+			MISC_CTRL,	\
+			DAC_POWER,	\
+			off));		\
 		}
 
 void ddk750_setDPMS(DPMS_t);
diff --git a/drivers/staging/sm750fb/ddk750_sii164.h b/drivers/staging/sm750fb/ddk750_sii164.h
index f2610c9..a5246bd 100644
--- a/drivers/staging/sm750fb/ddk750_sii164.h
+++ b/drivers/staging/sm750fb/ddk750_sii164.h
@@ -5,10 +5,11 @@
 
 /* Hot Plug detection mode structure */
 typedef enum _sii164_hot_plug_mode_t {
-	SII164_HOTPLUG_DISABLE = 0,         /* Disable Hot Plug output bit (always high). */
-	SII164_HOTPLUG_USE_MDI,             /* Use Monitor Detect Interrupt bit. */
-	SII164_HOTPLUG_USE_RSEN,            /* Use Receiver Sense detect bit. */
-	SII164_HOTPLUG_USE_HTPLG            /* Use Hot Plug detect bit. */
+	SII164_HOTPLUG_DISABLE = 0, /* Disable Hot Plug output bit
+					(always high) */
+	SII164_HOTPLUG_USE_MDI,     /* Use Monitor Detect Interrupt bit. */
+	SII164_HOTPLUG_USE_RSEN,    /* Use Receiver Sense detect bit. */
+	SII164_HOTPLUG_USE_HTPLG    /* Use Hot Plug detect bit. */
 } sii164_hot_plug_mode_t;
 
 
@@ -39,7 +40,8 @@ unsigned char sii164IsConnected(void);
 unsigned char sii164CheckInterrupt(void);
 void sii164ClearInterrupt(void);
 #endif
-/* below register definination is used for Silicon Image SiI164 DVI controller chip */
+/* below register definination is used for Silicon Image
+	SiI164 DVI controller chip */
 /*
  * Vendor ID registers
  */
diff --git a/drivers/staging/sm750fb/sm750.h b/drivers/staging/sm750fb/sm750.h
index 9b101a9..e2bd920 100644
--- a/drivers/staging/sm750fb/sm750.h
+++ b/drivers/staging/sm750fb/sm750.h
@@ -32,9 +32,10 @@ struct lynx_accel {
 						u32, u32, u32, u32,
 						u32, u32, u32, u32);
 
-	int (*de_imageblit)(struct lynx_accel *, const char *, u32, u32, u32, u32,
-							       u32, u32, u32, u32,
-							       u32, u32, u32, u32);
+	int (*de_imageblit)(struct lynx_accel *, const char *,
+						u32, u32, u32, u32,
+						u32, u32, u32, u32,
+						u32, u32, u32, u32);
 
 };
 
@@ -100,7 +101,8 @@ struct lynxfb_crtc {
 	int channel;/* which channel this crtc stands for*/
 	resource_size_t vidmem_size;/* this view's video memory max size */
 
-	/* below attributes belong to info->fix, their value depends on specific adaptor*/
+	/* below attributes belong to info->fix, their value depends on
+		 specific adaptor*/
 	u16 line_pad;/* padding information:0,1,2,4,8,16,... */
 	u16 xpanstep;
 	u16 ypanstep;
@@ -113,7 +115,8 @@ struct lynxfb_crtc {
 						struct fb_fix_screeninfo*);
 
 	int (*proc_checkMode)(struct lynxfb_crtc*, struct fb_var_screeninfo*);
-	int (*proc_setColReg)(struct lynxfb_crtc*, ushort, ushort, ushort, ushort);
+	int (*proc_setColReg)(struct lynxfb_crtc*, ushort, ushort, ushort,
+				 ushort);
 	void (*clear)(struct lynxfb_crtc*);
 	/* pan display */
 	int (*proc_panDisplay)(struct lynxfb_crtc *,
diff --git a/drivers/staging/sm750fb/sm750_accel.h b/drivers/staging/sm750fb/sm750_accel.h
index f252e47..da067a0 100644
--- a/drivers/staging/sm750fb/sm750_accel.h
+++ b/drivers/staging/sm750fb/sm750_accel.h
@@ -26,7 +26,7 @@
 #define DE_SOURCE_WRAP_ENABLE                           1
 #define DE_SOURCE_X_K1                                  29:16
 #define DE_SOURCE_Y_K2                                  15:0
-#define DE_SOURCE_X_K1_MONO				20:16
+#define DE_SOURCE_X_K1_MONO				{ 20:16 }
 
 #define DE_DESTINATION                                  0x4
 #define DE_DESTINATION_WRAP                             31:31
@@ -259,17 +259,22 @@ unsigned int height, /* width and height of rectangle in pixel value */
 unsigned int rop2);
 
 int hw_imageblit(struct lynx_accel *accel,
-		 const char *pSrcbuf, /* pointer to start of source buffer in system memory */
-		 u32 srcDelta,          /* Pitch value (in bytes) of the source buffer, +ive means top down and -ive mean button up */
-		 u32 startBit, /* Mono data can start at any bit in a byte, this value should be 0 to 7 */
-		 u32 dBase,    /* Address of destination: offset in frame buffer */
+		 const char *pSrcbuf, /* pointer to start of source
+					buffer in system memory */
+		 u32 srcDelta, /* Pitch value (in bytes) of the source buffer,
+				+ive means top down and -ive mean button up */
+		 u32 startBit, /* Mono data can start at any bit in a byte,
+				 this value should be 0 to 7 */
+		 u32 dBase, /* Address of destination: offset in frame buffer */
 		 u32 dPitch,   /* Pitch value of destination surface in BYTE */
 		 u32 bytePerPixel,      /* Color depth of destination surface */
 		 u32 dx,
 		 u32 dy,       /* Starting coordinate of destination surface */
 		 u32 width,
 		 u32 height,   /* width and height of rectange in pixel value */
-		 u32 fColor,   /* Foreground color (corresponding to a 1 in the monochrome data */
-		 u32 bColor,   /* Background color (corresponding to a 0 in the monochrome data */
+		 u32 fColor,   /* Foreground color (corresponding to a 1 in the
+				 monochrome data */
+		 u32 bColor,   /* Background color (corresponding to a 0 in the
+				 monochrome data */
 		 u32 rop2);
 #endif
diff --git a/drivers/staging/sm750fb/sm750_help.h b/drivers/staging/sm750fb/sm750_help.h
index 8dc6bd2..43d700b 100644
--- a/drivers/staging/sm750fb/sm750_help.h
+++ b/drivers/staging/sm750fb/sm750_help.h
@@ -49,17 +49,23 @@
 /* Field Macros */
 #define FIELD_START(field)              (0 ? field)
 #define FIELD_END(field)                (1 ? field)
-#define FIELD_SIZE(field)               (1 + FIELD_END(field) - FIELD_START(field))
-#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) | ((1 << (FIELD_SIZE(field)-1)) - 1)) << FIELD_START(field))
-#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> FIELD_START(field))
-#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & FIELD_MASK(field))
+#define FIELD_SIZE(field)               (1 + FIELD_END(field) - \
+						FIELD_START(field))
+#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) \
+					| ((1 << (FIELD_SIZE(field)-1)) - 1)) \
+					<< FIELD_START(field))
+#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> \
+					FIELD_START(field))
+#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & \
+					 FIELD_MASK(field))
 
 #define FIELD_INIT(reg, field, value)   FIELD_DENORMALIZE(reg ## _ ## field, \
-							  reg ## _ ## field ## _ ## value)
+					  reg ## _ ## field ## _ ## value)
 #define FIELD_INIT_VAL(reg, field, value) \
 	(FIELD_DENORMALIZE(reg ## _ ## field, value))
 #define FIELD_VAL_SET(x, r, f, v)       x = x & ~FIELD_MASK(r ## _ ## f) \
-					| FIELD_DENORMALIZE(r ## _ ## f, r ## _ ## f ## _ ## v)
+					| FIELD_DENORMALIZE(r ## _ ## f, \
+					 r ## _ ## f ## _ ## v)
 
 #define RGB(r, g, b) \
 ( \
@@ -68,7 +74,8 @@
 
 #define RGB16(r, g, b) \
 ( \
-	(unsigned short) ((((r) & 0xF8) << 8) | (((g) & 0xFC) << 3) | (((b) & 0xF8) >> 3)) \
+	(unsigned short) ((((r) & 0xF8) << 8) | (((g) & 0xFC) << 3) | \
+			 (((b) & 0xF8) >> 3)) \
 )
 
 static inline unsigned int absDiff(unsigned int a, unsigned int b)
diff --git a/drivers/staging/sm750fb/sm750_hw.h b/drivers/staging/sm750fb/sm750_hw.h
index ef0a16f..eceea39 100644
--- a/drivers/staging/sm750fb/sm750_hw.h
+++ b/drivers/staging/sm750fb/sm750_hw.h
@@ -61,13 +61,15 @@ struct sm750_state {
 	int yLCD;
 };
 
-/* sm750_share stands for a presentation of two frame buffer
-   that use one sm750 adaptor, it is similar to the super class of lynx_share
-   in C++
- */
+/*
+ sm750_share stands for a presentation of two frame buffer
+ that use one sm750 adaptor, it is similar to the super
+ class of lynx_share in C++
+*/
 
 struct sm750_share {
-	/* it's better to put lynx_share struct to the first place of sm750_share */
+	/* it's better to put lynx_share struct to the first place of
+	sm750_share */
 	struct lynx_share share;
 	struct sm750_state state;
 	int hwCursor;
@@ -85,10 +87,13 @@ int hw_sm750_deWait(void);
 int hw_sm750le_deWait(void);
 
 resource_size_t hw_sm750_getVMSize(struct lynx_share *);
-int hw_sm750_output_checkMode(struct lynxfb_output*, struct fb_var_screeninfo*);
-int hw_sm750_output_setMode(struct lynxfb_output*, struct fb_var_screeninfo*, struct fb_fix_screeninfo*);
+int hw_sm750_output_checkMode(struct lynxfb_output*,
+		struct fb_var_screeninfo*);
+int hw_sm750_output_setMode(struct lynxfb_output*,
+		struct fb_var_screeninfo*, struct fb_fix_screeninfo*);
 int hw_sm750_crtc_checkMode(struct lynxfb_crtc*, struct fb_var_screeninfo*);
-int hw_sm750_crtc_setMode(struct lynxfb_crtc*, struct fb_var_screeninfo*, struct fb_fix_screeninfo*);
+int hw_sm750_crtc_setMode(struct lynxfb_crtc*, struct fb_var_screeninfo*,
+		struct fb_fix_screeninfo*);
 int hw_sm750_setColReg(struct lynxfb_crtc*, ushort, ushort, ushort, ushort);
 int hw_sm750_setBLANK(struct lynxfb_output*, int);
 int hw_sm750le_setBLANK(struct lynxfb_output*, int);
-- 
2.1.2


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

* [PATCH 2/2] sm750fb: coding style fixes lines over 80 chars - v2
@ 2015-07-21  7:52         ` Vinay Simha BN
  0 siblings, 0 replies; 28+ messages in thread
From: Vinay Simha BN @ 2015-07-21  7:52 UTC (permalink / raw)
  Cc: Vinay Simha BN, Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

---
 drivers/staging/sm750fb/sm750_accel.h | 30 ++++++++++++++++++++----------
 drivers/staging/sm750fb/sm750_help.h  | 23 +----------------------
 2 files changed, 21 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/sm750fb/sm750_accel.h b/drivers/staging/sm750fb/sm750_accel.h
index da067a0..c56fa99 100644
--- a/drivers/staging/sm750fb/sm750_accel.h
+++ b/drivers/staging/sm750fb/sm750_accel.h
@@ -259,12 +259,18 @@ unsigned int height, /* width and height of rectangle in pixel value */
 unsigned int rop2);
 
 int hw_imageblit(struct lynx_accel *accel,
-		 const char *pSrcbuf, /* pointer to start of source
-					buffer in system memory */
-		 u32 srcDelta, /* Pitch value (in bytes) of the source buffer,
-				+ive means top down and -ive mean button up */
-		 u32 startBit, /* Mono data can start at any bit in a byte,
-				 this value should be 0 to 7 */
+		 const char *pSrcbuf,  /*
+					* pointer to start of source
+					* buffer in system memory
+					*/
+		 u32 srcDelta, /*
+				* Pitch value (in bytes) of the source buffer,
+				* +ive means top down and -ive mean button up
+				*/
+		 u32 startBit, /*
+				* Mono data can start at any bit in a byte,
+				* this value should be 0 to 7
+				*/
 		 u32 dBase, /* Address of destination: offset in frame buffer */
 		 u32 dPitch,   /* Pitch value of destination surface in BYTE */
 		 u32 bytePerPixel,      /* Color depth of destination surface */
@@ -272,9 +278,13 @@ int hw_imageblit(struct lynx_accel *accel,
 		 u32 dy,       /* Starting coordinate of destination surface */
 		 u32 width,
 		 u32 height,   /* width and height of rectange in pixel value */
-		 u32 fColor,   /* Foreground color (corresponding to a 1 in the
-				 monochrome data */
-		 u32 bColor,   /* Background color (corresponding to a 0 in the
-				 monochrome data */
+		 u32 fColor,   /*
+				* Foreground color (corresponding to a 1 in the
+				* monochrome data
+				*/
+		 u32 bColor,   /*
+				* Background color (corresponding to a 0 in the
+				* monochrome data
+				*/
 		 u32 rop2);
 #endif
diff --git a/drivers/staging/sm750fb/sm750_help.h b/drivers/staging/sm750fb/sm750_help.h
index 43d700b..c9378e2 100644
--- a/drivers/staging/sm750fb/sm750_help.h
+++ b/drivers/staging/sm750fb/sm750_help.h
@@ -1,7 +1,7 @@
 #ifndef LYNX_HELP_H__
 #define LYNX_HELP_H__
 
-/*  FIELD MACROS */
+/* FIELD MACROS */
 #define _LSB(f)             (0 ? f)
 #define _MSB(f)             (1 ? f)
 #define _COUNT(f)           (_MSB(f) - _LSB(f) + 1)
@@ -46,27 +46,6 @@
 	~ _F_MASK(reg ## _ ## field) \
 )
 
-/* Field Macros */
-#define FIELD_START(field)              (0 ? field)
-#define FIELD_END(field)                (1 ? field)
-#define FIELD_SIZE(field)               (1 + FIELD_END(field) - \
-						FIELD_START(field))
-#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) \
-					| ((1 << (FIELD_SIZE(field)-1)) - 1)) \
-					<< FIELD_START(field))
-#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> \
-					FIELD_START(field))
-#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & \
-					 FIELD_MASK(field))
-
-#define FIELD_INIT(reg, field, value)   FIELD_DENORMALIZE(reg ## _ ## field, \
-					  reg ## _ ## field ## _ ## value)
-#define FIELD_INIT_VAL(reg, field, value) \
-	(FIELD_DENORMALIZE(reg ## _ ## field, value))
-#define FIELD_VAL_SET(x, r, f, v)       x = x & ~FIELD_MASK(r ## _ ## f) \
-					| FIELD_DENORMALIZE(r ## _ ## f, \
-					 r ## _ ## f ## _ ## v)
-
 #define RGB(r, g, b) \
 ( \
 	(unsigned long) (((r) << 16) | ((g) << 8) | (b)) \
-- 
2.1.2


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

* Re: [PATCH 1/2] sm750fb: coding style fixes lines over 80 chars
  2015-07-21  7:52       ` Vinay Simha BN
@ 2015-07-21  8:14         ` Joe Perches
  -1 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2015-07-21  8:14 UTC (permalink / raw)
  To: Vinay Simha BN
  Cc: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

On Tue, 2015-07-21 at 13:10 +0530, Vinay Simha BN wrote:
> scripts/checkpatch.pl kernel coding style fixes of WARNING

Please run your patches through scripts/checkpatch.pl --strict

> diff --git a/drivers/staging/sm750fb/ddk750_power.h b/drivers/staging/sm750fb/ddk750_power.h
> index b7cf6b2..abad4fe 100644
> --- a/drivers/staging/sm750fb/ddk750_power.h
> +++ b/drivers/staging/sm750fb/ddk750_power.h
> @@ -12,9 +12,9 @@ DPMS_t;
>  #define setDAC(off) \
>  		{	\
>  		POKE32(MISC_CTRL, FIELD_VALUE(PEEK32(MISC_CTRL), \
> -									MISC_CTRL,	\
> -									DAC_POWER,	\
> -									off));	\
> +			MISC_CTRL,	\
> +			DAC_POWER,	\
> +			off));		\

This is used only once and might be better expanded
in-place instead.

It's a single statement macro and doesn't need
braces or a terminating ; and it shouldn't be
indented 2 tabs.

#define setDAC(off)							\
	POKE32(MISC_CTRL,						\
	       FIELD_VALUE(PEEK32(MISC_CTRL), MISC_CTRL, DAC_POWER,	\
			   off))

> diff --git a/drivers/staging/sm750fb/ddk750_sii164.h b/drivers/staging/sm750fb/ddk750_sii164.h
[]
> @@ -5,10 +5,11 @@
[]
> +	SII164_HOTPLUG_DISABLE = 0, /* Disable Hot Plug output bit
> +					(always high) */

comment style isn't correct
etc...



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

* Re: [PATCH 1/2] sm750fb: coding style fixes lines over 80 chars
@ 2015-07-21  8:14         ` Joe Perches
  0 siblings, 0 replies; 28+ messages in thread
From: Joe Perches @ 2015-07-21  8:14 UTC (permalink / raw)
  To: Vinay Simha BN
  Cc: Sudip Mukherjee, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

On Tue, 2015-07-21 at 13:10 +0530, Vinay Simha BN wrote:
> scripts/checkpatch.pl kernel coding style fixes of WARNING

Please run your patches through scripts/checkpatch.pl --strict

> diff --git a/drivers/staging/sm750fb/ddk750_power.h b/drivers/staging/sm750fb/ddk750_power.h
> index b7cf6b2..abad4fe 100644
> --- a/drivers/staging/sm750fb/ddk750_power.h
> +++ b/drivers/staging/sm750fb/ddk750_power.h
> @@ -12,9 +12,9 @@ DPMS_t;
>  #define setDAC(off) \
>  		{	\
>  		POKE32(MISC_CTRL, FIELD_VALUE(PEEK32(MISC_CTRL), \
> -									MISC_CTRL,	\
> -									DAC_POWER,	\
> -									off));	\
> +			MISC_CTRL,	\
> +			DAC_POWER,	\
> +			off));		\

This is used only once and might be better expanded
in-place instead.

It's a single statement macro and doesn't need
braces or a terminating ; and it shouldn't be
indented 2 tabs.

#define setDAC(off)							\
	POKE32(MISC_CTRL,						\
	       FIELD_VALUE(PEEK32(MISC_CTRL), MISC_CTRL, DAC_POWER,	\
			   off))

> diff --git a/drivers/staging/sm750fb/ddk750_sii164.h b/drivers/staging/sm750fb/ddk750_sii164.h
[]
> @@ -5,10 +5,11 @@
[]
> +	SII164_HOTPLUG_DISABLE = 0, /* Disable Hot Plug output bit
> +					(always high) */

comment style isn't correct
etc...



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

* Re: [PATCH 1/2] sm750fb: coding style fixes lines over 80 chars
  2015-07-21  7:52       ` Vinay Simha BN
@ 2015-07-21  8:35         ` Dan Carpenter
  -1 siblings, 0 replies; 28+ messages in thread
From: Dan Carpenter @ 2015-07-21  8:35 UTC (permalink / raw)
  To: Vinay Simha BN
  Cc: open list:STAGING SUBSYSTEM,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	Teddy Wang, Greg Kroah-Hartman, open list, Sudip Mukherjee

On Tue, Jul 21, 2015 at 01:10:00PM +0530, Vinay Simha BN wrote:
> diff --git a/drivers/staging/sm750fb/sm750_help.h b/drivers/staging/sm750fb/sm750_help.h
> index 8dc6bd2..43d700b 100644
> --- a/drivers/staging/sm750fb/sm750_help.h
> +++ b/drivers/staging/sm750fb/sm750_help.h
> @@ -49,17 +49,23 @@
>  /* Field Macros */
>  #define FIELD_START(field)              (0 ? field)
>  #define FIELD_END(field)                (1 ? field)
> -#define FIELD_SIZE(field)               (1 + FIELD_END(field) - FIELD_START(field))
> -#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) | ((1 << (FIELD_SIZE(field)-1)) - 1)) << FIELD_START(field))
> -#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> FIELD_START(field))
> -#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & FIELD_MASK(field))
> +#define FIELD_SIZE(field)               (1 + FIELD_END(field) - \
> +						FIELD_START(field))
> +#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) \
> +					| ((1 << (FIELD_SIZE(field)-1)) - 1)) \
> +					<< FIELD_START(field))
> +#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> \
> +					FIELD_START(field))
> +#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & \
> +					 FIELD_MASK(field))
>  
>  #define FIELD_INIT(reg, field, value)   FIELD_DENORMALIZE(reg ## _ ## field, \
> -							  reg ## _ ## field ## _ ## value)
> +					  reg ## _ ## field ## _ ## value)
>  #define FIELD_INIT_VAL(reg, field, value) \
>  	(FIELD_DENORMALIZE(reg ## _ ## field, value))
>  #define FIELD_VAL_SET(x, r, f, v)       x = x & ~FIELD_MASK(r ## _ ## f) \
> -					| FIELD_DENORMALIZE(r ## _ ## f, r ## _ ## f ## _ ## v)
> +					| FIELD_DENORMALIZE(r ## _ ## f, \
> +					 r ## _ ## f ## _ ## v)
>  
>  #define RGB(r, g, b) \
>  ( \

These are worse for reading now.  Better to ignore the warning instead
of making the code ugly.

regards,
dan carpenter


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

* Re: [PATCH 1/2] sm750fb: coding style fixes lines over 80 chars
@ 2015-07-21  8:35         ` Dan Carpenter
  0 siblings, 0 replies; 28+ messages in thread
From: Dan Carpenter @ 2015-07-21  8:35 UTC (permalink / raw)
  To: Vinay Simha BN
  Cc: open list:STAGING SUBSYSTEM,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	Teddy Wang, Greg Kroah-Hartman, open list, Sudip Mukherjee

On Tue, Jul 21, 2015 at 01:10:00PM +0530, Vinay Simha BN wrote:
> diff --git a/drivers/staging/sm750fb/sm750_help.h b/drivers/staging/sm750fb/sm750_help.h
> index 8dc6bd2..43d700b 100644
> --- a/drivers/staging/sm750fb/sm750_help.h
> +++ b/drivers/staging/sm750fb/sm750_help.h
> @@ -49,17 +49,23 @@
>  /* Field Macros */
>  #define FIELD_START(field)              (0 ? field)
>  #define FIELD_END(field)                (1 ? field)
> -#define FIELD_SIZE(field)               (1 + FIELD_END(field) - FIELD_START(field))
> -#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) | ((1 << (FIELD_SIZE(field)-1)) - 1)) << FIELD_START(field))
> -#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> FIELD_START(field))
> -#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & FIELD_MASK(field))
> +#define FIELD_SIZE(field)               (1 + FIELD_END(field) - \
> +						FIELD_START(field))
> +#define FIELD_MASK(field)               (((1 << (FIELD_SIZE(field)-1)) \
> +					| ((1 << (FIELD_SIZE(field)-1)) - 1)) \
> +					<< FIELD_START(field))
> +#define FIELD_NORMALIZE(reg, field)     (((reg) & FIELD_MASK(field)) >> \
> +					FIELD_START(field))
> +#define FIELD_DENORMALIZE(field, value) (((value) << FIELD_START(field)) & \
> +					 FIELD_MASK(field))
>  
>  #define FIELD_INIT(reg, field, value)   FIELD_DENORMALIZE(reg ## _ ## field, \
> -							  reg ## _ ## field ## _ ## value)
> +					  reg ## _ ## field ## _ ## value)
>  #define FIELD_INIT_VAL(reg, field, value) \
>  	(FIELD_DENORMALIZE(reg ## _ ## field, value))
>  #define FIELD_VAL_SET(x, r, f, v)       x = x & ~FIELD_MASK(r ## _ ## f) \
> -					| FIELD_DENORMALIZE(r ## _ ## f, r ## _ ## f ## _ ## v)
> +					| FIELD_DENORMALIZE(r ## _ ## f, \
> +					 r ## _ ## f ## _ ## v)
>  
>  #define RGB(r, g, b) \
>  ( \

These are worse for reading now.  Better to ignore the warning instead
of making the code ugly.

regards,
dan carpenter


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

* Re: [PATCH 2/2] sm750fb: coding style fixes lines over 80 chars - v2
  2015-07-21  7:52         ` Vinay Simha BN
@ 2015-07-21  8:39           ` Dan Carpenter
  -1 siblings, 0 replies; 28+ messages in thread
From: Dan Carpenter @ 2015-07-21  8:39 UTC (permalink / raw)
  To: Vinay Simha BN
  Cc: open list:STAGING SUBSYSTEM,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	Teddy Wang, Greg Kroah-Hartman, open list, Sudip Mukherjee

Slow down.  This patch is totally wrong.  You're panicking and sending
nonsense patches without a description or signed off by.  It deletes
code.  The v2 isn't where it should be [PATCH 2/2 v2].

There is no need to rush.  Fix this and send the patch tomorrow.

regards,
dan carpenter


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

* Re: [PATCH 2/2] sm750fb: coding style fixes lines over 80 chars - v2
@ 2015-07-21  8:39           ` Dan Carpenter
  0 siblings, 0 replies; 28+ messages in thread
From: Dan Carpenter @ 2015-07-21  8:39 UTC (permalink / raw)
  To: Vinay Simha BN
  Cc: open list:STAGING SUBSYSTEM,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	Teddy Wang, Greg Kroah-Hartman, open list, Sudip Mukherjee

Slow down.  This patch is totally wrong.  You're panicking and sending
nonsense patches without a description or signed off by.  It deletes
code.  The v2 isn't where it should be [PATCH 2/2 v2].

There is no need to rush.  Fix this and send the patch tomorrow.

regards,
dan carpenter


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

* Re: [PATCH] sm750fb: coding style fixes lines over 80 chars
       [not found]   ` <CAGWqDJ4dgrsYAiWXMKi2j1-kGoFhQ_rZGxuDuqpbfTG2P7bnsw@mail.gmail.com>
@ 2015-07-27  5:36       ` Sudip Mukherjee
  0 siblings, 0 replies; 28+ messages in thread
From: Sudip Mukherjee @ 2015-07-27  5:24 UTC (permalink / raw)
  To: Vinay Simha
  Cc: Joe Perches, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

On Tue, Jul 21, 2015 at 03:17:06PM +0530, Vinay Simha wrote:
> Joe,
> 
> Just want to confirm, shall i delete this code in sm750_help.h, even the
> FIELD_START and FIELD_END is not required.
If they are not used anywhere feel free to send a patch to delete them.

regards
sudip

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

* Re: [PATCH] sm750fb: coding style fixes lines over 80 chars
@ 2015-07-27  5:36       ` Sudip Mukherjee
  0 siblings, 0 replies; 28+ messages in thread
From: Sudip Mukherjee @ 2015-07-27  5:36 UTC (permalink / raw)
  To: Vinay Simha
  Cc: Joe Perches, Teddy Wang, Greg Kroah-Hartman,
	open list:STAGING - SILICON MOTION SM750 FRAME BUFFER DRIVER,
	open list:STAGING SUBSYSTEM, open list

On Tue, Jul 21, 2015 at 03:17:06PM +0530, Vinay Simha wrote:
> Joe,
> 
> Just want to confirm, shall i delete this code in sm750_help.h, even the
> FIELD_START and FIELD_END is not required.
If they are not used anywhere feel free to send a patch to delete them.

regards
sudip

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

end of thread, other threads:[~2015-07-27  5:36 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-07-17  7:28 [PATCH] sm750fb: coding style fixes lines over 80 chars Vinay Simha BN
2015-07-17  7:40 ` Vinay Simha BN
2015-07-17  7:38 ` Joe Perches
2015-07-17  7:38   ` Joe Perches
2015-07-21  6:44   ` [PATCH] sm750fb: coding style fixes in _accel.h,__help.h Vinay Simha BN
2015-07-21  6:56     ` Vinay Simha BN
2015-07-21  7:17     ` Sudip Mukherjee
2015-07-21  7:29       ` Sudip Mukherjee
     [not found]       ` <CAGWqDJ5AkG5PwQOkboZfiC1PzXw0j+x5zwaYn0SWWtiks+OP2A@mail.gmail.com>
2015-07-21  7:31         ` Sudip Mukherjee
2015-07-21  7:43           ` Sudip Mukherjee
2015-07-21  7:40     ` [PATCH 1/2] sm750fb: coding style fixes lines over 80 chars Vinay Simha BN
2015-07-21  7:52       ` Vinay Simha BN
2015-07-21  7:40       ` [PATCH 2/2] sm750fb: coding style fixes lines over 80 chars - v2 Vinay Simha BN
2015-07-21  7:52         ` Vinay Simha BN
2015-07-21  8:39         ` Dan Carpenter
2015-07-21  8:39           ` Dan Carpenter
2015-07-21  8:14       ` [PATCH 1/2] sm750fb: coding style fixes lines over 80 chars Joe Perches
2015-07-21  8:14         ` Joe Perches
2015-07-21  8:35       ` Dan Carpenter
2015-07-21  8:35         ` Dan Carpenter
     [not found]   ` <CAGWqDJ4dgrsYAiWXMKi2j1-kGoFhQ_rZGxuDuqpbfTG2P7bnsw@mail.gmail.com>
2015-07-27  5:24     ` [PATCH] " Sudip Mukherjee
2015-07-27  5:36       ` Sudip Mukherjee
  -- strict thread matches above, loose matches on Subject: below --
2015-07-15 18:46 Vinay Simha BN
2015-07-15 18:58 ` Vinay Simha BN
2015-07-16  3:57 ` Joe Perches
2015-07-16  3:57   ` Joe Perches
2015-07-17  7:16   ` Vinay Simha
2015-07-17  7:28     ` Vinay Simha

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.