Changes in v2:
- Removed type information from variable names
- Broken up the changes into smaller patches
Pavle Rohalj (49):
staging: sm750fb: Update dvi_ctrl_device to snake case
staging: sm750fb: Rename dviInit to dvi_init and update param names
staging: sm750fb: Update param names of PFN_DVICTRL_INIT function
pointer
staging: sm750fb: Remove type names in variables and type definitions
staging: sm750fb: Remove remaining camel case names in ddk750_dvi.h
staging: sm750fb: Update displayControlAdjust_SM750LE to snake case
staging: sm750fb: Update programModeRegisters to snake case
staging: sm750fb: Update enum values in dpms to snake case
staging: sm750fb: Rename sm750_set_power_mode function parameter
staging: sm750fb: Rename ddk750_setModeTiming to
ddk750_set_mode_timing
staging: sm750fb: Rename i2cWriteReg and i2cReadReg to snake case
staging: sm750fb: Rename vendorID local variable to snake case
staging: sm750fb: Rename deviceID local variable to snake case
staging: sm750fb: Rename sii164SelectHotPlugDetectionMode to snake
case
staging: sm750fb: Rename gDviCtrlChipName to snake case
staging: sm750fb: Update function parameter names in ddk750_sii164.c
staging: sm750fb: Rename local variables to snake case
staging: sm750fb: Rename function params of sii164_init_chip
staging: sm750fb: Rename function parameter of
sii164_enable_hot_plug_detection
staging: sm750fb: Update function parameter names to snake case
staging: sm750fb: Rename function write_dpPort to snake case
staging: sm750fb: Update local variable in sm750_hw_copyarea to snake
case
staging: sm750fb: Update local variables in sm750_hw_imageblit to
snake case
staging: sm750fb: Update local variable in sm750_hw_fillrect to snake
case
staging: sm750fb: Rename deGetTransparency to snake case
staging: sm750fb: Update function parameter of sm750_hw_imageblit to
snake case
staging: sm750fb: Rename function params to snake case in
sm750_accel.h
staging: sm750fb: Update members of lynx_cursor to snake case
staging: sm750fb: Rename function sm750_hw_cursor_setSize to snake
case
staging: sm750fb: Rename function sm750_hw_cursor_setPos to snake case
staging: sm750fb: Rename function sm750_hw_cursor_setColor to snake
case
staging: sm750fb: Rename function sm750_hw_cursor_setData to snake
case
staging: sm750fb: Rename function hw_sm750_crtc_setMode to snake case
staging: sm750fb: Update members of init_status struct to snake case
staging: sm750fb: Update members of sm750_dev struct to snake case
staging: sm750fb: Update members of lynxfb_crtc struct to snake case
staging: sm750fb: Rename function hw_sm750_output_setMode to snake
case
staging: sm750fb: Rename function hw_sm750_setColReg to snake case
staging: sm750fb: Rename functions *_setBLANK to snake case
staging: sm750fb: Rename function sm750_hw_cursor_setData2 to snake
case
staging: sm750fb: Rename function hw_sm750_initAccel to snake case
staging: sm750fb: Rename functions *_deWait to snake case
staging: sm750fb: Update members of lynx_accel struct to snake case
staging: sm750fb: Rename function hw_sm750_crtc_checkMode to snake
case
staging: sm750fb: Rename sii164_set_power function parameter
staging: sm750fb: Rename local variable Bpp to bpp in sm750.c
staging: sm750fb: Rename proc_setBLANK member of lynxfb_output struct
staging: sm750fb: Rename fixId to fix_id
staging: sm750fb: Update members of sm750_pnltype struct to snake case
drivers/staging/sm750fb/ddk750_dvi.c | 32 ++---
drivers/staging/sm750fb/ddk750_dvi.h | 80 ++++++-------
drivers/staging/sm750fb/ddk750_mode.c | 88 +++++++-------
drivers/staging/sm750fb/ddk750_mode.h | 2 +-
drivers/staging/sm750fb/ddk750_power.h | 10 +-
drivers/staging/sm750fb/ddk750_sii164.c | 152 ++++++++++++------------
drivers/staging/sm750fb/ddk750_sii164.h | 40 +++----
drivers/staging/sm750fb/sm750.c | 130 ++++++++++----------
drivers/staging/sm750fb/sm750.h | 56 ++++-----
drivers/staging/sm750fb/sm750_accel.c | 148 +++++++++++------------
drivers/staging/sm750fb/sm750_accel.h | 42 +++----
drivers/staging/sm750fb/sm750_cursor.c | 14 +--
drivers/staging/sm750fb/sm750_cursor.h | 10 +-
drivers/staging/sm750fb/sm750_hw.c | 56 ++++-----
14 files changed, 430 insertions(+), 430 deletions(-)
--
2.30.2
@@ -27,16 +27,16 @@ typedef void (*PFN_DVICTRL_CLEARINTERRUPT)(void);/* Structure to hold all the function pointer to the DVI Controller. */structdvi_ctrl_device{-PFN_DVICTRL_INITpfnInit;-PFN_DVICTRL_RESETCHIPpfnResetChip;-PFN_DVICTRL_GETCHIPSTRINGpfnGetChipString;-PFN_DVICTRL_GETVENDORIDpfnGetVendorId;-PFN_DVICTRL_GETDEVICEIDpfnGetDeviceId;-PFN_DVICTRL_SETPOWERpfnSetPower;-PFN_DVICTRL_HOTPLUGDETECTIONpfnEnableHotPlugDetection;-PFN_DVICTRL_ISCONNECTEDpfnIsConnected;-PFN_DVICTRL_CHECKINTERRUPTpfnCheckInterrupt;-PFN_DVICTRL_CLEARINTERRUPTpfnClearInterrupt;+PFN_DVICTRL_INITpfn_init;+PFN_DVICTRL_RESETCHIPpfn_reset_chip;+PFN_DVICTRL_GETCHIPSTRINGpfn_get_chip_string;+PFN_DVICTRL_GETVENDORIDpfn_get_vendor_id;+PFN_DVICTRL_GETDEVICEIDpfn_get_device_id;+PFN_DVICTRL_SETPOWERpfn_set_power;+PFN_DVICTRL_HOTPLUGDETECTIONpfn_enable_hot_plug_detection;+PFN_DVICTRL_ISCONNECTEDpfn_is_connected;+PFN_DVICTRL_CHECKINTERRUPTpfn_check_interrupt;+PFN_DVICTRL_CLEARINTERRUPTpfn_clear_interrupt;};#define DVI_CTRL_SII164
@@ -48,13 +48,13 @@ unsigned short sii164GetVendorID(void)}/*-*sii164GetDeviceID+*sii164_get_device_id*ThisfunctiongetsthedeviceIDoftheDVIcontrollerchip.**Output:*DeviceID*/-unsignedshortsii164GetDeviceID(void)+unsignedshortsii164_get_device_id(void){unsignedshortdeviceID;
@@ -72,7 +72,7 @@ unsigned short sii164GetDeviceID(void)*//*-*sii164InitChip+*sii164_init_chip*ThisfunctioninitializeanddetecttheDVIcontrollerchip.**Input:
@@ -118,7 +118,7 @@ unsigned short sii164GetDeviceID(void)*0-Success*-1-Fail.*/-longsii164InitChip(unsignedcharedge_select,+longsii164_init_chip(unsignedcharedge_select,unsignedcharbus_select,unsignedchardual_edge_clk_select,unsignedcharhsync_enable,
@@ -140,8 +140,8 @@ long sii164InitChip(unsigned char edge_select,#endif/* Check if SII164 Chip exists */-if((sii164GetVendorID()==SII164_VENDOR_ID)&&-(sii164GetDeviceID()==SII164_DEVICE_ID)){+if((sii164_get_vendor_id()==SII164_VENDOR_ID)&&+(sii164_get_device_id()==SII164_DEVICE_ID)){/**InitializeSII164controllerchip.*/
@@ -250,36 +250,36 @@ long sii164InitChip(unsigned char edge_select,#ifdef SII164_FULL_FUNCTIONS/*-*sii164ResetChip+*sii164_reset_chip*ThisfunctionresetstheDVIControllerChip.*/-voidsii164ResetChip(void)+voidsii164_reset_chip(void){/* Power down */-sii164SetPower(0);-sii164SetPower(1);+sii164_set_power(0);+sii164_set_power(1);}/*-*sii164GetChipString+*sii164_get_chip_string*ThisfunctionreturnsacharstringnameofthecurrentDVIController*chip.**It'sconvenientforapplicationneedtodisplaythechipname.*/-char*sii164GetChipString(void)+char*sii164_get_chip_string(void){returngDviCtrlChipName;}/*-*sii164SetPower+*sii164_set_power*ThisfunctionsetsthepowerconfigurationoftheDVIControllerChip.**Input:*powerUp-Flagtosetthepowerdownorup*/-voidsii164SetPower(unsignedcharpowerUp)+voidsii164_set_power(unsignedcharpowerUp){unsignedcharconfig;
@@ -4,7 +4,7 @@/* dvi chip stuffs structros */-typedeflong(*PFN_DVICTRL_INIT)(unsignedcharedge_select,+typedeflong(*DVICTRL_INIT)(unsignedcharedge_select,unsignedcharbus_select,unsignedchardual_edge_clk_select,unsignedcharhsync_enable,
@@ -15,28 +15,28 @@ typedef long (*PFN_DVICTRL_INIT)(unsigned char edge_select,unsignedcharpll_filter_enable,unsignedcharpll_filter_value);-typedefvoid(*PFN_DVICTRL_RESETCHIP)(void);-typedefchar*(*PFN_DVICTRL_GETCHIPSTRING)(void);-typedefunsignedshort(*PFN_DVICTRL_GETVENDORID)(void);-typedefunsignedshort(*PFN_DVICTRL_GETDEVICEID)(void);-typedefvoid(*PFN_DVICTRL_SETPOWER)(unsignedcharpowerUp);-typedefvoid(*PFN_DVICTRL_HOTPLUGDETECTION)(unsignedcharenableHotPlug);-typedefunsignedchar(*PFN_DVICTRL_ISCONNECTED)(void);-typedefunsignedchar(*PFN_DVICTRL_CHECKINTERRUPT)(void);-typedefvoid(*PFN_DVICTRL_CLEARINTERRUPT)(void);+typedefvoid(*DVICTRL_RESETCHIP)(void);+typedefchar*(*DVICTRL_GETCHIPSTRING)(void);+typedefunsignedshort(*DVICTRL_GETVENDORID)(void);+typedefunsignedshort(*DVICTRL_GETDEVICEID)(void);+typedefvoid(*DVICTRL_SETPOWER)(unsignedcharpowerUp);+typedefvoid(*DVICTRL_HOTPLUGDETECTION)(unsignedcharenableHotPlug);+typedefunsignedchar(*DVICTRL_ISCONNECTED)(void);+typedefunsignedchar(*DVICTRL_CHECKINTERRUPT)(void);+typedefvoid(*DVICTRL_CLEARINTERRUPT)(void);/* Structure to hold all the function pointer to the DVI Controller. */structdvi_ctrl_device{-PFN_DVICTRL_INITpfn_init;-PFN_DVICTRL_RESETCHIPpfn_reset_chip;-PFN_DVICTRL_GETCHIPSTRINGpfn_get_chip_string;-PFN_DVICTRL_GETVENDORIDpfn_get_vendor_id;-PFN_DVICTRL_GETDEVICEIDpfn_get_device_id;-PFN_DVICTRL_SETPOWERpfn_set_power;-PFN_DVICTRL_HOTPLUGDETECTIONpfn_enable_hot_plug_detection;-PFN_DVICTRL_ISCONNECTEDpfn_is_connected;-PFN_DVICTRL_CHECKINTERRUPTpfn_check_interrupt;-PFN_DVICTRL_CLEARINTERRUPTpfn_clear_interrupt;+DVICTRL_INITinit;+DVICTRL_RESETCHIPreset_chip;+DVICTRL_GETCHIPSTRINGget_chip_string;+DVICTRL_GETVENDORIDget_vendor_id;+DVICTRL_GETDEVICEIDget_device_id;+DVICTRL_SETPOWERset_power;+DVICTRL_HOTPLUGDETECTIONenable_hot_plug_detection;+DVICTRL_ISCONNECTEDis_connected;+DVICTRL_CHECKINTERRUPTcheck_interrupt;+DVICTRL_CLEARINTERRUPTclear_interrupt;};#define DVI_CTRL_SII164
@@ -75,7 +75,7 @@ display_control_adjust_sm750le(struct mode_parameter *mode_param,}/* only timing related registers will be programed */-staticintprogramModeRegisters(structmode_parameter*pModeParam,+staticintprogram_mode_registers(structmode_parameter*mode_param,structpll_value*pll){intret=0;
@@ -36,42 +36,42 @@ displayControlAdjust_SM750LE(struct mode_parameter *pModeParam,((x-1)&CRT_AUTO_CENTERING_BR_RIGHT_MASK));/*-*AssumecommonfieldsindispControlhavebeenproperlysetbefore+*Assumecommonfieldsindisp_controlhavebeenproperlysetbefore*callingthisfunction.-*ThisfunctiononlysetstheextrafieldsindispControl.+*Thisfunctiononlysetstheextrafieldsindisp_control.*//* Clear bit 29:27 of display control register */-dispControl&=~CRT_DISPLAY_CTRL_CLK_MASK;+disp_control&=~CRT_DISPLAY_CTRL_CLK_MASK;/* Set bit 29:27 of display control register for the right clock *//* Note that SM750LE only need to supported 7 resolutions. */if(x==800&&y==600)-dispControl|=CRT_DISPLAY_CTRL_CLK_PLL41;+disp_control|=CRT_DISPLAY_CTRL_CLK_PLL41;elseif(x==1024&&y==768)-dispControl|=CRT_DISPLAY_CTRL_CLK_PLL65;+disp_control|=CRT_DISPLAY_CTRL_CLK_PLL65;elseif(x==1152&&y==864)-dispControl|=CRT_DISPLAY_CTRL_CLK_PLL80;+disp_control|=CRT_DISPLAY_CTRL_CLK_PLL80;elseif(x==1280&&y==768)-dispControl|=CRT_DISPLAY_CTRL_CLK_PLL80;+disp_control|=CRT_DISPLAY_CTRL_CLK_PLL80;elseif(x==1280&&y==720)-dispControl|=CRT_DISPLAY_CTRL_CLK_PLL74;+disp_control|=CRT_DISPLAY_CTRL_CLK_PLL74;elseif(x==1280&&y==960)-dispControl|=CRT_DISPLAY_CTRL_CLK_PLL108;+disp_control|=CRT_DISPLAY_CTRL_CLK_PLL108;elseif(x==1280&&y==1024)-dispControl|=CRT_DISPLAY_CTRL_CLK_PLL108;+disp_control|=CRT_DISPLAY_CTRL_CLK_PLL108;else/* default to VGA clock */-dispControl|=CRT_DISPLAY_CTRL_CLK_PLL25;+disp_control|=CRT_DISPLAY_CTRL_CLK_PLL25;/* Set bit 25:24 of display controller */-dispControl|=(CRT_DISPLAY_CTRL_CRTSELECT|CRT_DISPLAY_CTRL_RGBBIT);+disp_control|=(CRT_DISPLAY_CTRL_CRTSELECT|CRT_DISPLAY_CTRL_RGBBIT);/* Set bit 14 of display controller */-dispControl|=DISPLAY_CTRL_CLOCK_PHASE;+disp_control|=DISPLAY_CTRL_CLOCK_PHASE;-poke32(CRT_DISPLAY_CTRL,dispControl);+poke32(CRT_DISPLAY_CTRL,disp_control);-returndispControl;+returndisp_control;}/* only timing related registers will be programed */
@@ -125,7 +125,7 @@ static int programModeRegisters(struct mode_parameter *pModeParam,tmp|=DISPLAY_CTRL_HSYNC_PHASE;if(sm750_get_chip_type()==SM750LE){-displayControlAdjust_SM750LE(pModeParam,tmp);+display_control_adjust_sm750le(pModeParam,tmp);}else{reg=peek32(CRT_DISPLAY_CTRL)&~(DISPLAY_CTRL_VSYNC_PHASE|
@@ -231,12 +231,12 @@ long sii164_init_chip(unsigned char edge_select,/* Set the PLL Filter value */config|=((pll_filter_value&0x07)<<1);-i2cWriteReg(SII164_I2C_ADDRESS,SII164_PLL,config);+i2c_write_reg(SII164_I2C_ADDRESS,SII164_PLL,config);/* Recover from Power Down and enable output. */-config=i2cReadReg(SII164_I2C_ADDRESS,SII164_CONFIGURATION);+config=i2c_read_reg(SII164_I2C_ADDRESS,SII164_CONFIGURATION);config|=SII164_CONFIGURATION_POWER_NORMAL;-i2cWriteReg(SII164_I2C_ADDRESS,SII164_CONFIGURATION,config);+i2c_write_reg(SII164_I2C_ADDRESS,SII164_CONFIGURATION,config);return0;}
@@ -283,17 +283,17 @@ void sii164_set_power(unsigned char powerUp){unsignedcharconfig;-config=i2cReadReg(SII164_I2C_ADDRESS,SII164_CONFIGURATION);+config=i2c_read_reg(SII164_I2C_ADDRESS,SII164_CONFIGURATION);if(powerUp==1){/* Power up the chip */config&=~SII164_CONFIGURATION_POWER_MASK;config|=SII164_CONFIGURATION_POWER_NORMAL;-i2cWriteReg(SII164_I2C_ADDRESS,SII164_CONFIGURATION,config);+i2c_write_reg(SII164_I2C_ADDRESS,SII164_CONFIGURATION,config);}else{/* Power down the chip */config&=~SII164_CONFIGURATION_POWER_MASK;config|=SII164_CONFIGURATION_POWER_DOWN;-i2cWriteReg(SII164_I2C_ADDRESS,SII164_CONFIGURATION,config);+i2c_write_reg(SII164_I2C_ADDRESS,SII164_CONFIGURATION,config);}}
@@ -338,7 +338,7 @@ void sii164_enable_hot_plug_detection(unsigned char enableHotPlug){unsignedchardetectReg;-detectReg=i2cReadReg(SII164_I2C_ADDRESS,SII164_DETECT);+detectReg=i2c_read_reg(SII164_I2C_ADDRESS,SII164_DETECT);/* Depending on each DVI controller, need to enable the hot plug based*oneachindividualchipdesign.
Fix "Avoid CamelCase" checkpatch.pl check for the local
variable deviceID in the function sii164_get_device_id.
Signed-off-by: Pavle Rohalj <redacted>
---
drivers/staging/sm750fb/ddk750_sii164.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Fix "Avoid CamelCase" checkpatch.pl check for the local
variable vendorID in the function sii164_get_vendor_id.
Signed-off-by: Pavle Rohalj <redacted>
---
drivers/staging/sm750fb/ddk750_sii164.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
@@ -25,7 +25,7 @@#ifdef SII164_FULL_FUNCTIONS/* Name of the DVI Controller chip */-staticchar*gDviCtrlChipName="Silicon Image SiI 164";+staticchar*dvi_ctrl_chip_name="Silicon Image SiI 164";#endif/*
@@ -277,14 +277,14 @@ char *sii164_get_chip_string(void)*ThisfunctionsetsthepowerconfigurationoftheDVIControllerChip.**Input:-*powerUp-Flagtosetthepowerdownorup+*power_up-Flagtosetthepowerdownorup*/-voidsii164_set_power(unsignedcharpowerUp)+voidsii164_set_power(unsignedcharpower_up){unsignedcharconfig;config=i2c_read_reg(SII164_I2C_ADDRESS,SII164_CONFIGURATION);-if(powerUp==1){+if(power_up==1){/* Power up the chip */config&=~SII164_CONFIGURATION_POWER_MASK;config|=SII164_CONFIGURATION_POWER_NORMAL;
@@ -343,7 +343,7 @@ void sii164_enable_hot_plug_detection(unsigned char enableHotPlug)/* Depending on each DVI controller, need to enable the hot plug based*oneachindividualchipdesign.*/-if(enableHotPlug!=0)+if(enable_hot_plug!=0)sii164_select_hot_plug_detection_mode(SII164_HOTPLUG_USE_MDI);elsesii164_select_hot_plug_detection_mode(SII164_HOTPLUG_DISABLE);
@@ -336,9 +336,9 @@ void sii164_select_hot_plug_detection_mode(enum sii164_hot_plug_mode hot_plug_mo*/voidsii164_enable_hot_plug_detection(unsignedcharenable_hot_plug){-unsignedchardetectReg;+unsignedchardetect_reg;-detectReg=i2c_read_reg(SII164_I2C_ADDRESS,SII164_DETECT);+detect_reg=i2c_read_reg(SII164_I2C_ADDRESS,SII164_DETECT);/* Depending on each DVI controller, need to enable the hot plug based*oneachindividualchipdesign.
Fix "Avoid CamelCase" checkpatch.pl check for the function parameter
enable_hot_plug in the prototype of the function
sii164_enable_hot_plug_detection.
Signed-off-by: Pavle Rohalj <redacted>
---
drivers/staging/sm750fb/ddk750_sii164.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
@@ -396,12 +396,12 @@ int sm750_hw_imageblit(struct lynx_accel *accel, const char *src_buf,for(i=0;i<height;i++){/* For each line, send the data in chunks of 4 bytes */for(j=0;j<(ul4BytesPerScan/4);j++)-write_dpPort(accel,*(unsignedint*)(src_buf+(j*4)));+write_dp_port(accel,*(unsignedint*)(src_buf+(j*4)));if(ulBytesRemain){memcpy(ajRemain,src_buf+ul4BytesPerScan,ulBytesRemain);-write_dpPort(accel,*(unsignedint*)ajRemain);+write_dp_port(accel,*(unsignedint*)ajRemain);}src_buf+=src_delta;
@@ -132,13 +132,13 @@ int sm750_hw_fillrect(struct lynx_accel *accel,/***sm750_hm_copyarea-*@sBase:Addressofsource:offsetinframebuffer-*@sPitch:PitchvalueofsourcesurfaceinBYTE+*@s_base:Addressofsource:offsetinframebuffer+*@s_pitch:PitchvalueofsourcesurfaceinBYTE*@sx:Startingxcoordinateofsourcesurface*@sy:Startingycoordinateofsourcesurface-*@dBase:Addressofdestination:offsetinframebuffer-*@dPitch:PitchvalueofdestinationsurfaceinBYTE-*@Bpp:Colordepthofdestinationsurface+*@d_base:Addressofdestination:offsetinframebuffer+*@d_pitch:PitchvalueofdestinationsurfaceinBYTE+*@bpp:Colordepthofdestinationsurface*@dx:Startingxcoordinateofdestinationsurface*@dy:Startingycoordinateofdestinationsurface*@width:widthofrectangleinpixelvalue
@@ -146,10 +146,10 @@ int sm750_hw_fillrect(struct lynx_accel *accel,*@rop2:ROPvalue*/intsm750_hw_copyarea(structlynx_accel*accel,-unsignedintsBase,unsignedintsPitch,+unsignedints_base,unsignedints_pitch,unsignedintsx,unsignedintsy,-unsignedintdBase,unsignedintdPitch,-unsignedintBpp,unsignedintdx,unsignedintdy,+unsignedintd_base,unsignedintd_pitch,+unsignedintbpp,unsignedintdx,unsignedintdy,unsignedintwidth,unsignedintheight,unsignedintrop2){
@@ -160,7 +160,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,de_ctrl=0;/* If source and destination are the same surface, need to check for overlay cases */-if(sBase==dBase&&sPitch==dPitch){+if(s_base==d_base&&s_pitch==d_pitch){/* Determine direction of operation */if(sy<dy){/* +----------+
@@ -298,26 +298,26 @@ static unsigned int deGetTransparency(struct lynx_accel *accel)/***sm750_hw_imageblit-*@pSrcbuf:pointertostartofsourcebufferinsystemmemory-*@srcDelta:Pitchvalue(inbytes)ofthesourcebuffer,+ivemeanstopdown+*@src_buf:pointertostartofsourcebufferinsystemmemory+*@src_delta:Pitchvalue(inbytes)ofthesourcebuffer,+ivemeanstopdown*and-ivemeanbuttonup-*@startBit:Monodatacanstartatanybitinabyte,thisvalueshouldbe+*@start_bit:Monodatacanstartatanybitinabyte,thisvalueshouldbe*0to7-*@dBase:Addressofdestination:offsetinframebuffer-*@dPitch:PitchvalueofdestinationsurfaceinBYTE-*@bytePerPixel:Colordepthofdestinationsurface+*@d_base:Addressofdestination:offsetinframebuffer+*@d_pitch:PitchvalueofdestinationsurfaceinBYTE+*@byte_per_pixel:Colordepthofdestinationsurface*@dx:Startingxcoordinateofdestinationsurface*@dy:Startingycoordinateofdestinationsurface*@width:widthofrectangleinpixelvalue*@height:heightofrectangleinpixelvalue*@fColor:Foregroundcolor(correspondingtoa1inthemonochromedata-*@bColor:Backgroundcolor(correspondingtoa0inthemonochromedata+*@b_olor:Backgroundcolor(correspondingtoa0inthemonochromedata*@rop2:ROPvalue*/-intsm750_hw_imageblit(structlynx_accel*accel,constchar*pSrcbuf,-u32srcDelta,u32startBit,u32dBase,u32dPitch,-u32bytePerPixel,u32dx,u32dy,u32width,-u32height,u32fColor,u32bColor,u32rop2)+intsm750_hw_imageblit(structlynx_accel*accel,constchar*src_buf,+u32src_delta,u32start_bit,u32d_base,u32d_pitch,+u32byte_per_pixel,u32dx,u32dy,u32width,+u32height,u32fColor,u32b_olor,u32rop2){unsignedintulBytesPerScan;unsignedintul4BytesPerScan;
@@ -326,8 +326,8 @@ int sm750_hw_imageblit(struct lynx_accel *accel, const char *pSrcbuf,unsignedcharajRemain[4];inti,j;-startBit&=7;/* Just make sure the start bit is within legal range */-ulBytesPerScan=(width+startBit+7)/8;+start_bit&=7;/* Just make sure the start bit is within legal range */+ulBytesPerScan=(width+start_bit+7)/8;ul4BytesPerScan=ulBytesPerScan&~3;ulBytesRemain=ulBytesPerScan&3;
@@ -396,15 +396,15 @@ int sm750_hw_imageblit(struct lynx_accel *accel, const char *pSrcbuf,for(i=0;i<height;i++){/* For each line, send the data in chunks of 4 bytes */for(j=0;j<(ul4BytesPerScan/4);j++)-write_dpPort(accel,*(unsignedint*)(pSrcbuf+(j*4)));+write_dpPort(accel,*(unsignedint*)(src_buf+(j*4)));if(ulBytesRemain){-memcpy(ajRemain,pSrcbuf+ul4BytesPerScan,+memcpy(ajRemain,src_buf+ul4BytesPerScan,ulBytesRemain);write_dpPort(accel,*(unsignedint*)ajRemain);}-pSrcbuf+=srcDelta;+src_buf+=src_delta;}return0;
Fix "Avoid CamelCase" checkpoint.pl checks for the local variable
nDirection in the function sm750_hw_copyarea.
Signed-off-by: Pavle Rohalj <redacted>
---
drivers/staging/sm750fb/sm750_accel.c | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
@@ -153,9 +153,9 @@ int sm750_hw_copyarea(struct lynx_accel *accel,unsignedintwidth,unsignedintheight,unsignedintrop2){-unsignedintnDirection,de_ctrl;+unsignedintn_direction,de_ctrl;-nDirection=LEFT_TO_RIGHT;+n_direction=LEFT_TO_RIGHT;/* Direction of ROP2 operation: 1 = Left to Right, (-1) = Right to Left */de_ctrl=0;
@@ -173,7 +173,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,*+----------+*/-nDirection=BOTTOM_TO_TOP;+n_direction=BOTTOM_TO_TOP;}elseif(sy>dy){/* +----------+*|D|
@@ -185,7 +185,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,*+----------+*/-nDirection=TOP_TO_BOTTOM;+n_direction=TOP_TO_BOTTOM;}else{/* sy == dy */
Fix "Avoid CamelCase" checkpoint.pl checks for the local variable
deCtrl in the function sm750_hw_fillrect.
Signed-off-by: Pavle Rohalj <redacted>
---
drivers/staging/sm750fb/sm750_accel.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Fix "Avoid CamelCase" checkpoint.pl checks for the local variables
in the function sm750_hw_imageblit.
Signed-off-by: Pavle Rohalj <redacted>
---
drivers/staging/sm750fb/sm750_accel.c | 24 ++++++++++++------------
1 file changed, 12 insertions(+), 12 deletions(-)
@@ -319,17 +319,17 @@ int sm750_hw_imageblit(struct lynx_accel *accel, const char *src_buf,u32byte_per_pixel,u32dx,u32dy,u32width,u32height,u32fColor,u32b_olor,u32rop2){-unsignedintulBytesPerScan;-unsignedintul4BytesPerScan;-unsignedintulBytesRemain;+unsignedintul_bytes_per_scan;+unsignedintul4_bytes_per_scan;+unsignedintul_bytes_remain;unsignedintde_ctrl=0;-unsignedcharajRemain[4];+unsignedcharaj_remain[4];inti,j;start_bit&=7;/* Just make sure the start bit is within legal range */-ulBytesPerScan=(width+start_bit+7)/8;-ul4BytesPerScan=ulBytesPerScan&~3;-ulBytesRemain=ulBytesPerScan&3;+ul_bytes_per_scan=(width+start_bit+7)/8;+ul4_bytes_per_scan=ul_bytes_per_scan&~3;+ul_bytes_remain=ul_bytes_per_scan&3;if(accel->de_wait()!=0)return-1;
@@ -395,13 +395,13 @@ int sm750_hw_imageblit(struct lynx_accel *accel, const char *src_buf,/* Write MONO data (line by line) to 2D Engine data port */for(i=0;i<height;i++){/* For each line, send the data in chunks of 4 bytes */-for(j=0;j<(ul4BytesPerScan/4);j++)+for(j=0;j<(ul4_bytes_per_scan/4);j++)write_dp_port(accel,*(unsignedint*)(src_buf+(j*4)));-if(ulBytesRemain){-memcpy(ajRemain,src_buf+ul4BytesPerScan,-ulBytesRemain);-write_dp_port(accel,*(unsignedint*)ajRemain);+if(ul_bytes_remain){+memcpy(aj_remain,src_buf+ul4_bytes_per_scan,+ul_bytes_remain);+write_dp_port(accel,*(unsignedint*)aj_remain);}src_buf+=src_delta;
@@ -284,7 +284,7 @@ int sm750_hw_copyarea(struct lynx_accel *accel,return0;}-staticunsignedintdeGetTransparency(structlynx_accel*accel)+staticunsignedintde_get_transparency(structlynx_accel*accel){unsignedintde_ctrl;
@@ -390,7 +390,7 @@ int sm750_hw_imageblit(struct lynx_accel *accel, const char *src_buf,DE_CONTROL_ROP_SELECT|DE_CONTROL_COMMAND_HOST_WRITE|DE_CONTROL_HOST|DE_CONTROL_STATUS;-write_dpr(accel,DE_CONTROL,de_ctrl|deGetTransparency(accel));+write_dpr(accel,DE_CONTROL,de_ctrl|de_get_transparency(accel));/* Write MONO data (line by line) to 2D Engine data port */for(i=0;i<height;i++){
Fix "Avoid CamelCase" checkpoint.pl checks for the function parameter
fColor in the function sm750_hw_imageblit.
Signed-off-by: Pavle Rohalj <redacted>
---
drivers/staging/sm750fb/sm750_accel.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
@@ -5,7 +5,7 @@/* hw_cursor_xxx works for voyager,718 and 750 */voidsm750_hw_cursor_enable(structlynx_cursor*cursor);voidsm750_hw_cursor_disable(structlynx_cursor*cursor);-voidsm750_hw_cursor_setSize(structlynx_cursor*cursor,intw,inth);+voidsm750_hw_cursor_set_size(structlynx_cursor*cursor,intw,inth);voidsm750_hw_cursor_setPos(structlynx_cursor*cursor,intx,inty);voidsm750_hw_cursor_setColor(structlynx_cursor*cursor,u32fg,u32bg);voidsm750_hw_cursor_setData(structlynx_cursor*cursor,u16rop,
@@ -247,7 +247,7 @@ int hw_sm750_crtc_checkMode(struct lynxfb_crtc *crtc,}/* set the controller's mode for @crtc charged with @var and @fix parameters */-inthw_sm750_crtc_setMode(structlynxfb_crtc*crtc,+inthw_sm750_crtc_set_mode(structlynxfb_crtc*crtc,structfb_var_screeninfo*var,structfb_fix_screeninfo*fix){
@@ -39,13 +39,13 @@ enum sm750_path {};structinit_status{-ushortpowerMode;+ushortpower_mode;/* below three clocks are in unit of MHZ*/ushortchip_clk;ushortmem_clk;ushortmaster_clk;-ushortsetAllEngOff;-ushortresetMemory;+ushortset_all_eng_off;+ushortreset_memory;};structlynx_accel{
@@ -598,7 +598,7 @@ static int sm750fb_set_drv(struct lynxfb_par *par)crtc->vidmem_size>>=1;/* setup crtc and output member */-sm750_dev->hwCursor=g_hwcursor;+sm750_dev->hw_cursor=g_hwcursor;crtc->line_pad=16;crtc->xpanstep=8;
@@ -615,27 +615,27 @@ static int sm750fb_set_drv(struct lynxfb_par *par)output->paths=sm750_pnc;crtc->channel=sm750_primary;crtc->oScreen=0;-crtc->vScreen=sm750_dev->pvMem;+crtc->vScreen=sm750_dev->mem;pr_info("use simul primary mode\n");break;casesm750_simul_sec:output->paths=sm750_pnc;crtc->channel=sm750_secondary;crtc->oScreen=0;-crtc->vScreen=sm750_dev->pvMem;+crtc->vScreen=sm750_dev->mem;break;casesm750_dual_normal:if(par->index==0){output->paths=sm750_panel;crtc->channel=sm750_primary;crtc->oScreen=0;-crtc->vScreen=sm750_dev->pvMem;+crtc->vScreen=sm750_dev->mem;}else{output->paths=sm750_crt;crtc->channel=sm750_secondary;/* not consider of padding stuffs for oScreen,need fix */crtc->oScreen=sm750_dev->vidmem_size>>1;-crtc->vScreen=sm750_dev->pvMem+crtc->oScreen;+crtc->vScreen=sm750_dev->mem+crtc->oScreen;}break;casesm750_dual_swap:
@@ -643,7 +643,7 @@ static int sm750fb_set_drv(struct lynxfb_par *par)output->paths=sm750_panel;crtc->channel=sm750_secondary;crtc->oScreen=0;-crtc->vScreen=sm750_dev->pvMem;+crtc->vScreen=sm750_dev->mem;}else{output->paths=sm750_crt;crtc->channel=sm750_primary;
@@ -651,7 +651,7 @@ static int sm750fb_set_drv(struct lynxfb_par *par)*needfix*/crtc->oScreen=sm750_dev->vidmem_size>>1;-crtc->vScreen=sm750_dev->pvMem+crtc->oScreen;+crtc->vScreen=sm750_dev->mem+crtc->oScreen;}break;default:
@@ -719,13 +719,13 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)*mustbesetaftercrtcmemberinitialized*/crtc->cursor.offset=crtc->oScreen+crtc->vidmem_size-1024;-crtc->cursor.mmio=sm750_dev->pvReg++crtc->cursor.mmio=sm750_dev->reg+0x800f0+(int)crtc->channel*0x140;pr_info("crtc->cursor.mmio = %p\n",crtc->cursor.mmio);crtc->cursor.max_h=crtc->cursor.max_w=64;crtc->cursor.size=crtc->cursor.max_h*crtc->cursor.max_w*2/8;-crtc->cursor.vstart=sm750_dev->pvMem+crtc->cursor.offset;+crtc->cursor.vstart=sm750_dev->mem+crtc->cursor.offset;memset_io(crtc->cursor.vstart,0,crtc->cursor.size);if(!g_hwcursor){
@@ -870,12 +870,12 @@ static void sm750fb_setup(struct sm750_dev *sm750_dev, char *src)swap=0;-sm750_dev->initParm.chip_clk=0;-sm750_dev->initParm.mem_clk=0;-sm750_dev->initParm.master_clk=0;-sm750_dev->initParm.power_mode=0;-sm750_dev->initParm.set_all_eng_off=0;-sm750_dev->initParm.reset_memory=1;+sm750_dev->init_parm.chip_clk=0;+sm750_dev->init_parm.mem_clk=0;+sm750_dev->init_parm.master_clk=0;+sm750_dev->init_parm.power_mode=0;+sm750_dev->init_parm.set_all_eng_off=0;+sm750_dev->init_parm.reset_memory=1;/* defaultly turn g_hwcursor on for both view */g_hwcursor=3;
@@ -1061,7 +1061,7 @@ static int lynxfb_pci_probe(struct pci_dev *pdev,sm750_dev->mtrr.vram=arch_phys_wc_add(sm750_dev->vidmem_start,sm750_dev->vidmem_size);-memset_io(sm750_dev->pvMem,0,sm750_dev->vidmem_size);+memset_io(sm750_dev->mem,0,sm750_dev->vidmem_size);pci_set_drvdata(pdev,sm750_dev);
@@ -451,7 +451,7 @@ static int __maybe_unused lynxfb_resume(struct device *dev)crtc=&par->crtc;cursor=&crtc->cursor;memset_io(cursor->vstart,0x0,cursor->size);-memset_io(crtc->vScreen,0x0,crtc->vidmem_size);+memset_io(crtc->v_screen,0x0,crtc->vidmem_size);lynxfb_ops_set_par(info);fb_set_suspend(info,0);}
@@ -463,7 +463,7 @@ static int __maybe_unused lynxfb_resume(struct device *dev)crtc=&par->crtc;cursor=&crtc->cursor;memset_io(cursor->vstart,0x0,cursor->size);-memset_io(crtc->vScreen,0x0,crtc->vidmem_size);+memset_io(crtc->v_screen,0x0,crtc->vidmem_size);lynxfb_ops_set_par(info);fb_set_suspend(info,0);}
@@ -614,44 +614,44 @@ static int sm750fb_set_drv(struct lynxfb_par *par)casesm750_simul_pri:output->paths=sm750_pnc;crtc->channel=sm750_primary;-crtc->oScreen=0;-crtc->vScreen=sm750_dev->mem;+crtc->o_screen=0;+crtc->v_screen=sm750_dev->mem;pr_info("use simul primary mode\n");break;casesm750_simul_sec:output->paths=sm750_pnc;crtc->channel=sm750_secondary;-crtc->oScreen=0;-crtc->vScreen=sm750_dev->mem;+crtc->o_screen=0;+crtc->v_screen=sm750_dev->mem;break;casesm750_dual_normal:if(par->index==0){output->paths=sm750_panel;crtc->channel=sm750_primary;-crtc->oScreen=0;-crtc->vScreen=sm750_dev->mem;+crtc->o_screen=0;+crtc->v_screen=sm750_dev->mem;}else{output->paths=sm750_crt;crtc->channel=sm750_secondary;-/* not consider of padding stuffs for oScreen,need fix */-crtc->oScreen=sm750_dev->vidmem_size>>1;-crtc->vScreen=sm750_dev->mem+crtc->oScreen;+/* not consider of padding stuffs for o_screen,need fix */+crtc->o_screen=sm750_dev->vidmem_size>>1;+crtc->v_screen=sm750_dev->mem+crtc->o_screen;}break;casesm750_dual_swap:if(par->index==0){output->paths=sm750_panel;crtc->channel=sm750_secondary;-crtc->oScreen=0;-crtc->vScreen=sm750_dev->mem;+crtc->o_screen=0;+crtc->v_screen=sm750_dev->mem;}else{output->paths=sm750_crt;crtc->channel=sm750_primary;-/* not consider of padding stuffs for oScreen,+/* not consider of padding stuffs for o_screen,*needfix*/-crtc->oScreen=sm750_dev->vidmem_size>>1;-crtc->vScreen=sm750_dev->mem+crtc->oScreen;+crtc->o_screen=sm750_dev->vidmem_size>>1;+crtc->v_screen=sm750_dev->mem+crtc->o_screen;}break;default:
@@ -718,7 +718,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)*setcurrentcursorvariableandprocpointer,*mustbesetaftercrtcmemberinitialized*/-crtc->cursor.offset=crtc->oScreen+crtc->vidmem_size-1024;+crtc->cursor.offset=crtc->o_screen+crtc->vidmem_size-1024;crtc->cursor.mmio=sm750_dev->reg+0x800f0+(int)crtc->channel*0x140;
@@ -801,7 +801,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)crtc->line_pad);info->pseudo_palette=&par->pseudo_palette[0];-info->screen_base=crtc->vScreen;+info->screen_base=crtc->v_screen;pr_debug("screen_base vaddr = %p\n",info->screen_base);info->screen_size=line_length*var->yres_virtual;info->flags=FBINFO_FLAG_DEFAULT|0;
@@ -816,7 +816,7 @@ static int lynxfb_set_fbinfo(struct fb_info *info, int index)strscpy(fix->id,fixId[index],sizeof(fix->id));-fix->smem_start=crtc->oScreen+sm750_dev->vidmem_start;+fix->smem_start=crtc->o_screen+sm750_dev->vidmem_start;pr_info("fix->smem_start = %lx\n",fix->smem_start);/**accordingtommapexperimentfromuserspaceapplication,
@@ -132,10 +132,10 @@ struct lynx_cursor {};structlynxfb_crtc{-unsignedchar__iomem*vCursor;/* virtual address of cursor */-unsignedchar__iomem*vScreen;/* virtual address of on_screen */-intoCursor;/* cursor address offset in vidmem */-intoScreen;/* onscreen address offset in vidmem */+unsignedchar__iomem*v_cursor;/* virtual address of cursor */+unsignedchar__iomem*v_screen;/* virtual address of on_screen */+into_cursor;/* cursor address offset in vidmem */+into_screen;/* onscreen address offset in vidmem */intchannel;/* which channel this crtc stands for*/resource_size_tvidmem_size;/* this view's video memory max size */
@@ -314,7 +314,7 @@ int hw_sm750_crtc_set_mode(struct lynxfb_crtc *crtc,if(crtc->channel!=sm750_secondary){/* set pitch, offset, width, start address, etc... */poke32(PANEL_FB_ADDRESS,-crtc->oScreen&PANEL_FB_ADDRESS_ADDRESS_MASK);+crtc->o_screen&PANEL_FB_ADDRESS_ADDRESS_MASK);reg=var->xres*(var->bits_per_pixel>>3);/*
@@ -350,7 +350,7 @@ int hw_sm750_crtc_set_mode(struct lynxfb_crtc *crtc,poke32(PANEL_DISPLAY_CTRL,reg|(var->bits_per_pixel>>4));}else{/* not implemented now */-poke32(CRT_FB_ADDRESS,crtc->oScreen);+poke32(CRT_FB_ADDRESS,crtc->o_screen);reg=var->xres*(var->bits_per_pixel>>3);/**crtc->channelisnotequaltopar->indexonnumeric,
@@ -554,7 +554,7 @@ int hw_sm750_pan_display(struct lynxfb_crtc *crtc,total=var->yoffset*info->fix.line_length+((var->xoffset*var->bits_per_pixel)>>3);-total+=crtc->oScreen;+total+=crtc->o_screen;if(crtc->channel==sm750_primary){poke32(PANEL_FB_ADDRESS,peek32(PANEL_FB_ADDRESS)|
@@ -382,7 +382,7 @@ int hw_sm750_set_col_reg(struct lynxfb_crtc *crtc, ushort index,return0;}-inthw_sm750le_setBLANK(structlynxfb_output*output,intblank)+inthw_sm750le_set_blank(structlynxfb_output*output,intblank){intdpms,crtdb;
@@ -423,7 +423,7 @@ int hw_sm750le_setBLANK(struct lynxfb_output *output, int blank)return0;}-inthw_sm750_setBLANK(structlynxfb_output*output,intblank)+inthw_sm750_set_blank(structlynxfb_output*output,intblank){unsignedintdpms,pps,crtdb;
@@ -476,7 +476,7 @@ int hw_sm750_set_blank(struct lynxfb_output *output, int blank)return0;}-voidhw_sm750_initAccel(structsm750_dev*sm750_dev)+voidhw_sm750_init_accel(structsm750_dev*sm750_dev){u32reg;
@@ -545,7 +545,7 @@ static int lynxfb_ops_setcolreg(unsigned int regno,red>>=8;green>>=8;blue>>=8;-ret=hw_sm750_setColReg(crtc,regno,red,green,blue);+ret=hw_sm750_set_col_reg(crtc,regno,red,green,blue);gotoexit;}
@@ -50,9 +50,9 @@ struct init_status {structlynx_accel{/* base virtual address of DPR registers */-volatileunsignedchar__iomem*dprBase;+volatileunsignedchar__iomem*dpr_base;/* base virtual address of de data port */-volatileunsignedchar__iomem*dpPortBase;+volatileunsignedchar__iomem*dp_port_base;/* function pointers */void(*de_init)(structlynx_accel*accel);
On Wed, Apr 07, 2021 at 09:08:07AM +0200, Greg KH wrote:
On Tue, Apr 06, 2021 at 11:35:54PM -0700, Pavle Rohalj wrote:
quoted
Changes in v2:
- Removed type information from variable names
- Broken up the changes into smaller patches
Your subject is very odd :(
Sorry about that, I overlooked the fact that I reran format-patch. The
subject should be:
[PATCH] staging: sm750fb: Convert camel case to snake case
Should I resubmit?
-Pavle
On Wed, Apr 07, 2021 at 12:15:22AM -0700, Pavle Rohalj wrote:
On Wed, Apr 07, 2021 at 09:08:07AM +0200, Greg KH wrote:
quoted
On Tue, Apr 06, 2021 at 11:35:54PM -0700, Pavle Rohalj wrote:
quoted
Changes in v2:
- Removed type information from variable names
- Broken up the changes into smaller patches
Your subject is very odd :(
Sorry about that, I overlooked the fact that I reran format-patch. The
subject should be:
[PATCH] staging: sm750fb: Convert camel case to snake case
Should I resubmit?
Not yet, let me review these first, I think they might need some work...
And the build does not break with this change? If so, then why are
these here at all?
thanks,
greg k-h
I do not think so, I was able to build and load the driver with these
changes. It looks like this enum is used as a type of the state parameter of
ddk750_set_dpms function, but the three defined constants are never referenced.
Should we get rid of dpms enum and change the type of the parameter to an unsigned integer?
-Pavle
@@ -27,16 +27,16 @@ typedef void (*PFN_DVICTRL_CLEARINTERRUPT)(void);/* Structure to hold all the function pointer to the DVI Controller. */structdvi_ctrl_device{-PFN_DVICTRL_INITpfnInit;-PFN_DVICTRL_RESETCHIPpfnResetChip;-PFN_DVICTRL_GETCHIPSTRINGpfnGetChipString;-PFN_DVICTRL_GETVENDORIDpfnGetVendorId;-PFN_DVICTRL_GETDEVICEIDpfnGetDeviceId;-PFN_DVICTRL_SETPOWERpfnSetPower;-PFN_DVICTRL_HOTPLUGDETECTIONpfnEnableHotPlugDetection;-PFN_DVICTRL_ISCONNECTEDpfnIsConnected;-PFN_DVICTRL_CHECKINTERRUPTpfnCheckInterrupt;-PFN_DVICTRL_CLEARINTERRUPTpfnClearInterrupt;+PFN_DVICTRL_INITpfn_init;
"pfn_" means "pointer to a function" which is not needed at all. Just
make this be "init".
And the whole crazy "PFN_DVICTRL_INIT" also is not needed, just put the
real function prototype in here so that we don't have to unwind the mess
to look it up.
So, this line would look like:
void (*init)(void);
Much smaller, more obvious, matches the kernel coding style, and is way
easier to understand exactly what is happening here.
Typedefs can be used to hide complexity, but here they are just adding
it, for no good reason at all.
I appreciate long patch series being sent out, but maybe make them
smaller so you do not have to redo 49 patches because you are asked to
make a change on the very first patch like here. Perhaps stick to 20
max for a bit until you get the process down and understand more about
what the kernel programming style is?
thanks,
greg k-h
On Wed, Apr 07, 2021 at 09:32:29AM +0200, Greg KH wrote:
On Wed, Apr 07, 2021 at 12:15:22AM -0700, Pavle Rohalj wrote:
quoted
On Wed, Apr 07, 2021 at 09:08:07AM +0200, Greg KH wrote:
quoted
On Tue, Apr 06, 2021 at 11:35:54PM -0700, Pavle Rohalj wrote:
quoted
Changes in v2:
- Removed type information from variable names
- Broken up the changes into smaller patches
Your subject is very odd :(
Sorry about that, I overlooked the fact that I reran format-patch. The
subject should be:
[PATCH] staging: sm750fb: Convert camel case to snake case
Should I resubmit?
Not yet, let me review these first, I think they might need some work...
Ok, now you can fix them up, I stopped after reviewing patch 02/49,
these need some work.
thanks,
greg k-h
And the build does not break with this change? If so, then why are
these here at all?
thanks,
greg k-h
I do not think so, I was able to build and load the driver with these
changes. It looks like this enum is used as a type of the state parameter of
ddk750_set_dpms function, but the three defined constants are never referenced.
Should we get rid of dpms enum and change the type of the parameter to an unsigned integer?
If the enum is used, but the names are not used, that's not good and
should be fixed up.
thanks,
greg k-h
@@ -27,16 +27,16 @@ typedef void (*PFN_DVICTRL_CLEARINTERRUPT)(void);/* Structure to hold all the function pointer to the DVI Controller. */structdvi_ctrl_device{-PFN_DVICTRL_INITpfnInit;-PFN_DVICTRL_RESETCHIPpfnResetChip;-PFN_DVICTRL_GETCHIPSTRINGpfnGetChipString;-PFN_DVICTRL_GETVENDORIDpfnGetVendorId;-PFN_DVICTRL_GETDEVICEIDpfnGetDeviceId;-PFN_DVICTRL_SETPOWERpfnSetPower;-PFN_DVICTRL_HOTPLUGDETECTIONpfnEnableHotPlugDetection;-PFN_DVICTRL_ISCONNECTEDpfnIsConnected;-PFN_DVICTRL_CHECKINTERRUPTpfnCheckInterrupt;-PFN_DVICTRL_CLEARINTERRUPTpfnClearInterrupt;+PFN_DVICTRL_INITpfn_init;
"pfn_" means "pointer to a function" which is not needed at all. Just
make this be "init".
I changed that in one of the next few patches, but now I realize I should have
combined the two changes.
And the whole crazy "PFN_DVICTRL_INIT" also is not needed, just put the
real function prototype in here so that we don't have to unwind the mess
to look it up.
So, this line would look like:
void (*init)(void);
Much smaller, more obvious, matches the kernel coding style, and is way
easier to understand exactly what is happening here.
Typedefs can be used to hide complexity, but here they are just adding
it, for no good reason at all.
I appreciate long patch series being sent out, but maybe make them
smaller so you do not have to redo 49 patches because you are asked to
make a change on the very first patch like here. Perhaps stick to 20
max for a bit until you get the process down and understand more about
what the kernel programming style is?
thanks,
greg k-h
Sounds good. Thank you for the feedback. I will work more on this.
-Pavle
On Wed, Apr 07, 2021 at 10:32:53AM +0200, Greg KH wrote:
On Wed, Apr 07, 2021 at 09:32:29AM +0200, Greg KH wrote:
quoted
On Wed, Apr 07, 2021 at 12:15:22AM -0700, Pavle Rohalj wrote:
quoted
On Wed, Apr 07, 2021 at 09:08:07AM +0200, Greg KH wrote:
quoted
On Tue, Apr 06, 2021 at 11:35:54PM -0700, Pavle Rohalj wrote:
quoted
Changes in v2:
- Removed type information from variable names
- Broken up the changes into smaller patches
Your subject is very odd :(
Sorry about that, I overlooked the fact that I reran format-patch. The
subject should be:
[PATCH] staging: sm750fb: Convert camel case to snake case
Should I resubmit?
Not yet, let me review these first, I think they might need some work...
Ok, now you can fix them up, I stopped after reviewing patch 02/49,
these need some work.
thanks,
greg k-h
The fact that you were able to change this without changing any callers
suggests that this is not used. In that case, just delete it instead
of renaming it.
regards,
dan carpenter
This should just be "mode" to match the function.
Anyway, I just realized now that I'm somehow reviewing ancient patches
so I'm going to stop.
regards,
dan carpenter