All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/4] Edit CamelCase in sm750fb dvi and sii164 files
@ 2019-10-16 21:20 Jamal Shareef
  2019-10-16 21:20 ` [PATCH 1/4] staging: sm750fb: Edit CamelCase in ddk750_dvi.c Jamal Shareef
                   ` (3 more replies)
  0 siblings, 4 replies; 11+ messages in thread
From: Jamal Shareef @ 2019-10-16 21:20 UTC (permalink / raw)
  To: boqun.feng, andrea.parri
  Cc: sudipm.mukherjee, teddy.wang, gregkh, outreachy-kernel, jamal.k.shareef

This patchset edits CamelCase naming in a group of dependant
sm750fb files.

Jamal Shareef (4):
  staging: sm750fb: Edit CamelCase in ddk750_dvi.c
  staging: sm750fb: Edit CamelCase in ddk750_dvi.h
  staging: sm750fb: Edit CamelCase in ddk750_sii164.c
  staging: sm750fb: Edit CamelCase in ddk750_sii164.h

 drivers/staging/sm750fb/ddk750_dvi.c    |  68 ++++-----
 drivers/staging/sm750fb/ddk750_dvi.h    |  64 ++++----
 drivers/staging/sm750fb/ddk750_sii164.c | 185 ++++++++++++------------
 drivers/staging/sm750fb/ddk750_sii164.h |  40 ++---
 4 files changed, 179 insertions(+), 178 deletions(-)

-- 
2.17.1



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

* [PATCH 1/4] staging: sm750fb: Edit CamelCase in ddk750_dvi.c
  2019-10-16 21:20 [PATCH 0/4] Edit CamelCase in sm750fb dvi and sii164 files Jamal Shareef
@ 2019-10-16 21:20 ` Jamal Shareef
  2019-10-16 21:30   ` [Outreachy kernel] " Julia Lawall
  2019-10-16 21:35   ` Greg KH
  2019-10-16 21:20 ` [PATCH 2/4] staging: sm750fb: Edit CamelCase in ddk750_dvi.h Jamal Shareef
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 11+ messages in thread
From: Jamal Shareef @ 2019-10-16 21:20 UTC (permalink / raw)
  To: boqun.feng, andrea.parri
  Cc: sudipm.mukherjee, teddy.wang, gregkh, outreachy-kernel, jamal.k.shareef

Edit CamelCase naming convention in ddk750_dvi.c file.
Issue found by checkpatch.

Edit depends on related files which are also being patched
as part of the patchset.

Signed-off-by: Jamal Shareef <jamal.k.shareef@gmail.com>
---
 drivers/staging/sm750fb/ddk750_dvi.c | 68 ++++++++++++++--------------
 1 file changed, 34 insertions(+), 34 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_dvi.c b/drivers/staging/sm750fb/ddk750_dvi.c
index cd564ea40779..6fa77d4effef 100644
--- a/drivers/staging/sm750fb/ddk750_dvi.c
+++ b/drivers/staging/sm750fb/ddk750_dvi.c
@@ -11,50 +11,50 @@
  * 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 = sii164_init_chip,
+	    .pfn_get_vendor_id = sii164_get_vendor_id,
+	    .pfn_get_device_id = sii164_get_device_id,
 #ifdef SII164_FULL_FUNCTIONS
-		.pfnResetChip = sii164ResetChip,
-		.pfnGetChipString = sii164GetChipString,
-		.pfnSetPower = sii164SetPower,
-		.pfnEnableHotPlugDetection = sii164EnableHotPlugDetection,
-		.pfnIsConnected = sii164IsConnected,
-		.pfnCheckInterrupt = sii164CheckInterrupt,
-		.pfnClearInterrupt = sii164ClearInterrupt,
+	    .pfn_reset_chip = sii164_reset_chip,
+	    .pfn_get_chip_string = sii164_get_chip_string,
+	    .pfn_set_power = sii164_set_power,
+	    .pfn_enable_hot_plug_detection = sii164_enable_hot_plug_detection,
+	    .pfn_is_connected = sii164_is_connected,
+	    .pfn_check_interrupt = sii164_check_interrupt,
+	    .pfn_clear_interrupt = sii164_clear_interrupt,
 #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,
-						bus_select,
-						dual_edge_clk_select,
-						hsync_enable,
-						vsync_enable,
-						deskew_enable,
-						deskew_setting,
-						continuous_sync_enable,
-						pll_filter_enable,
-						pll_filter_value);
+	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,
+						    vsync_enable,
+						    deskew_enable,
+						    deskew_setting,
+						    continuous_sync_enable,
+						    pll_filter_enable,
+						    pll_filter_value);
 	}
 	return -1; /* error */
 }
-- 
2.17.1



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

* [PATCH 2/4] staging: sm750fb: Edit CamelCase in ddk750_dvi.h
  2019-10-16 21:20 [PATCH 0/4] Edit CamelCase in sm750fb dvi and sii164 files Jamal Shareef
  2019-10-16 21:20 ` [PATCH 1/4] staging: sm750fb: Edit CamelCase in ddk750_dvi.c Jamal Shareef
@ 2019-10-16 21:20 ` Jamal Shareef
  2019-10-16 21:20 ` [PATCH 3/4] staging: sm750fb: Edit CamelCase in ddk750_sii164.c Jamal Shareef
  2019-10-16 21:20 ` [PATCH 4/4] staging: sm750fb: Edit CamelCase in ddk750_sii164.h Jamal Shareef
  3 siblings, 0 replies; 11+ messages in thread
