sm750fb: coding style fixes lines over 80 chars
PATCH 1/1 sm750fb: coding style fixes lines over 80 chars
scripts/checkpatch.pl kernel coding style fixes of WARNING
WARNING: line over 80 characters
--- 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(-)
drivers/staging/sm750fb/ddk750_display.h +5 -5
@@ -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, }
drivers/staging/sm750fb/ddk750_hwi2c.h +4 -2
@@ -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
drivers/staging/sm750fb/ddk750_power.h +3 -3
@@ -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 );
drivers/staging/sm750fb/ddk750_sii164.h +7 -5
@@ -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 */
drivers/staging/sm750fb/sm750.h +8 -5
@@ -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 *,
drivers/staging/sm750fb/sm750_accel.h +12 -7
@@ -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
drivers/staging/sm750fb/sm750_help.h +14 -7
@@ -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)
drivers/staging/sm750fb/sm750_hw.h +13 -8
@@ -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 );
Signature · 1 line
2.1.2
Quoted 1 line · Vinay Simha BN
scripts/checkpatch.plkernel coding style fixes of WARNING
Please use checkpatch's --strict option until you know kernel style much better.
drivers/staging/sm750fb/sm750_accel.h
Quoted 1 line
drivers/staging/sm750fb/sm750_accel.h +0
-0
[]
drivers/staging/sm750fb/sm750_accel.h unsigned int height, /* width and height of rectangle in pixel value */ · line 263
Quoted 10 lines
drivers/staging/sm750fb/sm750_accel.h +2
-4@@ -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
*/
drivers/staging/sm750fb/sm750_help.h
Quoted 1 line
drivers/staging/sm750fb/sm750_help.h +0
-0
[]
drivers/staging/sm750fb/sm750_help.h line 51
Quoted 4 lines
drivers/staging/sm750fb/sm750_help.h +0
-0@@ -49,17 +49,23 @@/* Field Macros */ #define FIELD_START (field) (0 ? field)#define FIELD_END (field) (1 ? field)
Odd statements.
Quoted 13 lines
drivers/staging/sm750fb/sm750_help.h +9
-4-#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))
drivers/staging/sm750fb/sm750_help.h line 68
Quoted 10 lines
drivers/staging/sm750fb/sm750_help.h +3
-2#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.
PATCH 1/1 sm750fb: coding style fixes in _accel.h,__help.h
WARNING: line over 80 characters
comment block , odd statement fixes
--- drivers/staging/sm750fb/sm750_accel.h | 30 ++++++++++++++++++++---------- drivers/staging/sm750fb/sm750_help.h | 23 +---------------------- 2 files changed, 21 insertions(+), 32 deletions(-)
drivers/staging/sm750fb/sm750_accel.h +20 -10
@@ -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
drivers/staging/sm750fb/sm750_help.h +1 -22
@@ -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)) \
Signature · 1 line
2.1.2
Sudip Mukherjee
maintainerRe: [PATCH] sm750fb: coding style fixes in _accel.h,__help.h
Quoted 2 lines · Vinay Simha BN
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
Sudip Mukherjee
maintainerRe: [PATCH] sm750fb: coding style fixes in _accel.h,__help.h
In reply to a message not in the archiveQuoted 2 lines · Vinay Simha
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
PATCH 1/2 sm750fb: coding style fixes lines over 80 chars
In reply to Vinay Simha BNscripts/checkpatch.pl kernel coding style fixes of WARNING
WARNING: line over 80 characters
--- 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(-)
drivers/staging/sm750fb/ddk750_display.h +5 -5
@@ -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, }
drivers/staging/sm750fb/ddk750_hwi2c.h +4 -2
@@ -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
drivers/staging/sm750fb/ddk750_power.h +3 -3
@@ -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 );
drivers/staging/sm750fb/ddk750_sii164.h +7 -5
@@ -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 */
drivers/staging/sm750fb/sm750.h +8 -5
@@ -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 *,
drivers/staging/sm750fb/sm750_accel.h +12 -7
@@ -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
drivers/staging/sm750fb/sm750_help.h +14 -7
@@ -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)
drivers/staging/sm750fb/sm750_hw.h +13 -8
@@ -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 );
Signature · 1 line
2.1.2
PATCH 2/2 sm750fb: coding style fixes lines over 80 chars - v2
--- drivers/staging/sm750fb/sm750_accel.h | 30 ++++++++++++++++++++---------- drivers/staging/sm750fb/sm750_help.h | 23 +---------------------- 2 files changed, 21 insertions(+), 32 deletions(-)
drivers/staging/sm750fb/sm750_accel.h +20 -10
@@ -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
drivers/staging/sm750fb/sm750_help.h +1 -22
@@ -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)) \
Signature · 1 line
2.1.2
Quoted 1 line · Vinay Simha BN
scripts/checkpatch.plkernel coding style fixes of WARNING
Please run your patches through scripts/checkpatch.pl --strict
Quoted 5 lines
drivers/staging/sm750fb/ddk750_power.h +0
-0
drivers/staging/sm750fb/ddk750_power.h DPMS_t; · line 17
Quoted 9 lines
drivers/staging/sm750fb/ddk750_power.h +3
-3@@ -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))
drivers/staging/sm750fb/ddk750_sii164.h
Quoted 1 line
drivers/staging/sm750fb/ddk750_sii164.h +0
-0
[]
drivers/staging/sm750fb/ddk750_sii164.h
Quoted 1 line
drivers/staging/sm750fb/ddk750_sii164.h +0
-0@@ -5,10 +5,11 @@
[]
drivers/staging/sm750fb/ddk750_sii164.h line 9
Quoted 2 lines
drivers/staging/sm750fb/ddk750_sii164.h +2
-0+ SII164_HOTPLUG_DISABLE = 0, /* Disable Hot Plug output bit +(always high) */
comment style isn't correct
etc...
Quoted 24 lines · Vinay Simha BN
drivers/staging/sm750fb/sm750_help.h +9
-5@@ -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)
drivers/staging/sm750fb/sm750_help.h line 71
Quoted 10 lines
drivers/staging/sm750fb/sm750_help.h +3
-1+ 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
Re: [PATCH 2/2] sm750fb: coding style fixes lines over 80 chars - v2
In reply to Vinay Simha BNSlow 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
Sudip Mukherjee
maintainerQuoted 4 lines · Vinay Simha
Joe,
Just want to confirm, shall i delete this code in
sm750_help.h, even theFIELD_STARTandFIELD_ENDis not required.
If they are not used anywhere feel free to send a patch to delete them.
regards
sudip