diff options
author | Marcin Ciupak <marcin.s.ciupak@gmail.com> | 2017-10-11 21:23:39 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-10-18 15:56:32 +0200 |
commit | 308d32efc4c7609efc34a289d0a7f0a632f67f3b (patch) | |
tree | e4fa8935c91e306606f1f19b0783c05043698cc2 | |
parent | 4a74749a50a8f143df53a9ff139236790f1f6fd3 (diff) |
staging: pi433: rf69.c style fix - spaces required around
This patch fixes the following checkpatch.pl errors:
ERROR: spaces required around that '+=' (ctx:WxV)
ERROR: spaces required around that '=' (ctx:VxV)
ERROR: spaces required around that '<' (ctx:VxV)
in rf69.c file as requested by TODO file.
Additionally some style warnings remain valid here and could be fixed by
another patch.
Signed-off-by: Marcin Ciupak <marcin.s.ciupak@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r-- | drivers/staging/pi433/rf69.c | 26 |
1 files changed, 16 insertions, 10 deletions
diff --git a/drivers/staging/pi433/rf69.c b/drivers/staging/pi433/rf69.c index 3d9cf2cac4ef..7a79973641c9 100644 --- a/drivers/staging/pi433/rf69.c +++ b/drivers/staging/pi433/rf69.c @@ -323,7 +323,7 @@ int rf69_set_output_power_level(struct spi_device *spi, u8 powerLevel) dev_dbg(&spi->dev, "set: power level"); #endif - powerLevel +=18; // TODO Abhängigkeit von PA0,1,2 setting + powerLevel += 18; // TODO Abhängigkeit von PA0,1,2 setting // check input value if (powerLevel > 0x1f) { @@ -589,24 +589,30 @@ int rf69_set_dio_mapping(struct spi_device *spi, u8 DIONumber, u8 value) switch (DIONumber) { case 0: - mask=MASK_DIO0; shift=SHIFT_DIO0; regaddr=REG_DIOMAPPING1; break; + mask = MASK_DIO0; shift = SHIFT_DIO0; regaddr = REG_DIOMAPPING1; + break; case 1: - mask=MASK_DIO1; shift=SHIFT_DIO1; regaddr=REG_DIOMAPPING1; break; + mask = MASK_DIO1; shift = SHIFT_DIO1; regaddr = REG_DIOMAPPING1; + break; case 2: - mask=MASK_DIO2; shift=SHIFT_DIO2; regaddr=REG_DIOMAPPING1; break; + mask = MASK_DIO2; shift = SHIFT_DIO2; regaddr = REG_DIOMAPPING1; + break; case 3: - mask=MASK_DIO3; shift=SHIFT_DIO3; regaddr=REG_DIOMAPPING1; break; + mask = MASK_DIO3; shift = SHIFT_DIO3; regaddr = REG_DIOMAPPING1; + break; case 4: - mask=MASK_DIO4; shift=SHIFT_DIO4; regaddr=REG_DIOMAPPING2; break; + mask = MASK_DIO4; shift = SHIFT_DIO4; regaddr = REG_DIOMAPPING2; + break; case 5: - mask=MASK_DIO5; shift=SHIFT_DIO5; regaddr=REG_DIOMAPPING2; break; + mask = MASK_DIO5; shift = SHIFT_DIO5; regaddr = REG_DIOMAPPING2; + break; default: dev_dbg(&spi->dev, "set: illegal input param"); return -EINVAL; } // read reg - regValue=READ_REG(regaddr); + regValue = READ_REG(regaddr); // delete old value regValue = regValue & ~mask; // add new value @@ -960,7 +966,7 @@ int rf69_read_fifo (struct spi_device *spi, u8 *buffer, unsigned int size) retval = spi_sync_transfer(spi, &transfer, 1); #ifdef DEBUG_FIFO_ACCESS - for (i=0; i<size; i++) + for (i = 0; i < size; i++) dev_dbg(&spi->dev, "%d - 0x%x\n", i, local_buffer[i+1]); #endif @@ -988,7 +994,7 @@ int rf69_write_fifo(struct spi_device *spi, u8 *buffer, unsigned int size) memcpy(&local_buffer[1], buffer, size); // TODO: ohne memcopy wäre schöner #ifdef DEBUG_FIFO_ACCESS - for (i=0; i<size; i++) + for (i = 0; i < size; i++) dev_dbg(&spi->dev, "0x%x\n",buffer[i]); #endif |