From: Jamal Shareef @ 2019-10-16 21:20 UTC (permalink / raw)
  To: boqun.feng, andrea.parri
  Cc: sudipm.mukherjee, teddy.wang, gregkh, outreachy-kernel, jamal.k.shareef

Edit CamelCase naming in ddk750_dvi.h file.
Issue found by checkpatch.

Edit depends on related files which are also being patched
as part of the patchset.

Signed-off-by: Jamal Shareef <jamal.k.shareef@gmail.com>
---
 drivers/staging/sm750fb/ddk750_dvi.h | 64 ++++++++++++++--------------
 1 file changed, 32 insertions(+), 32 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_dvi.h b/drivers/staging/sm750fb/ddk750_dvi.h
index 1c7a565b617a..d3ea365d1509 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_setting,
+				 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;
 };
 
 #define DVI_CTRL_SII164
 
 /* dvi functions prototype */
-int dviInit(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);
+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);
 
 #endif
 
-- 
2.17.1



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

* [PATCH 3/4] staging: sm750fb: Edit CamelCase in ddk750_sii164.c
  2019-10-16 21:20 [PATCH 0/4] Edit CamelCase in sm750fb dvi and sii164 files Jamal Shareef
  2019-10-16 21:20 ` [PATCH 1/4] staging: sm750fb: Edit CamelCase in ddk750_dvi.c Jamal Shareef
  2019-10-16 21:20 ` [PATCH 2/4] staging: sm750fb: Edit CamelCase in ddk750_dvi.h Jamal Shareef
@ 2019-10-16 21:20 ` Jamal Shareef
  2019-10-16 21:20 ` [PATCH 4/4] staging: sm750fb: Edit CamelCase in ddk750_sii164.h Jamal Shareef
  3 siblings, 0 replies; 11+ messages in thread
From: Jamal Shareef @ 2019-10-16 21:20 UTC (permalink / raw)
  To: boqun.feng, andrea.parri
  Cc: sudipm.mukherjee, teddy.wang, gregkh, outreachy-kernel, jamal.k.shareef

Edit CamelCase naming in ddk750_sii164.c file.
Issue found by checkpatch.

Edit depends on related files which are also being patched
as part of the patchset.

Signed-off-by: Jamal Shareef <jamal.k.shareef@gmail.com>
---
 drivers/staging/sm750fb/ddk750_sii164.c | 185 ++++++++++++------------
 1 file changed, 93 insertions(+), 92 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_sii164.c b/drivers/staging/sm750fb/ddk750_sii164.c
index bee58edc84e7..b3898e84e688 100644
--- a/drivers/staging/sm750fb/ddk750_sii164.c
+++ b/drivers/staging/sm750fb/ddk750_sii164.c
@@ -12,11 +12,11 @@
 #define USE_HW_I2C
 
 #ifdef USE_HW_I2C
-    #define i2cWriteReg sm750_hw_i2c_write_reg
-    #define i2cReadReg  sm750_hw_i2c_read_reg
+    #define i2c_write_reg sm750_hw_i2c_write_reg
+    #define i2c_read_reg  sm750_hw_i2c_read_reg
 #else
-    #define i2cWriteReg sm750_sw_i2c_write_reg
-    #define i2cReadReg  sm750_sw_i2c_read_reg
+    #define i2c_write_reg sm750_sw_i2c_write_reg
+    #define i2c_read_reg  sm750_sw_i2c_read_reg
 #endif
 
 /* SII164 Vendor and Device ID */
@@ -25,45 +25,45 @@
 
 #ifdef SII164_FULL_FUNCTIONS
 /* Name of the DVI Controller chip */
-static char *gDviCtrlChipName = "Silicon Image SiI 164";
+static char *g_dvi_ctrl_chip_name = "Silicon Image SiI 164";
 #endif
 
 /*
- *  sii164GetVendorID
+ *  sii164_get_vendor_id
  *      This function gets the vendor ID of the DVI controller chip.
  *
  *  Output:
  *      Vendor ID
  */
-unsigned short sii164GetVendorID(void)
+unsigned short sii164_get_vendor_id(void)
 {
-	unsigned short vendorID;
+	unsigned short vendor_id;
 
-	vendorID = ((unsigned short)i2cReadReg(SII164_I2C_ADDRESS,
-					       SII164_VENDOR_ID_HIGH) << 8) |
-		   (unsigned short)i2cReadReg(SII164_I2C_ADDRESS,
-					      SII164_VENDOR_ID_LOW);
+	vendor_id = ((unsigned short)i2c_read_reg(SII164_I2C_ADDRESS,
+						 SII164_VENDOR_ID_HIGH) << 8) |
+		    (unsigned short)i2c_read_reg(SII164_I2C_ADDRESS,
+						SII164_VENDOR_ID_LOW);
 
-	return vendorID;
+	return vendor_id;
 }
 
 /*
- *  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;
+	unsigned short device_id;
 
-	deviceID = ((unsigned short)i2cReadReg(SII164_I2C_ADDRESS,
-					       SII164_DEVICE_ID_HIGH) << 8) |
-		   (unsigned short)i2cReadReg(SII164_I2C_ADDRESS,
-					      SII164_DEVICE_ID_LOW);
+	device_id = ((unsigned short)i2c_read_reg(SII164_I2C_ADDRESS,
+						 SII164_DEVICE_ID_HIGH) << 8) |
+		    (unsigned short)i2c_read_reg(SII164_I2C_ADDRESS,
+						SII164_DEVICE_ID_LOW);
 
-	return deviceID;
+	return device_id;
 }
 
 /*
@@ -72,7 +72,7 @@ unsigned short sii164GetDeviceID(void)
  */
 
 /*
- *  sii164InitChip
+ *  sii164_init_chip
  *      This function initialize and detect the DVI controller chip.
  *
  *  Input:
@@ -118,16 +118,16 @@ unsigned short sii164GetDeviceID(void)
  *      0   - Success
  *     -1   - Fail.
  */
