From: "Simon Sandström" <simon@nikanor.nu>
To: gregkh@linuxfoundation.org
Cc: gneukum1@gmail.com, devel@driverdev.osuosl.org,
linux-kernel@vger.kernel.org,
"Simon Sandström" <simon@nikanor.nu>
Subject: [PATCH 2/4] staging: kpc2000: add missing spaces in kpc2000_spi.c
Date: Tue, 25 Jun 2019 10:41:28 +0200 [thread overview]
Message-ID: <20190625084130.1107-3-simon@nikanor.nu> (raw)
In-Reply-To: <20190625084130.1107-1-simon@nikanor.nu>
Fixes checkpatch errors:
- spaces required around that '=' (ctx:VxV)
- space required before the open parenthesis '('
- spaces preferred around that '-' (ctx:VxV)
- space required before the open brace '{'
Signed-off-by: Simon Sandström <simon@nikanor.nu>
---
drivers/staging/kpc2000/kpc2000_spi.c | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
diff --git a/drivers/staging/kpc2000/kpc2000_spi.c b/drivers/staging/kpc2000/kpc2000_spi.c
index c3e5c1848f53..98484fbb9d2e 100644
--- a/drivers/staging/kpc2000/kpc2000_spi.c
+++ b/drivers/staging/kpc2000/kpc2000_spi.c
@@ -164,7 +164,7 @@ kp_spi_read_reg(struct kp_spi_controller_state *cs, int idx)
u64 val;
addr += idx;
- if ((idx == KP_SPI_REG_CONFIG) && (cs->conf_cache >= 0)){
+ if ((idx == KP_SPI_REG_CONFIG) && (cs->conf_cache >= 0)) {
return cs->conf_cache;
}
val = readq(addr);
@@ -223,9 +223,9 @@ kp_spi_txrx_pio(struct spi_device *spidev, struct spi_transfer *transfer)
processed++;
}
}
- else if(rx) {
+ else if (rx) {
for (i = 0 ; i < c ; i++) {
- char test=0;
+ char test = 0;
kp_spi_write_reg(cs, KP_SPI_REG_TXDATA, 0x00);
@@ -261,7 +261,7 @@ kp_spi_setup(struct spi_device *spidev)
cs = spidev->controller_state;
if (!cs) {
cs = kzalloc(sizeof(*cs), GFP_KERNEL);
- if(!cs) {
+ if (!cs) {
return -ENOMEM;
}
cs->base = kpspi->base;
@@ -364,7 +364,7 @@ kp_spi_transfer_one_message(struct spi_master *master, struct spi_message *m)
if (transfer->bits_per_word) {
word_len = transfer->bits_per_word;
}
- sc.bitfield.wl = word_len-1;
+ sc.bitfield.wl = word_len - 1;
/* ...chip select */
sc.bitfield.cs = spidev->chip_select;
@@ -425,7 +425,7 @@ kp_spi_probe(struct platform_device *pldev)
int i;
drvdata = pldev->dev.platform_data;
- if (!drvdata){
+ if (!drvdata) {
dev_err(&pldev->dev, "kp_spi_probe: platform_data is NULL!\n");
return -ENODEV;
}
@@ -476,7 +476,7 @@ kp_spi_probe(struct platform_device *pldev)
spi_new_device(master, &(table[i])); \
}
- switch ((drvdata->card_id & 0xFFFF0000) >> 16){
+ switch ((drvdata->card_id & 0xFFFF0000) >> 16) {
case PCI_DEVICE_ID_DAKTRONICS_KADOKA_P2KR0:
NEW_SPI_DEVICE_FROM_BOARD_INFO_TABLE(p2kr0_board_info);
break;
--
2.20.1
next prev parent reply other threads:[~2019-06-25 8:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-25 8:41 [PATCH 0/4] Minor style issue fixes for staging/kpc2000 Simon Sandström
2019-06-25 8:41 ` [PATCH 1/4] staging: kpc2000: add missing spaces in kpc2000_i2c.c Simon Sandström
2019-06-25 8:41 ` Simon Sandström [this message]
2019-06-25 8:41 ` [PATCH 3/4] staging: kpc2000: remove unnecessary parentheses in kpc2000_spi.c Simon Sandström
2019-06-26 1:56 ` Greg KH
2019-06-25 8:41 ` [PATCH 4/4] staging: kpc2000: fix brace issues " Simon Sandström
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=20190625084130.1107-3-simon@nikanor.nu \
--to=simon@nikanor.nu \
--cc=devel@driverdev.osuosl.org \
--cc=gneukum1@gmail.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-kernel@vger.kernel.org \
/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®