mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/8] staging: pi433: fix CamelCase for syncValues
@ 2018-01-27  9:42 Valentin Vidic
  2018-01-27  9:42 ` [PATCH 2/8] staging: pi433: fix CamelCase for powerLevel Valentin Vidic
                   ` (6 more replies)
  0 siblings, 7 replies; 8+ messages in thread
From: Valentin Vidic @ 2018-01-27  9:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Derek Robson, Michael Panzlaff, Valentin Vidic,
	linux-kernel, Marcin Ciupak, Marcus Wolf, Simon Sandström

Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <syncValues>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
---
 drivers/staging/pi433/rf69.c | 18 +++++++++---------
 drivers/staging/pi433/rf69.h |  2 +-
 2 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index 7ccdff6ae213..d55ef95b723e 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -645,18 +645,18 @@ int rf69_set_sync_size(struct spi_device *spi, u8 syncSize)
 	return rf69_read_mod_write(spi, REG_SYNC_CONFIG, MASK_SYNC_CONFIG_SYNC_SIZE, (syncSize << 3));
 }
 
-int rf69_set_sync_values(struct spi_device *spi, u8 syncValues[8])
+int rf69_set_sync_values(struct spi_device *spi, u8 sync_values[8])
 {
 	int retval = 0;
 
-	retval += rf69_write_reg(spi, REG_SYNCVALUE1, syncValues[0]);
-	retval += rf69_write_reg(spi, REG_SYNCVALUE2, syncValues[1]);
-	retval += rf69_write_reg(spi, REG_SYNCVALUE3, syncValues[2]);
-	retval += rf69_write_reg(spi, REG_SYNCVALUE4, syncValues[3]);
-	retval += rf69_write_reg(spi, REG_SYNCVALUE5, syncValues[4]);
-	retval += rf69_write_reg(spi, REG_SYNCVALUE6, syncValues[5]);
-	retval += rf69_write_reg(spi, REG_SYNCVALUE7, syncValues[6]);
-	retval += rf69_write_reg(spi, REG_SYNCVALUE8, syncValues[7]);
+	retval += rf69_write_reg(spi, REG_SYNCVALUE1, sync_values[0]);
+	retval += rf69_write_reg(spi, REG_SYNCVALUE2, sync_values[1]);
+	retval += rf69_write_reg(spi, REG_SYNCVALUE3, sync_values[2]);
+	retval += rf69_write_reg(spi, REG_SYNCVALUE4, sync_values[3]);
+	retval += rf69_write_reg(spi, REG_SYNCVALUE5, sync_values[4]);
+	retval += rf69_write_reg(spi, REG_SYNCVALUE6, sync_values[5]);
+	retval += rf69_write_reg(spi, REG_SYNCVALUE7, sync_values[6]);
+	retval += rf69_write_reg(spi, REG_SYNCVALUE8, sync_values[7]);
 
 	return retval;
 }
diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h
index 09d221b8b6df..4531b5d8c08b 100644
--- a/drivers/staging/pi433/rf69.h
+++ b/drivers/staging/pi433/rf69.h
@@ -49,7 +49,7 @@ int rf69_enable_sync(struct spi_device *spi);
 int rf69_disable_sync(struct spi_device *spi);
 int rf69_set_fifo_fill_condition(struct spi_device *spi, enum fifo_fill_condition fifo_fill_condition);
 int rf69_set_sync_size(struct spi_device *spi, u8 sync_size);
-int rf69_set_sync_values(struct spi_device *spi, u8 syncValues[8]);
+int rf69_set_sync_values(struct spi_device *spi, u8 sync_values[8]);
 int rf69_set_packet_format(struct spi_device *spi, enum packetFormat packetFormat);
 int rf69_enable_crc(struct spi_device *spi);
 int rf69_disable_crc(struct spi_device *spi);
-- 
2.15.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 2/8] staging: pi433: fix CamelCase for powerLevel
  2018-01-27  9:42 [PATCH 1/8] staging: pi433: fix CamelCase for syncValues Valentin Vidic