-long sii164InitChip(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)
+long sii164_init_chip(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)
 {
 	unsigned char config;
 
@@ -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)) {
 		/*
 		 *  Initialize SII164 controller chip.
 		 */
@@ -176,7 +176,7 @@ long sii164InitChip(unsigned char edge_select,
 		else
 			config |= SII164_CONFIGURATION_VSYNC_AS_IS;
 
-		i2cWriteReg(SII164_I2C_ADDRESS, SII164_CONFIGURATION, config);
+		i2c_write_reg(SII164_I2C_ADDRESS, SII164_CONFIGURATION, config);
 
 		/*
 		 * De-skew enabled with default 111b value.
@@ -214,7 +214,7 @@ long sii164InitChip(unsigned char edge_select,
 			config |= SII164_DESKEW_8_STEP;
 			break;
 		}
-		i2cWriteReg(SII164_I2C_ADDRESS, SII164_DESKEW, config);
+		i2c_write_reg(SII164_I2C_ADDRESS, SII164_DESKEW, config);
 
 		/* Enable/Disable Continuous Sync. */
 		if (continuous_sync_enable == 0)
@@ -231,12 +231,12 @@ long sii164InitChip(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);
 
 		return 0;
 	}
@@ -250,157 +250,158 @@ long sii164InitChip(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;
+	return g_dvi_ctrl_chip_name;
 }
 
 /*
- *  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
+ *      power_up - Flag to set the power down or up
  */
-void sii164SetPower(unsigned char powerUp)
+void sii164_set_power(unsigned char power_up)
 {
 	unsigned char config;
 
-	config = i2cReadReg(SII164_I2C_ADDRESS, SII164_CONFIGURATION);
-	if (powerUp == 1) {
+	config = i2c_read_reg(SII164_I2C_ADDRESS, SII164_CONFIGURATION);
+	if (power_up == 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);
 	}
 }
 
 /*
- *  sii164SelectHotPlugDetectionMode
+ *  sii164_select_hot_plug_detection_mode
  *      This function selects the mode of the hot plug detection.
  */
 static
-void sii164SelectHotPlugDetectionMode(enum sii164_hot_plug_mode hotPlugMode)
+void sii164_select_hot_plug_detection_mode(enum sii164_hot_plug_mode
+					   hot_plug_mode)
 {
-	unsigned char detectReg;
+	unsigned char detect_reg;
 
-	detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) &
-		    ~SII164_DETECT_MONITOR_SENSE_OUTPUT_FLAG;
-	switch (hotPlugMode) {
+	detect_reg = i2c_read_reg(SII164_I2C_ADDRESS, SII164_DETECT) &
+		     ~SII164_DETECT_MONITOR_SENSE_OUTPUT_FLAG;
+	switch (hot_plug_mode) {
 	case SII164_HOTPLUG_DISABLE:
-		detectReg |= SII164_DETECT_MONITOR_SENSE_OUTPUT_HIGH;
+		detect_reg |= SII164_DETECT_MONITOR_SENSE_OUTPUT_HIGH;
 		break;
 	case SII164_HOTPLUG_USE_MDI:
-		detectReg &= ~SII164_DETECT_INTERRUPT_MASK;
-		detectReg |= SII164_DETECT_INTERRUPT_BY_HTPLG_PIN;
-		detectReg |= SII164_DETECT_MONITOR_SENSE_OUTPUT_MDI;
+		detect_reg &= ~SII164_DETECT_INTERRUPT_MASK;
+		detect_reg |= SII164_DETECT_INTERRUPT_BY_HTPLG_PIN;
+		detect_reg |= SII164_DETECT_MONITOR_SENSE_OUTPUT_MDI;
 		break;
 	case SII164_HOTPLUG_USE_RSEN:
-		detectReg |= SII164_DETECT_MONITOR_SENSE_OUTPUT_RSEN;
+		detect_reg |= SII164_DETECT_MONITOR_SENSE_OUTPUT_RSEN;
 		break;
 	case SII164_HOTPLUG_USE_HTPLG:
-		detectReg |= SII164_DETECT_MONITOR_SENSE_OUTPUT_HTPLG;
+		detect_reg |= SII164_DETECT_MONITOR_SENSE_OUTPUT_HTPLG;
 		break;
 	}
 
-	i2cWriteReg(SII164_I2C_ADDRESS, SII164_DETECT, detectReg);
+	i2c_write_reg(SII164_I2C_ADDRESS, SII164_DETECT, detect_reg);
 }
 
 /*
- *  sii164EnableHotPlugDetection
+ *  sii164_enable_hot_plug_detection
  *      This function enables the Hot Plug detection.
  *
- *  enableHotPlug   - Enable (=1) / disable (=0) Hot Plug detection
+ *  enable_hot_plug   - Enable (=1) / disable (=0) Hot Plug detection
  */
-void sii164EnableHotPlugDetection(unsigned char enableHotPlug)
+void sii164_enable_hot_plug_detection(unsigned char enable_hot_plug)
 {
-	unsigned char detectReg;
+	unsigned char detect_reg;
 
-	detectReg = i2cReadReg(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
 	 * on each individual chip design.
 	 */
-	if (enableHotPlug != 0)
-		sii164SelectHotPlugDetectionMode(SII164_HOTPLUG_USE_MDI);
+	if (enable_hot_plug != 0)
+		sii164_select_hot_plug_detection_mode(SII164_HOTPLUG_USE_MDI);
 	else
-		sii164SelectHotPlugDetectionMode(SII164_HOTPLUG_DISABLE);
+		sii164_select_hot_plug_detection_mode(SII164_HOTPLUG_DISABLE);
 }
 
 /*
- *  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;
+	unsigned char hot_plug_value;
 
-	hotPlugValue = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) &
-		       SII164_DETECT_HOT_PLUG_STATUS_MASK;
-	if (hotPlugValue == SII164_DETECT_HOT_PLUG_STATUS_ON)
+	hot_plug_value = i2c_read_reg(SII164_I2C_ADDRESS, SII164_DETECT) &
+			 SII164_DETECT_HOT_PLUG_STATUS_MASK;
+	if (hot_plug_value == SII164_DETECT_HOT_PLUG_STATUS_ON)
 		return 1;
 	else
 		return 0;
 }
 
 /*
- *  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;
+	unsigned char detect_reg;
 
-	detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT) &
-		    SII164_DETECT_MONITOR_STATE_MASK;
-	if (detectReg == SII164_DETECT_MONITOR_STATE_CHANGE)
+	detect_reg = i2c_read_reg(SII164_I2C_ADDRESS, SII164_DETECT) &
+		     SII164_DETECT_MONITOR_STATE_MASK;
+	if (detect_reg == SII164_DETECT_MONITOR_STATE_CHANGE)
 		return 1;
 	else
 		return 0;
 }
 
 /*
- *  sii164ClearInterrupt
+ *  sii164_clear_interrupt
  *      Clear the hot plug interrupt.
  */
-void sii164ClearInterrupt(void)
+void sii164_clear_interrupt(void)
 {
-	unsigned char detectReg;
+	unsigned char detect_reg;
 
 	/* Clear the MDI interrupt */
-	detectReg = i2cReadReg(SII164_I2C_ADDRESS, SII164_DETECT);
-	i2cWriteReg(SII164_I2C_ADDRESS, SII164_DETECT,
-		    detectReg | SII164_DETECT_MONITOR_STATE_CLEAR);
+	detect_reg = i2c_read_reg(SII164_I2C_ADDRESS, SII164_DETECT);
+	i2c_write_reg(SII164_I2C_ADDRESS, SII164_DETECT,
+		      detect_reg | SII164_DETECT_MONITOR_STATE_CLEAR);
 }
 
 #endif
-- 
2.17.1



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

* [PATCH 4/4] staging: sm750fb: Edit CamelCase in ddk750_sii164.h
  2019-10-16 21:20 [PATCH 0/4] Edit CamelCase in sm750fb dvi and sii164 files Jamal Shareef
                   ` (2 preceding siblings ...)
  2019-10-16 21:20 ` [PATCH 3/4] staging: sm750fb: Edit CamelCase in ddk750_sii164.c Jamal Shareef
@ 2019-10-16 21:20 ` Jamal Shareef
  3 siblings, 0 replies; 11+ messages in thread
From: Jamal Shareef @ 2019-10-16 21:20 UTC (permalink / raw)
  To: boqun.feng, andrea.parri
  Cc: sudipm.mukherjee, teddy.wang, gregkh, outreachy-kernel, jamal.k.shareef

Edit CamelCase naming in ddk750_sii164.h file.
Issue found by checkpatch.

Edit depends on related files which are also being patched
as part of the patchset.

Signed-off-by: Jamal Shareef <jamal.k.shareef@gmail.com>
---
 drivers/staging/sm750fb/ddk750_sii164.h | 40 ++++++++++++-------------
 1 file changed, 20 insertions(+), 20 deletions(-)

diff --git a/drivers/staging/sm750fb/ddk750_sii164.h b/drivers/staging/sm750fb/ddk750_sii164.h
index d940cb729066..737b0e4869ff 100644
--- a/drivers/staging/sm750fb/ddk750_sii164.h
+++ b/drivers/staging/sm750fb/ddk750_sii164.h
@@ -16,28 +16,28 @@ enum sii164_hot_plug_mode {
 };
 
 /* Silicon Image SiI164 chip prototype */
-long sii164InitChip(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);
-
-unsigned short sii164GetVendorID(void);
-unsigned short sii164GetDeviceID(void);
+long sii164_init_chip(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);
+
+unsigned short sii164_get_vendor_id(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 power_up);
+void sii164_enable_hot_plug_detection(unsigned char enable_hot_plug);
+unsigned char sii164_is_connected(void);
+unsigned char sii164_check_interrupt(void);
+void sii164_clear_interrupt(void);
 #endif
 /*
  * below register definition is used for
-- 
2.17.1



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

* Re: [Outreachy kernel] [PATCH 1/4] staging: sm750fb: Edit CamelCase in ddk750_dvi.c
  2019-10-16 21:20 ` [PATCH 1/4] staging: sm750fb: Edit CamelCase in ddk750_dvi.c Jamal Shareef
@ 2019-10-16 21:30   ` Julia Lawall
  2019-10-16 21:35   ` Greg KH
  1 sibling, 0 replies; 11+ messages in thread
From: Julia Lawall @ 2019-10-16 21:30 UTC (permalink / raw)
  To: Jamal Shareef
  Cc: boqun.feng, andrea.parri, sudipm.mukherjee, teddy.wang, gregkh,
	outreachy-kernel



On Wed, 16 Oct 2019, Jamal Shareef wrote:

> Edit CamelCase naming convention in ddk750_dvi.c file.
> Issue found by checkpatch.
>
> Edit depends on related files which are also being patched
> as part of the patchset.

What does this mean?

The kernel should compile after every patch.

It's not exactly a camelcase issue, but you could also get rid of the g_
in g_dcft_supported_dvi_controller.  That seems to indicate that the
variable is a global variable, but that kind of encoding is not done in
the kernel.

julia



>
> Signed-off-by: Jamal Shareef <jamal.k.shareef@gmail.com>
> ---
>  drivers/staging/sm750fb/ddk750_dvi.c | 68 ++++++++++++++--------------
>  1 file changed, 34 insertions(+), 34 deletions(-)
>
> diff --git a/drivers/staging/sm750fb/ddk750_dvi.c b/drivers/staging/sm750fb/ddk750_dvi.c
> index cd564ea40779..6fa77d4effef 100644
> --- a/drivers/staging/sm750fb/ddk750_dvi.c
> +++ b/drivers/staging/sm750fb/ddk750_dvi.c
> @@ -11,50 +11,50 @@
>   * 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 = sii164_init_chip,
> +	    .pfn_get_vendor_id = sii164_get_vendor_id,
> +	    .pfn_get_device_id = sii164_get_device_id,
>  #ifdef SII164_FULL_FUNCTIONS
> -		.pfnResetChip = sii164ResetChip,
> -		.pfnGetChipString = sii164GetChipString,
> -		.pfnSetPower = sii164SetPower,
> -		.pfnEnableHotPlugDetection = sii164EnableHotPlugDetection,
> -		.pfnIsConnected = sii164IsConnected,
> -		.pfnCheckInterrupt = sii164CheckInterrupt,
> -		.pfnClearInterrupt = sii164ClearInterrupt,
> +	    .pfn_reset_chip = sii164_reset_chip,
> +	    .pfn_get_chip_string = sii164_get_chip_string,
> +	    .pfn_set_power = sii164_set_power,
> +	    .pfn_enable_hot_plug_detection = sii164_enable_hot_plug_detection,
> +	    .pfn_is_connected = sii164_is_connected,
> +	    .pfn_check_interrupt = sii164_check_interrupt,
> +	    .pfn_clear_interrupt = sii164_clear_interrupt,
>  #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,
> -						bus_select,
> -						dual_edge_clk_select,
> -						hsync_enable,
> -						vsync_enable,
> -						deskew_enable,
> -						deskew_setting,
> -						continuous_sync_enable,
> -						pll_filter_enable,
> -						pll_filter_value);
> +	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,
> +						    vsync_enable,
> +						    deskew_enable,
> +						    deskew_setting,
> +						    continuous_sync_enable,
> +						    pll_filter_enable,
> +						    pll_filter_value);
>  	}
>  	return -1; /* error */
>  }
> --
> 2.17.1
>
> --
> You received this message because you are subscribed to the Google Groups "outreachy-kernel" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to outreachy-kernel+unsubscribe@googlegroups.com.
> To view this discussion on the web visit https://groups.google.com/d/msgid/outreachy-kernel/0ccb65c7e5844541bb96a791c39caabb05a49afb.1571260724.git.jamal.k.shareef%40gmail.com.
>


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

