All of lore.kernel.org
 help / color / mirror / Atom feed
From: Valentin Vidic <Valentin.Vidic@CARNet.hr>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: "Valentin Vidic" <Valentin.Vidic@CARNet.hr>,
	"Marcin Ciupak" <marcin.s.ciupak@gmail.com>,
	"Simon Sandström" <simon@nikanor.nu>,
	"Marcus Wolf" <linux@wolf-entwicklungen.de>,
	"Michael Panzlaff" <michael.panzlaff@fau.de>,
	devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 6/8] staging: pi433: fix CamelCase for newValue
Date: Sat, 27 Jan 2018 10:42:15 +0100	[thread overview]
Message-ID: <20180127094233.20234-6-Valentin.Vidic@CARNet.hr> (raw)
In-Reply-To: <20180127094233.20234-1-Valentin.Vidic@CARNet.hr>

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

  parent reply	other threads:[~2018-01-27  9:42 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Valentin Vidic [this message]
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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180127094233.20234-6-Valentin.Vidic@CARNet.hr \
    --to=valentin.vidic@carnet.hr \
    --cc=devel@driverdev.osuosl.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@wolf-entwicklungen.de \
    --cc=marcin.s.ciupak@gmail.com \
    --cc=michael.panzlaff@fau.de \
    --cc=simon@nikanor.nu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.