staging: sm750fb: convert CamelCase function names to snake_case
cover staging: sm750fb: convert CamelCase function names to snake_case
This patch cleans up the staging driver sm750fb by converting function names that are currently in CamelCase to the preferred snake_case style, following Linux kernel coding guidelines.
Specifically, it renames the following functions for consistency and readability:
- sii164GetDeviceID -> sii164_get_device_id
- sii164ResetChip -> sii164_reset_chip
- sii164GetChipString -> sii164_get_chip_string
- sii164SetPower -> sii164_set_power
- sii164EnableHotPlugDetection -> sii164_enable_hot_plug_detection
- sii164IsConnected -> sii164_is_connected
- sii164CheckInterrupt -> sii164_check_interrupt
- sii164ClearInterrupt -> sii164_clear_interrupt
This helps maintain uniformity with the rest of the kernel codebase and improves maintainability.
cover staging: sm750fb: convert CamelCase function names to snake_case
From: Khalid Faisal <[email protected]>
This patch updates various function names in the sm750fb driver to follow the Linux kernel coding style by converting CamelCase names to snake_case.
These changes were identified using checkpatch.pl, which recommends using snake_case for function and variable names.
This patch is part of the Kernel Janitors cleanup effort.
Signature · 1 line
Khalid Faisal
PATCH 1/1 staging: sm750fb: convert CamelCase function names to snake_case
In reply to [email protected]From: Khalid Faisal <[email protected]>
This patch converts function names in the sm750fb driver from CamelCase to snake_case to comply with Linux kernel coding style.
No functional changes.
--- drivers/staging/sm750fb/ddk750_dvi.c | 16 +++++------ drivers/staging/sm750fb/ddk750_sii164.c | 38 ++++++++++++------------- drivers/staging/sm750fb/ddk750_sii164.h | 16 +++++------ 3 files changed, 35 insertions(+), 35 deletions(-)
drivers/staging/sm750fb/ddk750_dvi.c +8 -8
@@ -16,15 +16,15 @@ static struct dvi_ctrl_device dcft_supported_dvi_controller[] = { { .init = sii164_init_chip, .get_vendor_id = sii164_get_vendor_id, - .get_device_id = sii164GetDeviceID, + .get_device_id = sii164_get_device_id, #ifdef SII164_FULL_FUNCTIONS - .reset_chip = sii164ResetChip, - .get_chip_string = sii164GetChipString, - .set_power = sii164SetPower, - .enable_hot_plug_detection = sii164EnableHotPlugDetection, - .is_connected = sii164IsConnected, - .check_interrupt = sii164CheckInterrupt, - .clear_interrupt = sii164ClearInterrupt, + .reset_chip = sii164_reset_chip, + .get_chip_string = sii164_get_chip_string, + .set_power = sii164_set_power, + .enable_hot_plug_detection = sii164_enable_hot_plug_detection, + .is_connected = sii164_is_connected, + .check_interrupt = sii164_check_interrupt, + .clear_interrupt = sii164_clear_interrupt, #endif }, #endif
drivers/staging/sm750fb/ddk750_sii164.c +19 -19
@@ -48,13 +48,13 @@ unsigned short sii164_get_vendor_id(void) }/* -* sii164GetDeviceID +* sii164_get_device_id * This function gets the device ID of the DVI controller chip. * * Output: * Device ID */ -unsigned short sii164GetDeviceID (void ) +unsigned short sii164_get_device_id (void ) {unsigned short deviceID;
@@ -141,7 +141,7 @@ long sii164_init_chip(unsigned char edge_select,/* Check if SII164 Chip exists */ if ((sii164_get_vendor_id () ==SII164_VENDOR_ID ) && - (sii164GetDeviceID () ==SII164_DEVICE_ID )) { + (sii164_get_device_id () ==SII164_DEVICE_ID )) {/* * Initialize SII164 controller chip. */
@@ -250,36 +250,36 @@ long sii164_init_chip(unsigned char edge_select,#ifdef SII164_FULL_FUNCTIONS /* -* sii164ResetChip +* sii164_reset_chip * This function resets the DVI Controller Chip. */ -void sii164ResetChip (void ) +void sii164_reset_chip (void ) {/* Power down */ -sii164SetPower (0 ); -sii164SetPower (1 ); +sii164_set_power (0 ); +sii164_set_power (1 ); }/* -* sii164GetChipString +* sii164_get_chip_string * This function returns a char string name of the current DVI Controller * chip. * * It's convenient for application need to display the chip name. */ -char *sii164GetChipString (void ) +char *sii164_get_chip_string (void ) {return gDviCtrlChipName; }/* -* sii164SetPower +* sii164_set_power * This function sets the power configuration of the DVI Controller Chip. * * Input: * powerUp - Flag to set the power down or up */ -void sii164SetPower (unsigned char powerUp) +void sii164_set_power (unsigned char powerUp) {unsigned char config;
@@ -329,12 +329,12 @@ void sii164SelectHotPlugDetectionMode(enum sii164_hot_plug_mode hotPlugMode) }/* -* sii164EnableHotPlugDetection +* sii164_enable_hot_plug_detection * This function enables the Hot Plug detection. * * enableHotPlug - Enable (=1) / disable (=0) Hot Plug detection */ -void sii164EnableHotPlugDetection (unsigned char enableHotPlug) +void sii164_enable_hot_plug_detection (unsigned char enableHotPlug) {unsigned char detectReg;
@@ -350,14 +350,14 @@ void sii164EnableHotPlugDetection(unsigned char enableHotPlug) }/* -* sii164IsConnected +* sii164_is_connected * Check if the DVI Monitor is connected. * * Output: * 0 - Not Connected * 1 - Connected */ -unsigned char sii164IsConnected (void ) +unsigned char sii164_is_connected (void ) {unsigned char hotPlugValue;
@@ -370,14 +370,14 @@ unsigned char sii164IsConnected(void) }/* -* sii164CheckInterrupt +* sii164_check_interrupt * Checks if interrupt has occurred. * * Output: * 0 - No interrupt * 1 - Interrupt occurs */ -unsigned char sii164CheckInterrupt (void ) +unsigned char sii164_check_interrupt (void ) {unsigned char detectReg;
@@ -390,10 +390,10 @@ unsigned char sii164CheckInterrupt(void) }/* -* sii164ClearInterrupt +* sii164_clear_interrupt * Clear the hot plug interrupt. */ -void sii164ClearInterrupt (void ) +void sii164_clear_interrupt (void ) {unsigned char detectReg;
drivers/staging/sm750fb/ddk750_sii164.h +8 -8
@@ -28,16 +28,16 @@ long sii164_init_chip(unsigned char edgeSelect, unsigned char pllFilterValue);unsigned short sii164_get_vendor_id (void ); -unsigned short sii164GetDeviceID (void ); +unsigned short sii164_get_device_id (void );#ifdef SII164_FULL_FUNCTIONS -void sii164ResetChip (void ); -char *sii164GetChipString (void ); -void sii164SetPower (unsigned char powerUp); -void sii164EnableHotPlugDetection (unsigned char enableHotPlug); -unsigned char sii164IsConnected (void ); -unsigned char sii164CheckInterrupt (void ); -void sii164ClearInterrupt (void ); +void sii164_reset_chip (void ); +char *sii164_get_chip_string (void ); +void sii164_set_power (unsigned char powerUp); +void sii164_enable_hot_plug_detection (unsigned char enableHotPlug); +unsigned char sii164_is_connected (void ); +unsigned char sii164_check_interrupt (void ); +void sii164_clear_interrupt (void );#endif /* * below register definition is used for
Signature · 1 line
2.43.0
Greg KH
maintainerQuoted 5 lines · On Sun, Jun 01, 2025 at 02:41:03AM +0530, [email protected] wrote:
From: Khalid Faisal <[email protected]>
This patch converts function names in the sm750fb driver from CamelCase to
snake_caseto comply with Linux kernel coding style.
Quoted 8 lines
No functional changes.
Signed-off-by Khalid Faisal <[email protected]>--- drivers/staging/sm750fb/ddk750_dvi.c | 16 +++++------ drivers/staging/sm750fb/ddk750_sii164.c | 38 ++++++++++++------------- drivers/staging/sm750fb/ddk750_sii164.h | 16 +++++------ 3 files changed, 35 insertions(+), 35 deletions(-)
Are you sure this file is still in the tree? I don't see it anymore :(