* Re: [PATCH 1/4] staging: sm750fb: Edit CamelCase in ddk750_dvi.c
  2019-10-16 21:20 ` [PATCH 1/4] staging: sm750fb: Edit CamelCase in ddk750_dvi.c Jamal Shareef
  2019-10-16 21:30   ` [Outreachy kernel] " Julia Lawall
@ 2019-10-16 21:35   ` Greg KH
  2019-10-17  1:38     ` Jamal Shareef
  1 sibling, 1 reply; 11+ messages in thread
From: Greg KH @ 2019-10-16 21:35 UTC (permalink / raw)
  To: Jamal Shareef
  Cc: boqun.feng, andrea.parri, sudipm.mukherjee, teddy.wang, outreachy-kernel

On Wed, Oct 16, 2019 at 02:20:45PM -0700, Jamal Shareef wrote:
> Edit CamelCase naming convention in ddk750_dvi.c file.
> Issue found by checkpatch.
> 
> Edit depends on related files which are also being patched
> as part of the patchset.
> 
> Signed-off-by: Jamal Shareef <jamal.k.shareef@gmail.com>
> ---
>  drivers/staging/sm750fb/ddk750_dvi.c | 68 ++++++++++++++--------------
>  1 file changed, 34 insertions(+), 34 deletions(-)
> 
> diff --git a/drivers/staging/sm750fb/ddk750_dvi.c b/drivers/staging/sm750fb/ddk750_dvi.c
> index cd564ea40779..6fa77d4effef 100644
> --- a/drivers/staging/sm750fb/ddk750_dvi.c
> +++ b/drivers/staging/sm750fb/ddk750_dvi.c
> @@ -11,50 +11,50 @@
>   * 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 = sii164_init_chip,
> +	    .pfn_get_vendor_id = sii164_get_vendor_id,
> +	    .pfn_get_device_id = sii164_get_device_id,
>  #ifdef SII164_FULL_FUNCTIONS
> -		.pfnResetChip = sii164ResetChip,
> -		.pfnGetChipString = sii164GetChipString,
> -		.pfnSetPower = sii164SetPower,
> -		.pfnEnableHotPlugDetection = sii164EnableHotPlugDetection,
> -		.pfnIsConnected = sii164IsConnected,
> -		.pfnCheckInterrupt = sii164CheckInterrupt,
> -		.pfnClearInterrupt = sii164ClearInterrupt,
> +	    .pfn_reset_chip = sii164_reset_chip,
> +	    .pfn_get_chip_string = sii164_get_chip_string,
> +	    .pfn_set_power = sii164_set_power,
> +	    .pfn_enable_hot_plug_detection = sii164_enable_hot_plug_detection,
> +	    .pfn_is_connected = sii164_is_connected,
> +	    .pfn_check_interrupt = sii164_check_interrupt,
> +	    .pfn_clear_interrupt = sii164_clear_interrupt,
>  #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,

You didn't also change the .h file at the same time, how did this build?

You can't break the build at any point in time, every patch must work
properly.

Ah, no one even calls this function, maybe that's why this works?  If
so, just delete the function entirely!

thanks,

greg k-h


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

* Re: [PATCH 1/4] staging: sm750fb: Edit CamelCase in ddk750_dvi.c
  2019-10-16 21:35   ` Greg KH
@ 2019-10-17  1:38     ` Jamal Shareef
  2019-10-17 12:53       ` Greg KH
  0 siblings, 1 reply; 11+ messages in thread
From: Jamal Shareef @ 2019-10-17  1:38 UTC (permalink / raw)
  To: Greg KH; +Cc: sudipm.mukherjee, teddy.wang, outreachy-kernel

On Wed, Oct 16, 2019 at 02:35:54PM -0700, Greg KH wrote:
> On Wed, Oct 16, 2019 at 02:20:45PM -0700, Jamal Shareef wrote:
> > Edit CamelCase naming convention in ddk750_dvi.c file.
> > Issue found by checkpatch.
> > 
> > Edit depends on related files which are also being patched
> > as part of the patchset.
> > 
> > Signed-off-by: Jamal Shareef <jamal.k.shareef@gmail.com>
> > ---
> >  drivers/staging/sm750fb/ddk750_dvi.c | 68 ++++++++++++++--------------
> >  1 file changed, 34 insertions(+), 34 deletions(-)
> > 
> > diff --git a/drivers/staging/sm750fb/ddk750_dvi.c b/drivers/staging/sm750fb/ddk750_dvi.c
> > index cd564ea40779..6fa77d4effef 100644
> > --- a/drivers/staging/sm750fb/ddk750_dvi.c
> > +++ b/drivers/staging/sm750fb/ddk750_dvi.c
> > @@ -11,50 +11,50 @@
> >   * 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 = sii164_init_chip,
> > +	    .pfn_get_vendor_id = sii164_get_vendor_id,
> > +	    .pfn_get_device_id = sii164_get_device_id,
> >  #ifdef SII164_FULL_FUNCTIONS
> > -		.pfnResetChip = sii164ResetChip,
> > -		.pfnGetChipString = sii164GetChipString,
> > -		.pfnSetPower = sii164SetPower,
> > -		.pfnEnableHotPlugDetection = sii164EnableHotPlugDetection,
> > -		.pfnIsConnected = sii164IsConnected,
> > -		.pfnCheckInterrupt = sii164CheckInterrupt,
> > -		.pfnClearInterrupt = sii164ClearInterrupt,
> > +	    .pfn_reset_chip = sii164_reset_chip,
> > +	    .pfn_get_chip_string = sii164_get_chip_string,
> > +	    .pfn_set_power = sii164_set_power,
> > +	    .pfn_enable_hot_plug_detection = sii164_enable_hot_plug_detection,
> > +	    .pfn_is_connected = sii164_is_connected,
> > +	    .pfn_check_interrupt = sii164_check_interrupt,
> > +	    .pfn_clear_interrupt = sii164_clear_interrupt,
> >  #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,
> 
> You didn't also change the .h file at the same time, how did this build?
> 
> You can't break the build at any point in time, every patch must work
> properly.
> 
> Ah, no one even calls this function, maybe that's why this works?  If
> so, just delete the function entirely!
> 
> thanks,
> 
> greg k-h

Resending as one patch named
[RESEND PATCH] staging: sm750sb: Edit CamelCase in dvi/sii164 files

These built with no errors because I had modified all files at the time
but made the patchset instead of one patch.

Jamal


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

* Re: [PATCH 1/4] staging: sm750fb: Edit CamelCase in ddk750_dvi.c
  2019-10-17  1:38     ` Jamal Shareef