@ 2018-01-27  9:42 ` Valentin Vidic
  2018-01-27  9:42 ` [PATCH 3/8] staging: pi433: fix CamelCase for antennaImpedance Valentin Vidic
                   ` (5 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Valentin Vidic @ 2018-01-27  9:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Derek Robson, Michael Panzlaff, Valentin Vidic,
	linux-kernel, Marcin Ciupak, Marcus Wolf, Simon Sandström

Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <powerLevel>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
---
 drivers/staging/pi433/rf69.c | 8 ++++----
 drivers/staging/pi433/rf69.h | 2 +-
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index d55ef95b723e..096bf84e9034 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -330,19 +330,19 @@ int rf69_disable_amplifier(struct spi_device *spi, u8 amplifier_mask)
 	return rf69_clear_bit(spi, REG_PALEVEL, amplifier_mask);
 }
 
-int rf69_set_output_power_level(struct spi_device *spi, u8 powerLevel)
+int rf69_set_output_power_level(struct spi_device *spi, u8 power_level)
 {
 	// TODO: Dependency to PA0,1,2 setting
-	powerLevel += 18;
+	power_level += 18;
 
 	// check input value
-	if (powerLevel > 0x1f) {
+	if (power_level > 0x1f) {
 		dev_dbg(&spi->dev, "set: illegal input param");
 		return -EINVAL;
 	}
 
 	// write value
-	return rf69_read_mod_write(spi, REG_PALEVEL, MASK_PALEVEL_OUTPUT_POWER, powerLevel);
+	return rf69_read_mod_write(spi, REG_PALEVEL, MASK_PALEVEL_OUTPUT_POWER, power_level);
 }
 
 int rf69_set_pa_ramp(struct spi_device *spi, enum paRamp paRamp)
diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h
index 4531b5d8c08b..cd085f2efa79 100644
--- a/drivers/staging/pi433/rf69.h
+++ b/drivers/staging/pi433/rf69.h
@@ -34,7 +34,7 @@ int rf69_set_deviation(struct spi_device *spi, u32 deviation);
 int rf69_set_frequency(struct spi_device *spi, u32 frequency);
 int rf69_enable_amplifier(struct spi_device *spi, u8 amplifier_mask);
 int rf69_disable_amplifier(struct spi_device *spi, u8 amplifier_mask);
-int rf69_set_output_power_level(struct spi_device *spi, u8 powerLevel);
+int rf69_set_output_power_level(struct spi_device *spi, u8 power_level);
 int rf69_set_pa_ramp(struct spi_device *spi, enum paRamp paRamp);
 int rf69_set_antenna_impedance(struct spi_device *spi, enum antennaImpedance antennaImpedance);
 int rf69_set_lna_gain(struct spi_device *spi, enum lnaGain lnaGain);
-- 
2.15.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 3/8] staging: pi433: fix CamelCase for antennaImpedance
  2018-01-27  9:42 [PATCH 1/8] staging: pi433: fix CamelCase for syncValues Valentin Vidic
  2018-01-27  9:42 ` [PATCH 2/8] staging: pi433: fix CamelCase for powerLevel Valentin Vidic
@ 2018-01-27  9:42 ` Valentin Vidic
  2018-01-27  9:42 ` [PATCH 4/8] staging: pi433: fix CamelCase for Ohm identifiers Valentin Vidic
                   ` (4 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Valentin Vidic @ 2018-01-27  9:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Derek Robson, Michael Panzlaff, Valentin Vidic,
	Luca Söthe, Keerthi Reddy, Marcin Ciupak, linux-kernel,
	Marcus Wolf, Simon Sandström

Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <antennaImpedance>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
---
 drivers/staging/pi433/Documentation/pi433.txt | 2 +-
 drivers/staging/pi433/pi433_if.h              | 2 +-
 drivers/staging/pi433/rf69.c                  | 4 ++--
 drivers/staging/pi433/rf69.h                  | 2 +-
 drivers/staging/pi433/rf69_enum.h             | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/pi433/Documentation/pi433.txt b/drivers/staging/pi433/Documentation/pi433.txt
index 7d9dc2244848..05f278180ca3 100644
--- a/drivers/staging/pi433/Documentation/pi433.txt
+++ b/drivers/staging/pi433/Documentation/pi433.txt
@@ -192,7 +192,7 @@ rf params:
 		step_4_0db	- increase in 4 db steps
 		step_5_0db	- increase in 5 db steps
 		step_6_0db	- increase in 6 db steps
-	antennaImpedance
+	antenna_impedance
 		sets the electrical adoption of the antenna
 		fiftyOhm	- for antennas with an impedance of 50Ohm
 		twohundretOhm	- for antennas with an impedance of 200Ohm
diff --git a/drivers/staging/pi433/pi433_if.h b/drivers/staging/pi433/pi433_if.h
index 7314f69af198..c4e4ea086a24 100644
--- a/drivers/staging/pi433/pi433_if.h
+++ b/drivers/staging/pi433/pi433_if.h
@@ -116,7 +116,7 @@ struct pi433_rx_cfg {
 
 	__u8			rssi_threshold;
 	enum thresholdDecrement	threshold_decrement;
-	enum antennaImpedance	antenna_impedance;
+	enum antenna_impedance	antenna_impedance;
 	enum lnaGain		lna_gain;
 	enum mantisse		bw_mantisse;	/* normal: 0x50 */
 	__u8			bw_exponent;	/* during AFC: 0x8b */
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index 096bf84e9034..34ea865e55de 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -386,9 +386,9 @@ int rf69_set_pa_ramp(struct spi_device *spi, enum paRamp paRamp)
 	}
 }
 
-int rf69_set_antenna_impedance(struct spi_device *spi, enum antennaImpedance antennaImpedance)
+int rf69_set_antenna_impedance(struct spi_device *spi, enum antenna_impedance antenna_impedance)
 {
-	switch (antennaImpedance) {
+	switch (antenna_impedance) {
 	case fiftyOhm:
 		return rf69_clear_bit(spi, REG_LNA, MASK_LNA_ZIN);
 	case twohundretOhm:
diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h
index cd085f2efa79..2c0d130f7a03 100644
--- a/drivers/staging/pi433/rf69.h
+++ b/drivers/staging/pi433/rf69.h
@@ -36,7 +36,7 @@ int rf69_enable_amplifier(struct spi_device *spi, u8 amplifier_mask);
 int rf69_disable_amplifier(struct spi_device *spi, u8 amplifier_mask);
 int rf69_set_output_power_level(struct spi_device *spi, u8 power_level);
 int rf69_set_pa_ramp(struct spi_device *spi, enum paRamp paRamp);
-int rf69_set_antenna_impedance(struct spi_device *spi, enum antennaImpedance antennaImpedance);
+int rf69_set_antenna_impedance(struct spi_device *spi, enum antenna_impedance antenna_impedance);
 int rf69_set_lna_gain(struct spi_device *spi, enum lnaGain lnaGain);
 int rf69_set_bandwidth(struct spi_device *spi, enum mantisse mantisse, u8 exponent);
 int rf69_set_bandwidth_during_afc(struct spi_device *spi, enum mantisse mantisse, u8 exponent);
diff --git a/drivers/staging/pi433/rf69_enum.h b/drivers/staging/pi433/rf69_enum.h
index 03440cfa957c..7d0da84e2a29 100644
--- a/drivers/staging/pi433/rf69_enum.h
+++ b/drivers/staging/pi433/rf69_enum.h
@@ -60,7 +60,7 @@ enum paRamp {
 	ramp10
 };
 
-enum antennaImpedance {
+enum antenna_impedance {
 	fiftyOhm,
 	twohundretOhm
 };
-- 
2.15.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 4/8] staging: pi433: fix CamelCase for Ohm identifiers
  2018-01-27  9:42 [PATCH 1/8] staging: pi433: fix CamelCase for syncValues Valentin Vidic
  2018-01-27  9:42 ` [PATCH 2/8] staging: pi433: fix CamelCase for powerLevel Valentin Vidic
  2018-01-27  9:42 ` [PATCH 3/8] staging: pi433: fix CamelCase for antennaImpedance Valentin Vidic
@ 2018-01-27  9:42 ` Valentin Vidic
  2018-01-27  9:42 ` [PATCH 5/8] staging: pi433: fix CamelCase for currentValue Valentin Vidic
                   ` (3 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Valentin Vidic @ 2018-01-27  9:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Michael Panzlaff, Nguyen Phan Quang Minh, Valentin Vidic,
	Luca Söthe, Keerthi Reddy, Marcin Ciupak, linux-kernel,
	Srishti Sharma, Marcus Wolf, Al Viro, Simon Sandström

Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <fiftyOhm>
  CHECK: Avoid CamelCase: <twohundretOhm>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
---
 drivers/staging/pi433/Documentation/pi433.txt | 4 ++--
 drivers/staging/pi433/pi433_if.c              | 2 +-
 drivers/staging/pi433/rf69.c                  | 4 ++--
 drivers/staging/pi433/rf69_enum.h             | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/pi433/Documentation/pi433.txt b/drivers/staging/pi433/Documentation/pi433.txt
index 05f278180ca3..61ba9700d7dc 100644
--- a/drivers/staging/pi433/Documentation/pi433.txt
+++ b/drivers/staging/pi433/Documentation/pi433.txt
@@ -194,8 +194,8 @@ rf params:
 		step_6_0db	- increase in 6 db steps
 	antenna_impedance
 		sets the electrical adoption of the antenna
-		fiftyOhm	- for antennas with an impedance of 50Ohm
-		twohundretOhm	- for antennas with an impedance of 200Ohm
+		fifty_ohm	- for antennas with an impedance of 50Ohm
+		two_hundred_ohm	- for antennas with an impedance of 200Ohm
 	lnaGain
 		sets the gain of the low noise amp
 		automatic	- lna gain is determined by an agc
diff --git a/drivers/staging/pi433/pi433_if.c b/drivers/staging/pi433/pi433_if.c
index edcd7e798f99..14712e1bd5eb 100644
--- a/drivers/staging/pi433/pi433_if.c
+++ b/drivers/staging/pi433/pi433_if.c
@@ -1183,7 +1183,7 @@ static int pi433_probe(struct spi_device *spi)
 	retval = rf69_set_output_power_level(spi, 13);
 	if (retval < 0)
 		goto minor_failed;
-	retval = rf69_set_antenna_impedance(spi, fiftyOhm);
+	retval = rf69_set_antenna_impedance(spi, fifty_ohm);
 	if (retval < 0)
 		goto minor_failed;
 
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index 34ea865e55de..c69e63ffe537 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -389,9 +389,9 @@ int rf69_set_pa_ramp(struct spi_device *spi, enum paRamp paRamp)
 int rf69_set_antenna_impedance(struct spi_device *spi, enum antenna_impedance antenna_impedance)
 {
 	switch (antenna_impedance) {
-	case fiftyOhm:
+	case fifty_ohm:
 		return rf69_clear_bit(spi, REG_LNA, MASK_LNA_ZIN);
-	case twohundretOhm:
+	case two_hundred_ohm:
 		return rf69_set_bit(spi, REG_LNA, MASK_LNA_ZIN);
 	default:
 		dev_dbg(&spi->dev, "set: illegal input param");
diff --git a/drivers/staging/pi433/rf69_enum.h b/drivers/staging/pi433/rf69_enum.h
index 7d0da84e2a29..5629af716e4f 100644
--- a/drivers/staging/pi433/rf69_enum.h
+++ b/drivers/staging/pi433/rf69_enum.h
@@ -61,8 +61,8 @@ enum paRamp {
 };
 
 enum antenna_impedance {
-	fiftyOhm,
-	twohundretOhm
+	fifty_ohm,
+	two_hundred_ohm
 };
 
 enum lnaGain {
-- 
2.15.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 5/8] staging: pi433: fix CamelCase for currentValue
  2018-01-27  9:42 [PATCH 1/8] staging: pi433: fix CamelCase for syncValues Valentin Vidic
                   ` (2 preceding siblings ...)
  2018-01-27  9:42 ` [PATCH 4/8] staging: pi433: fix CamelCase for Ohm identifiers Valentin Vidic
@ 2018-01-27  9:42 ` Valentin Vidic
  2018-01-27  9:42 ` [PATCH 6/8] staging: pi433: fix CamelCase for newValue Valentin Vidic
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 8+ messages in thread
From: Valentin Vidic @ 2018-01-27  9:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Michael Panzlaff, Valentin Vidic, linux-kernel,
	Marcin Ciupak, Marcus Wolf, Simon Sandström

Local variable storing the value for modulation register so replace
with modulation_reg.

Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <currentValue>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
---
 drivers/staging/pi433/rf69.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index c69e63ffe537..261ba1643f5a 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -151,11 +151,11 @@ int rf69_set_modulation(struct spi_device *spi, enum modulation modulation)
 
 static enum modulation rf69_get_modulation(struct spi_device *spi)
 {
-	u8 currentValue;
+	u8 modulation_reg;
 
-	currentValue = rf69_read_reg(spi, REG_DATAMODUL);
+	modulation_reg = rf69_read_reg(spi, REG_DATAMODUL);
 
-	switch (currentValue & MASK_DATAMODUL_MODULATION_TYPE) {
+	switch (modulation_reg & MASK_DATAMODUL_MODULATION_TYPE) {
 	case DATAMODUL_MODULATION_TYPE_OOK:
 		return OOK;
 	case DATAMODUL_MODULATION_TYPE_FSK:
-- 
2.15.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 6/8] staging: pi433: fix CamelCase for newValue
  2018-01-27  9:42 [PATCH 1/8] staging: pi433: fix CamelCase for syncValues Valentin Vidic
                   ` (3 preceding siblings ...)
  2018-01-27  9:42 ` [PATCH 5/8] staging: pi433: fix CamelCase for currentValue Valentin Vidic
@ 2018-01-27  9:42 ` Valentin Vidic
  2018-01-27  9:42 ` [PATCH 7/8] staging: pi433: fix CamelCase for regValue Valentin Vidic
  2018-01-27  9:42 ` [PATCH 8/8] staging: pi433: fix CamelCase for DIONumber Valentin Vidic
  6 siblings, 0 replies; 8+ messages in thread
From: Valentin Vidic @ 2018-01-27  9:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Valentin Vidic, Marcin Ciupak, Simon Sandström, Marcus Wolf,
	Michael Panzlaff, devel, linux-kernel

Local variable storing the new value for bandwidth register
so replace with bandwidth.

Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <newValue>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
---
 drivers/staging/pi433/rf69.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index 261ba1643f5a..ef56deccd0af 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -425,7 +425,7 @@ int rf69_set_lna_gain(struct spi_device *spi, enum lnaGain lnaGain)
 static int rf69_set_bandwidth_intern(struct spi_device *spi, u8 reg,
 				     enum mantisse mantisse, u8 exponent)
 {
-	u8 newValue;
+	u8 bandwidth;
 
 	// check value for mantisse and exponent
 	if (exponent > 7) {
@@ -441,29 +441,29 @@ static int rf69_set_bandwidth_intern(struct spi_device *spi, u8 reg,
 	}
 
 	// read old value
-	newValue = rf69_read_reg(spi, reg);
+	bandwidth = rf69_read_reg(spi, reg);
 
 	// "delete" mantisse and exponent = just keep the DCC setting
-	newValue = newValue & MASK_BW_DCC_FREQ;
+	bandwidth = bandwidth & MASK_BW_DCC_FREQ;
 
 	// add new mantisse
 	switch (mantisse) {
 	case mantisse16:
-		newValue = newValue | BW_MANT_16;
+		bandwidth = bandwidth | BW_MANT_16;
 		break;
 	case mantisse20:
-		newValue = newValue | BW_MANT_20;
+		bandwidth = bandwidth | BW_MANT_20;
 		break;
 	case mantisse24:
-		newValue = newValue | BW_MANT_24;
+		bandwidth = bandwidth | BW_MANT_24;
 		break;
 	}
 
 	// add new exponent
-	newValue = newValue | exponent;
+	bandwidth = bandwidth | exponent;
 
 	// write back
-	return rf69_write_reg(spi, reg, newValue);
+	return rf69_write_reg(spi, reg, bandwidth);
 }
 
 int rf69_set_bandwidth(struct spi_device *spi, enum mantisse mantisse, u8 exponent)
-- 
2.15.1

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

* [PATCH 7/8] staging: pi433: fix CamelCase for regValue
  2018-01-27  9:42 [PATCH 1/8] staging: pi433: fix CamelCase for syncValues Valentin Vidic
                   ` (4 preceding siblings ...)
  2018-01-27  9:42 ` [PATCH 6/8] staging: pi433: fix CamelCase for newValue Valentin Vidic
@ 2018-01-27  9:42 ` Valentin Vidic
  2018-01-27  9:42 ` [PATCH 8/8] staging: pi433: fix CamelCase for DIONumber Valentin Vidic
  6 siblings, 0 replies; 8+ messages in thread
From: Valentin Vidic @ 2018-01-27  9:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Michael Panzlaff, Valentin Vidic, linux-kernel,
	Marcin Ciupak, Marcus Wolf, Simon Sandström

Local variable storing the new value for dio register
so replace with dio_value.  Update regaddr to dio_addr
to match.

Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <regValue>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
---
 drivers/staging/pi433/rf69.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index ef56deccd0af..42c2e1c6b386 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -505,27 +505,27 @@ int rf69_set_dio_mapping(struct spi_device *spi, u8 DIONumber, u8 value)
 {
 	u8 mask;
 	u8 shift;
-	u8 regaddr;
-	u8 regValue;
+	u8 dio_addr;
+	u8 dio_value;
 
 	switch (DIONumber) {
 	case 0:
-		mask = MASK_DIO0; shift = SHIFT_DIO0; regaddr = REG_DIOMAPPING1;
+		mask = MASK_DIO0; shift = SHIFT_DIO0; dio_addr = REG_DIOMAPPING1;
 		break;
 	case 1:
-		mask = MASK_DIO1; shift = SHIFT_DIO1; regaddr = REG_DIOMAPPING1;
+		mask = MASK_DIO1; shift = SHIFT_DIO1; dio_addr = REG_DIOMAPPING1;
 		break;
 	case 2:
-		mask = MASK_DIO2; shift = SHIFT_DIO2; regaddr = REG_DIOMAPPING1;
+		mask = MASK_DIO2; shift = SHIFT_DIO2; dio_addr = REG_DIOMAPPING1;
 		break;
 	case 3:
-		mask = MASK_DIO3; shift = SHIFT_DIO3; regaddr = REG_DIOMAPPING1;
+		mask = MASK_DIO3; shift = SHIFT_DIO3; dio_addr = REG_DIOMAPPING1;
 		break;
 	case 4:
-		mask = MASK_DIO4; shift = SHIFT_DIO4; regaddr = REG_DIOMAPPING2;
+		mask = MASK_DIO4; shift = SHIFT_DIO4; dio_addr = REG_DIOMAPPING2;
 		break;
 	case 5:
-		mask = MASK_DIO5; shift = SHIFT_DIO5; regaddr = REG_DIOMAPPING2;
+		mask = MASK_DIO5; shift = SHIFT_DIO5; dio_addr = REG_DIOMAPPING2;
 		break;
 	default:
 	dev_dbg(&spi->dev, "set: illegal input param");
@@ -533,13 +533,13 @@ int rf69_set_dio_mapping(struct spi_device *spi, u8 DIONumber, u8 value)
 	}
 
 	// read reg
-	regValue = rf69_read_reg(spi, regaddr);
+	dio_value = rf69_read_reg(spi, dio_addr);
 	// delete old value
-	regValue = regValue & ~mask;
+	dio_value = dio_value & ~mask;
 	// add new value
-	regValue = regValue | value << shift;
+	dio_value = dio_value | value << shift;
 	// write back
-	return rf69_write_reg(spi, regaddr, regValue);
+	return rf69_write_reg(spi, dio_addr, dio_value);
 }
 
 bool rf69_get_flag(struct spi_device *spi, enum flag flag)
-- 
2.15.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

* [PATCH 8/8] staging: pi433: fix CamelCase for DIONumber
  2018-01-27  9:42 [PATCH 1/8] staging: pi433: fix CamelCase for syncValues Valentin Vidic
                   ` (5 preceding siblings ...)
  2018-01-27  9:42 ` [PATCH 7/8] staging: pi433: fix CamelCase for regValue Valentin Vidic
@ 2018-01-27  9:42 ` Valentin Vidic
  6 siblings, 0 replies; 8+ messages in thread
From: Valentin Vidic @ 2018-01-27  9:42 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: devel, Derek Robson, Michael Panzlaff, Valentin Vidic,
	linux-kernel, Marcin Ciupak, Marcus Wolf, Simon Sandström

Fixes checkpatch warnings:

  CHECK: Avoid CamelCase: <DIONumber>

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
---
 drivers/staging/pi433/rf69.c | 4 ++--
 drivers/staging/pi433/rf69.h | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index 42c2e1c6b386..0b03758beb99 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -501,14 +501,14 @@ int rf69_set_ook_threshold_dec(struct spi_device *spi, enum thresholdDecrement t
 	}
 }
 
-int rf69_set_dio_mapping(struct spi_device *spi, u8 DIONumber, u8 value)
+int rf69_set_dio_mapping(struct spi_device *spi, u8 dio_number, u8 value)
 {
 	u8 mask;
 	u8 shift;
 	u8 dio_addr;
 	u8 dio_value;
 
-	switch (DIONumber) {
+	switch (dio_number) {
 	case 0:
 		mask = MASK_DIO0; shift = SHIFT_DIO0; dio_addr = REG_DIOMAPPING1;
 		break;
diff --git a/drivers/staging/pi433/rf69.h b/drivers/staging/pi433/rf69.h
index 2c0d130f7a03..cdd7be34cd9f 100644
--- a/drivers/staging/pi433/rf69.h
+++ b/drivers/staging/pi433/rf69.h
@@ -41,7 +41,7 @@ int rf69_set_lna_gain(struct spi_device *spi, enum lnaGain lnaGain);
 int rf69_set_bandwidth(struct spi_device *spi, enum mantisse mantisse, u8 exponent);
 int rf69_set_bandwidth_during_afc(struct spi_device *spi, enum mantisse mantisse, u8 exponent);
 int rf69_set_ook_threshold_dec(struct spi_device *spi, enum thresholdDecrement thresholdDecrement);
-int rf69_set_dio_mapping(struct spi_device *spi, u8 DIONumber, u8 value);
+int rf69_set_dio_mapping(struct spi_device *spi, u8 dio_number, u8 value);
 bool rf69_get_flag(struct spi_device *spi, enum flag flag);
 int rf69_set_rssi_threshold(struct spi_device *spi, u8 threshold);
 int rf69_set_preamble_length(struct spi_device *spi, u16 preambleLength);
-- 
2.15.1

_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel

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

end of thread, other threads:[~2018-01-27  9:42 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-01-27  9:42 [PATCH 1/8] staging: pi433: fix CamelCase for syncValues Valentin Vidic
2018-01-27  9:42 ` [PATCH 2/8] staging: pi433: fix CamelCase for powerLevel Valentin Vidic
2018-01-27  9:42 ` [PATCH 3/8] staging: pi433: fix CamelCase for antennaImpedance Valentin Vidic
2018-01-27  9:42 ` [PATCH 4/8] staging: pi433: fix CamelCase for Ohm identifiers Valentin Vidic
2018-01-27  9:42 ` [PATCH 5/8] staging: pi433: fix CamelCase for currentValue Valentin Vidic
2018-01-27  9:42 ` [PATCH 6/8] staging: pi433: fix CamelCase for newValue Valentin Vidic
2018-01-27  9:42 ` [PATCH 7/8] staging: pi433: fix CamelCase for regValue Valentin Vidic
2018-01-27  9:42 ` [PATCH 8/8] staging: pi433: fix CamelCase for DIONumber Valentin Vidic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®