From: Valentin Vidic <Valentin.Vidic@CARNet.hr>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: devel@driverdev.osuosl.org,
"Michael Panzlaff" <michael.panzlaff@fau.de>,
"Valentin Vidic" <Valentin.Vidic@CARNet.hr>,
linux-kernel@vger.kernel.org,
"Marcin Ciupak" <marcin.s.ciupak@gmail.com>,
"Marcus Wolf" <linux@wolf-entwicklungen.de>,
"Simon Sandström" <simon@nikanor.nu>
Subject: [PATCH 7/8] staging: pi433: fix CamelCase for regValue
Date: Sat, 27 Jan 2018 10:42:16 +0100 [thread overview]
Message-ID: <20180127094233.20234-7-Valentin.Vidic@CARNet.hr> (raw)
In-Reply-To: <20180127094233.20234-1-Valentin.Vidic@CARNet.hr>
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
next prev 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 ` [PATCH 6/8] staging: pi433: fix CamelCase for newValue Valentin Vidic
2018-01-27 9:42 ` Valentin Vidic [this message]
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-7-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 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®