@ 2019-10-17 12:53       ` Greg KH
  2019-10-17 21:52         ` Jamal Shareef
  0 siblings, 1 reply; 11+ messages in thread
From: Greg KH @ 2019-10-17 12:53 UTC (permalink / raw)
  To: Jamal Shareef; +Cc: sudipm.mukherjee, teddy.wang, outreachy-kernel

On Wed, Oct 16, 2019 at 06:38:58PM -0700, Jamal Shareef wrote:
> On Wed, Oct 16, 2019 at 02:35:54PM -0700, Greg KH wrote:
> > On Wed, Oct 16, 2019 at 02:20:45PM -0700, Jamal Shareef wrote:
> > > Edit CamelCase naming convention in ddk750_dvi.c file.
> > > Issue found by checkpatch.
> > > 
> > > Edit depends on related files which are also being patched
> > > as part of the patchset.
> > > 
> > > Signed-off-by: Jamal Shareef <jamal.k.shareef@gmail.com>
> > > ---
> > >  drivers/staging/sm750fb/ddk750_dvi.c | 68 ++++++++++++++--------------
> > >  1 file changed, 34 insertions(+), 34 deletions(-)
> > > 
> > > diff --git a/drivers/staging/sm750fb/ddk750_dvi.c b/drivers/staging/sm750fb/ddk750_dvi.c
> > > index cd564ea40779..6fa77d4effef 100644
> > > --- a/drivers/staging/sm750fb/ddk750_dvi.c
> > > +++ b/drivers/staging/sm750fb/ddk750_dvi.c
> > > @@ -11,50 +11,50 @@
> > >   * 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 = sii164_init_chip,
> > > +	    .pfn_get_vendor_id = sii164_get_vendor_id,
> > > +	    .pfn_get_device_id = sii164_get_device_id,
> > >  #ifdef SII164_FULL_FUNCTIONS
> > > -		.pfnResetChip = sii164ResetChip,
> > > -		.pfnGetChipString = sii164GetChipString,
> > > -		.pfnSetPower = sii164SetPower,
> > > -		.pfnEnableHotPlugDetection = sii164EnableHotPlugDetection,
> > > -		.pfnIsConnected = sii164IsConnected,
> > > -		.pfnCheckInterrupt = sii164CheckInterrupt,
> > > -		.pfnClearInterrupt = sii164ClearInterrupt,
> > > +	    .pfn_reset_chip = sii164_reset_chip,
> > > +	    .pfn_get_chip_string = sii164_get_chip_string,
> > > +	    .pfn_set_power = sii164_set_power,
> > > +	    .pfn_enable_hot_plug_detection = sii164_enable_hot_plug_detection,
> > > +	    .pfn_is_connected = sii164_is_connected,
> > > +	    .pfn_check_interrupt = sii164_check_interrupt,
> > > +	    .pfn_clear_interrupt = sii164_clear_interrupt,
> > >  #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,
> > 
> > You didn't also change the .h file at the same time, how did this build?
> > 
> > You can't break the build at any point in time, every patch must work
> > properly.
> > 
> > Ah, no one even calls this function, maybe that's why this works?  If
> > so, just delete the function entirely!
> > 
> > thanks,
> > 
> > greg k-h
> 
> Resending as one patch named
> [RESEND PATCH] staging: sm750sb: Edit CamelCase in dvi/sii164 files

That patch does not delete this function :(


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

* Re: [PATCH 1/4] staging: sm750fb: Edit CamelCase in ddk750_dvi.c
  2019-10-17 12:53       ` Greg KH
@ 2019-10-17 21:52         ` Jamal Shareef
  2019-10-17 22:10           ` Greg KH
  0 siblings, 1 reply; 11+ messages in thread
From: Jamal Shareef @ 2019-10-17 21:52 UTC (permalink / raw)
  To: Greg KH; +Cc: sudipm.mukherjee, teddy.wang, outreachy-kernel

On Thu, Oct 17, 2019 at 05:53:26AM -0700, Greg KH wrote:
> On Wed, Oct 16, 2019 at 06:38:58PM -0700, Jamal Shareef wrote:
> > On Wed, Oct 16, 2019 at 02:35:54PM -0700, Greg KH wrote:
> > > On Wed, Oct 16, 2019 at 02:20:45PM -0700, Jamal Shareef wrote:
> > > > Edit CamelCase naming convention in ddk750_dvi.c file.
> > > > Issue found by checkpatch.
> > > > 
> > > > Edit depends on related files which are also being patched
> > > > as part of the patchset.
> > > > 
> > > > Signed-off-by: Jamal Shareef <jamal.k.shareef@gmail.com>
> > > > ---
> > > >  drivers/staging/sm750fb/ddk750_dvi.c | 68 ++++++++++++++--------------
> > > >  1 file changed, 34 insertions(+), 34 deletions(-)
> > > > 
> > > > diff --git a/drivers/staging/sm750fb/ddk750_dvi.c b/drivers/staging/sm750fb/ddk750_dvi.c
> > > > index cd564ea40779..6fa77d4effef 100644
> > > > --- a/drivers/staging/sm750fb/ddk750_dvi.c
> > > > +++ b/drivers/staging/sm750fb/ddk750_dvi.c
> > > > @@ -11,50 +11,50 @@
> > > >   * 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 = sii164_init_chip,
> > > > +	    .pfn_get_vendor_id = sii164_get_vendor_id,
> > > > +	    .pfn_get_device_id = sii164_get_device_id,
> > > >  #ifdef SII164_FULL_FUNCTIONS
> > > > -		.pfnResetChip = sii164ResetChip,
> > > > -		.pfnGetChipString = sii164GetChipString,
> > > > -		.pfnSetPower = sii164SetPower,
> > > > -		.pfnEnableHotPlugDetection = sii164EnableHotPlugDetection,
> > > > -		.pfnIsConnected = sii164IsConnected,
> > > > -		.pfnCheckInterrupt = sii164CheckInterrupt,
> > > > -		.pfnClearInterrupt = sii164ClearInterrupt,
> > > > +	    .pfn_reset_chip = sii164_reset_chip,
> > > > +	    .pfn_get_chip_string = sii164_get_chip_string,
> > > > +	    .pfn_set_power = sii164_set_power,
> > > > +	    .pfn_enable_hot_plug_detection = sii164_enable_hot_plug_detection,
> > > > +	    .pfn_is_connected = sii164_is_connected,
> > > > +	    .pfn_check_interrupt = sii164_check_interrupt,
> > > > +	    .pfn_clear_interrupt = sii164_clear_interrupt,
> > > >  #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,
> > > 
> > > You didn't also change the .h file at the same time, how did this build?
> > > 
> > > You can't break the build at any point in time, every patch must work
> > > properly.
> > > 
> > > Ah, no one even calls this function, maybe that's why this works?  If
> > > so, just delete the function entirely!
> > > 
> > > thanks,
> > > 
> > > greg k-h
> > 
> > Resending as one patch named
> > [RESEND PATCH] staging: sm750sb: Edit CamelCase in dvi/sii164 files
> 
> That patch does not delete this function :(

Just to be clear, there are no uses of the original function dviInt 
so we are removing it. Also removing the global variable 
dcft_supported_dvi_controller[] because it was only used in dviInt.

Jamal


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

* Re: [PATCH 1/4] staging: sm750fb: Edit CamelCase in ddk750_dvi.c
  2019-10-17 21:52         ` Jamal Shareef
@ 2019-10-17 22:10           ` Greg KH
  0 siblings, 0 replies; 11+ messages in thread
From: Greg KH @ 2019-10-17 22:10 UTC (permalink / raw)
  To: Jamal Shareef; +Cc: sudipm.mukherjee, teddy.wang, outreachy-kernel

On Thu, Oct 17, 2019 at 02:52:52PM -0700, Jamal Shareef wrote:
> On Thu, Oct 17, 2019 at 05:53:26AM -0700, Greg KH wrote:
> > On Wed, Oct 16, 2019 at 06:38:58PM -0700, Jamal Shareef wrote:
> > > On Wed, Oct 16, 2019 at 02:35:54PM -0700, Greg KH wrote:
> > > > On Wed, Oct 16, 2019 at 02:20:45PM -0700, Jamal Shareef wrote:
> > > > > Edit CamelCase naming convention in ddk750_dvi.c file.
> > > > > Issue found by checkpatch.
> > > > > 
> > > > > Edit depends on related files which are also being patched
> > > > > as part of the patchset.
> > > > > 
> > > > > Signed-off-by: Jamal Shareef <jamal.k.shareef@gmail.com>
> > > > > ---
> > > > >  drivers/staging/sm750fb/ddk750_dvi.c | 68 ++++++++++++++--------------
> > > > >  1 file changed, 34 insertions(+), 34 deletions(-)
> > > > > 
> > > > > diff --git a/drivers/staging/sm750fb/ddk750_dvi.c b/drivers/staging/sm750fb/ddk750_dvi.c
> > > > > index cd564ea40779..6fa77d4effef 100644
> > > > > --- a/drivers/staging/sm750fb/ddk750_dvi.c
> > > > > +++ b/drivers/staging/sm750fb/ddk750_dvi.c
> > > > > @@ -11,50 +11,50 @@
> > > > >   * 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 = sii164_init_chip,
> > > > > +	    .pfn_get_vendor_id = sii164_get_vendor_id,
> > > > > +	    .pfn_get_device_id = sii164_get_device_id,
> > > > >  #ifdef SII164_FULL_FUNCTIONS
> > > > > -		.pfnResetChip = sii164ResetChip,
> > > > > -		.pfnGetChipString = sii164GetChipString,
> > > > > -		.pfnSetPower = sii164SetPower,
> > > > > -		.pfnEnableHotPlugDetection = sii164EnableHotPlugDetection,
> > > > > -		.pfnIsConnected = sii164IsConnected,
> > > > > -		.pfnCheckInterrupt = sii164CheckInterrupt,
> > > > > -		.pfnClearInterrupt = sii164ClearInterrupt,
> > > > > +	    .pfn_reset_chip = sii164_reset_chip,
> > > > > +	    .pfn_get_chip_string = sii164_get_chip_string,
> > > > > +	    .pfn_set_power = sii164_set_power,
> > > > > +	    .pfn_enable_hot_plug_detection = sii164_enable_hot_plug_detection,
> > > > > +	    .pfn_is_connected = sii164_is_connected,
> > > > > +	    .pfn_check_interrupt = sii164_check_interrupt,
> > > > > +	    .pfn_clear_interrupt = sii164_clear_interrupt,
> > > > >  #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,
> > > > 
> > > > You didn't also change the .h file at the same time, how did this build?
> > > > 
> > > > You can't break the build at any point in time, every patch must work
> > > > properly.
> > > > 
> > > > Ah, no one even calls this function, maybe that's why this works?  If
> > > > so, just delete the function entirely!
> > > > 
> > > > thanks,
> > > > 
> > > > greg k-h
> > > 
> > > Resending as one patch named
> > > [RESEND PATCH] staging: sm750sb: Edit CamelCase in dvi/sii164 files
> > 
> > That patch does not delete this function :(
> 
> Just to be clear, there are no uses of the original function dviInt 
> so we are removing it. Also removing the global variable 
> dcft_supported_dvi_controller[] because it was only used in dviInt.

Yes please!

thanks,

greg k-h


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

end of thread, other threads:[~2019-10-17 22:10 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-16 21:20 [PATCH 0/4] Edit CamelCase in sm750fb dvi and sii164 files Jamal Shareef
2019-10-16 21:20 ` [PATCH 1/4] staging: sm750fb: Edit CamelCase in ddk750_dvi.c Jamal Shareef
2019-10-16 21:30   ` [Outreachy kernel] " Julia Lawall
2019-10-16 21:35   ` Greg KH
2019-10-17  1:38     ` Jamal Shareef
2019-10-17 12:53       ` Greg KH
2019-10-17 21:52         ` Jamal Shareef
2019-10-17 22:10           ` Greg KH
2019-10-16 21:20 ` [PATCH 2/4] staging: sm750fb: Edit CamelCase in ddk750_dvi.h Jamal Shareef
2019-10-16 21:20 ` [PATCH 3/4] staging: sm750fb: Edit CamelCase in ddk750_sii164.c Jamal Shareef
2019-10-16 21:20 ` [PATCH 4/4] staging: sm750fb: Edit CamelCase in ddk750_sii164.h Jamal Shareef

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.