From: Marcin Ciupak <marcin.s.ciupak@gmail.com>
To: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Marcus Wolf <linux@Wolf-Entwicklungen.de>,
devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/5] staging: pi433: rf69.c style fix - trailing statements
Date: Wed, 11 Oct 2017 21:23:26 +0200 [thread overview]
Message-ID: <7cf9801ee34a0bd4ef95cc4d100078338092e6fb.1507749358.git.marcin.s.ciupak@gmail.com> (raw)
In-Reply-To: <cover.1507749358.git.marcin.s.ciupak@gmail.com>
This patch fixes the following checkpatch.pl error:
ERROR: trailing statements should be on next line
in rf69.c file as requested by TODO file.
Note:
ERROR: spaces required around that '=' (ctx:VxV)
remains valid here and is going to be fixed by the next patch in set.
Additionally some style warnings remain valid here and could be fixed by
another patch.
Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com>
---
drivers/staging/pi433/rf69.c | 58 +++++++++++++++++++++++++++++++-------------
1 file changed, 41 insertions(+), 17 deletions(-)
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c
index 0305edc16861..3d9cf2cac4ef 100644
--- a/drivers/staging/pi433/rf69.c
+++ b/drivers/staging/pi433/rf69.c
@@ -164,9 +164,12 @@ int rf69_set_bit_rate(struct spi_device *spi, u16 bitRate)
// transmit to RF 69
retval = WRITE_REG(REG_BITRATE_MSB, msb);
- if (retval) return retval;
+ if (retval)
+ return retval;
+
retval = WRITE_REG(REG_BITRATE_LSB, lsb);
- if (retval) return retval;
+ if (retval)
+ return retval;
return 0;
}
@@ -209,9 +212,12 @@ int rf69_set_deviation(struct spi_device *spi, u32 deviation)
// write to chip
retval = WRITE_REG(REG_FDEV_MSB, msb);
- if (retval) return retval;
+ if (retval)
+ return retval;
+
retval = WRITE_REG(REG_FDEV_LSB, lsb);
- if (retval) return retval;
+ if (retval)
+ return retval;
return 0;
}
@@ -252,11 +258,16 @@ int rf69_set_frequency(struct spi_device *spi, u32 frequency)
// write to chip
retval = WRITE_REG(REG_FRF_MSB, msb);
- if (retval) return retval;
+ if (retval)
+ return retval;
+
retval = WRITE_REG(REG_FRF_MID, mid);
- if (retval) return retval;
+ if (retval)
+ return retval;
+
retval = WRITE_REG(REG_FRF_LSB, lsb);
- if (retval) return retval;
+ if (retval)
+ return retval;
return 0;
}
@@ -471,9 +482,15 @@ static int rf69_set_bandwidth_intern(struct spi_device *spi, u8 reg,
// add new mantisse
switch(mantisse) {
- case mantisse16: newValue = newValue | BW_MANT_16; break;
- case mantisse20: newValue = newValue | BW_MANT_20; break;
- case mantisse24: newValue = newValue | BW_MANT_24; break;
+ case mantisse16:
+ newValue = newValue | BW_MANT_16;
+ break;
+ case mantisse20:
+ newValue = newValue | BW_MANT_20;
+ break;
+ case mantisse24:
+ newValue = newValue | BW_MANT_24;
+ break;
}
// add new exponent
@@ -571,12 +588,18 @@ int rf69_set_dio_mapping(struct spi_device *spi, u8 DIONumber, u8 value)
#endif
switch (DIONumber) {
- case 0: mask=MASK_DIO0; shift=SHIFT_DIO0; regaddr=REG_DIOMAPPING1; break;
- case 1: mask=MASK_DIO1; shift=SHIFT_DIO1; regaddr=REG_DIOMAPPING1; break;
- case 2: mask=MASK_DIO2; shift=SHIFT_DIO2; regaddr=REG_DIOMAPPING1; break;
- case 3: mask=MASK_DIO3; shift=SHIFT_DIO3; regaddr=REG_DIOMAPPING1; break;
- case 4: mask=MASK_DIO4; shift=SHIFT_DIO4; regaddr=REG_DIOMAPPING2; break;
- case 5: mask=MASK_DIO5; shift=SHIFT_DIO5; regaddr=REG_DIOMAPPING2; break;
+ case 0:
+ mask=MASK_DIO0; shift=SHIFT_DIO0; regaddr=REG_DIOMAPPING1; break;
+ case 1:
+ mask=MASK_DIO1; shift=SHIFT_DIO1; regaddr=REG_DIOMAPPING1; break;
+ case 2:
+ mask=MASK_DIO2; shift=SHIFT_DIO2; regaddr=REG_DIOMAPPING1; break;
+ case 3:
+ mask=MASK_DIO3; shift=SHIFT_DIO3; regaddr=REG_DIOMAPPING1; break;
+ case 4:
+ mask=MASK_DIO4; shift=SHIFT_DIO4; regaddr=REG_DIOMAPPING2; break;
+ case 5:
+ mask=MASK_DIO5; shift=SHIFT_DIO5; regaddr=REG_DIOMAPPING2; break;
default:
dev_dbg(&spi->dev, "set: illegal input param");
return -EINVAL;
@@ -686,7 +709,8 @@ int rf69_set_preamble_length(struct spi_device *spi, u16 preambleLength)
/* transmit to chip */
retval = WRITE_REG(REG_PREAMBLE_MSB, msb);
- if (retval) return retval;
+ if (retval)
+ return retval;
return WRITE_REG(REG_PREAMBLE_LSB, lsb);
}
--
2.14.2
next prev parent reply other threads:[~2017-10-11 19:23 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-10-11 19:22 [PATCH 0/5] staging: pi433: rf69.c coding style errors cleanup Marcin Ciupak
2017-10-11 19:23 ` Marcin Ciupak [this message]
2017-10-11 19:23 ` [PATCH 2/5] staging: pi433: rf69.c style fix - spaces required around Marcin Ciupak
2017-10-11 19:24 ` [PATCH 3/5] staging: pi433: rf69.c style fix - spaces before/after Marcin Ciupak
2017-10-11 19:24 ` [PATCH 4/5] staging: pi433: rf69.c style fix - code indent should use tabs Marcin Ciupak
2017-12-02 15:30 ` Marcus Wolf
2017-10-11 19:24 ` [PATCH 5/5] staging: pi433: rf69.c style fix - space before asterisk Marcin Ciupak
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=7cf9801ee34a0bd4ef95cc4d100078338092e6fb.1507749358.git.marcin.s.ciupak@gmail.com \
--to=marcin.s.ciupak@gmail.com \
--cc=devel@driverdev.osuosl.org \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@Wolf-Entwicklungen.de \
/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®