Re: [PATCH] staging: sm750fb: fix CamelCase naming style

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Mar 16, 2022 at 11:32:28AM +0000, Nam Cao wrote:
> Fix CamelCase names defined in ddk750_dvi.c and ddk750_dvi.h, as
> reported by checkpatch.pl.
> 
> Signed-off-by: Nam Cao <cvn249@xxxxxxxxx>
> ---
>  drivers/staging/sm750fb/ddk750_dvi.c | 50 +++++++++++-----------
>  drivers/staging/sm750fb/ddk750_dvi.h | 64 ++++++++++++++--------------
>  2 files changed, 57 insertions(+), 57 deletions(-)
> 
> diff --git a/drivers/staging/sm750fb/ddk750_dvi.c b/drivers/staging/sm750fb/ddk750_dvi.c
> index cd564ea40779..48f40dcc5ffd 100644
> --- a/drivers/staging/sm750fb/ddk750_dvi.c
> +++ b/drivers/staging/sm750fb/ddk750_dvi.c
> @@ -11,41 +11,41 @@
>   * function API. Please set the function pointer to NULL whenever the function
>   * is not supported.
>   */
> -static struct dvi_ctrl_device g_dcftSupportedDviController[] = {
> +static struct dvi_ctrl_device g_dcft_supported_dvi_controller[] = {
>  #ifdef DVI_CTRL_SII164
>  	{
> -		.pfnInit = sii164InitChip,
> -		.pfnGetVendorId = sii164GetVendorID,
> -		.pfnGetDeviceId = sii164GetDeviceID,
> +		.pfn_init = sii164InitChip,
> +		.pfn_get_vendor_id = sii164GetVendorID,
> +		.pfn_get_device_id = sii164GetDeviceID,
>  #ifdef SII164_FULL_FUNCTIONS
> -		.pfnResetChip = sii164ResetChip,
> -		.pfnGetChipString = sii164GetChipString,
> -		.pfnSetPower = sii164SetPower,
> -		.pfnEnableHotPlugDetection = sii164EnableHotPlugDetection,
> -		.pfnIsConnected = sii164IsConnected,
> -		.pfnCheckInterrupt = sii164CheckInterrupt,
> -		.pfnClearInterrupt = sii164ClearInterrupt,
> +		.pfn_reset_chip = sii164ResetChip,
> +		.pfn_get_chip_string = sii164GetChipString,
> +		.pfn_set_power = sii164SetPower,
> +		.pfn_enable_hot_plug_detection = sii164EnableHotPlugDetection,
> +		.pfn_is_connected = sii164IsConnected,
> +		.pfn_check_interrupt = sii164CheckInterrupt,
> +		.pfn_clear_interrupt = sii164ClearInterrupt,
>  #endif
>  	},
>  #endif
>  };
>  
> -int dviInit(unsigned char edge_select,
> -	    unsigned char bus_select,
> -	    unsigned char dual_edge_clk_select,
> -	    unsigned char hsync_enable,
> -	    unsigned char vsync_enable,
> -	    unsigned char deskew_enable,
> -	    unsigned char deskew_setting,
> -	    unsigned char continuous_sync_enable,
> -	    unsigned char pll_filter_enable,
> -	    unsigned char pll_filter_value)
> +int dvi_init(unsigned char edge_select,
> +	     unsigned char bus_select,
> +	     unsigned char dual_edge_clk_select,
> +	     unsigned char hsync_enable,
> +	     unsigned char vsync_enable,
> +	     unsigned char deskew_enable,
> +	     unsigned char deskew_setting,
> +	     unsigned char continuous_sync_enable,
> +	     unsigned char pll_filter_enable,
> +	     unsigned char pll_filter_value)
>  {
> -	struct dvi_ctrl_device *pCurrentDviCtrl;
> +	struct dvi_ctrl_device *p_current_dvi_ctrl;
>  
> -	pCurrentDviCtrl = g_dcftSupportedDviController;
> -	if (pCurrentDviCtrl->pfnInit) {
> -		return pCurrentDviCtrl->pfnInit(edge_select,
> +	p_current_dvi_ctrl = g_dcft_supported_dvi_controller;
> +	if (p_current_dvi_ctrl->pfn_init) {
> +		return p_current_dvi_ctrl->pfn_init(edge_select,
>  						bus_select,
>  						dual_edge_clk_select,
>  						hsync_enable,
> diff --git a/drivers/staging/sm750fb/ddk750_dvi.h b/drivers/staging/sm750fb/ddk750_dvi.h
> index 1c7a565b617a..ab00f8621375 100644
> --- a/drivers/staging/sm750fb/ddk750_dvi.h
> +++ b/drivers/staging/sm750fb/ddk750_dvi.h
> @@ -4,54 +4,54 @@
>  
>  /* dvi chip stuffs structros */
>  
> -typedef long (*PFN_DVICTRL_INIT)(unsigned char edgeSelect,
> -				 unsigned char busSelect,
> -				 unsigned char dualEdgeClkSelect,
> -				 unsigned char hsyncEnable,
> -				 unsigned char vsyncEnable,
> -				 unsigned char deskewEnable,
> -				 unsigned char deskewSetting,
> -				 unsigned char continuousSyncEnable,
> -				 unsigned char pllFilterEnable,
> -				 unsigned char pllFilterValue);
> +typedef long (*PFN_DVICTRL_INIT)(unsigned char edge_select,
> +				 unsigned char bus_select,
> +				 unsigned char dual_edge_clk_select,
> +				 unsigned char hsync_enable,
> +				 unsigned char vsync_enable,
> +				 unsigned char deskew_enable,
> +				 unsigned char deskew_eetting,
> +				 unsigned char continuous_sync_enable,
> +				 unsigned char pll_filter_enable,
> +				 unsigned char pll_filter_value);
>  
>  typedef void (*PFN_DVICTRL_RESETCHIP)(void);
>  typedef char* (*PFN_DVICTRL_GETCHIPSTRING)(void);
>  typedef unsigned short (*PFN_DVICTRL_GETVENDORID)(void);
>  typedef unsigned short (*PFN_DVICTRL_GETDEVICEID)(void);
> -typedef void (*PFN_DVICTRL_SETPOWER)(unsigned char powerUp);
> -typedef void (*PFN_DVICTRL_HOTPLUGDETECTION)(unsigned char enableHotPlug);
> +typedef void (*PFN_DVICTRL_SETPOWER)(unsigned char power_up);
> +typedef void (*PFN_DVICTRL_HOTPLUGDETECTION)(unsigned char enable_hot_plug);
>  typedef unsigned char (*PFN_DVICTRL_ISCONNECTED)(void);
>  typedef unsigned char (*PFN_DVICTRL_CHECKINTERRUPT)(void);
>  typedef void (*PFN_DVICTRL_CLEARINTERRUPT)(void);
>  
>  /* Structure to hold all the function pointer to the DVI Controller. */
>  struct dvi_ctrl_device {
> -	PFN_DVICTRL_INIT		pfnInit;
> -	PFN_DVICTRL_RESETCHIP		pfnResetChip;
> -	PFN_DVICTRL_GETCHIPSTRING	pfnGetChipString;
> -	PFN_DVICTRL_GETVENDORID		pfnGetVendorId;
> -	PFN_DVICTRL_GETDEVICEID		pfnGetDeviceId;
> -	PFN_DVICTRL_SETPOWER		pfnSetPower;
> -	PFN_DVICTRL_HOTPLUGDETECTION	pfnEnableHotPlugDetection;
> -	PFN_DVICTRL_ISCONNECTED		pfnIsConnected;
> -	PFN_DVICTRL_CHECKINTERRUPT	pfnCheckInterrupt;
> -	PFN_DVICTRL_CLEARINTERRUPT	pfnClearInterrupt;
> +	PFN_DVICTRL_INIT		pfn_init;
> +	PFN_DVICTRL_RESETCHIP		pfn_reset_chip;
> +	PFN_DVICTRL_GETCHIPSTRING	pfn_get_chip_string;
> +	PFN_DVICTRL_GETVENDORID		pfn_get_vendor_id;
> +	PFN_DVICTRL_GETDEVICEID		pfn_get_device_id;
> +	PFN_DVICTRL_SETPOWER		pfn_set_power;
> +	PFN_DVICTRL_HOTPLUGDETECTION	pfn_enable_hot_plug_detection;
> +	PFN_DVICTRL_ISCONNECTED		pfn_is_connected;
> +	PFN_DVICTRL_CHECKINTERRUPT	pfn_check_interrupt;
> +	PFN_DVICTRL_CLEARINTERRUPT	pfn_clear_interrupt;

Why are you keeping "pfn_"?  You do not need to say that this is a
"pointer to a function" anymore, right?

thanks,

greg k-h




[Index of Archives]     [Linux Driver Development]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux