]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
staging: pi433: remove space inside parenthesis
authorValentin Vidic <Valentin.Vidic@CARNet.hr>
Sun, 10 Dec 2017 14:31:09 +0000 (15:31 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Dec 2017 11:56:29 +0000 (12:56 +0100)
Fixes checkpatch error for prohibited spaces.

Signed-off-by: Valentin Vidic <Valentin.Vidic@CARNet.hr>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/pi433/pi433_if.c
drivers/staging/pi433/rf69.c
drivers/staging/pi433/rf69.h

index ab848c1d55a66fa6d50da78d3b3f3010681dac4d..a1b2c0ea8bd53d481c1b9a1903369ca93e72a337 100644 (file)
@@ -456,7 +456,7 @@ pi433_receive(void *data)
                return retval;
 
        /* now check RSSI, if low wait for getting high (RSSI interrupt) */
-       while ( !rf69_get_flag(dev->spi, rssiExceededThreshold) )
+       while (!rf69_get_flag(dev->spi, rssiExceededThreshold))
        {
                /* allow tx to interrupt us while waiting for high RSSI */
                dev->interrupt_rx_allowed = true;
@@ -533,7 +533,7 @@ pi433_receive(void *data)
        /* get payload */
        while (dev->rx_position < bytes_total)
        {
-               if ( !rf69_get_flag(dev->spi, payloadReady) )
+               if (!rf69_get_flag(dev->spi, payloadReady))
                {
                        retval = wait_event_interruptible(dev->fifo_wait_queue,
                                                          dev->free_in_fifo < FIFO_SIZE);
@@ -594,9 +594,9 @@ pi433_tx_thread(void *data)
                /* wait for fifo to be populated or for request to terminate*/
                dev_dbg(device->dev, "thread: going to wait for new messages");
                wait_event_interruptible(device->tx_wait_queue,
-                                        ( !kfifo_is_empty(&device->tx_fifo) ||
-                                           kthread_should_stop() ));
-               if ( kthread_should_stop() )
+                                        (!kfifo_is_empty(&device->tx_fifo) ||
+                                         kthread_should_stop()));
+               if (kthread_should_stop())
                        return 0;
 
                /* get data from fifo in the following order:
@@ -608,14 +608,14 @@ pi433_tx_thread(void *data)
 
                retval = kfifo_out(&device->tx_fifo, &tx_cfg, sizeof(tx_cfg));
                if (retval != sizeof(tx_cfg)) {
-                       dev_dbg(device->dev, "reading tx_cfg from fifo failed: got %d byte(s), expected %d", retval, (unsigned int)sizeof(tx_cfg) );
+                       dev_dbg(device->dev, "reading tx_cfg from fifo failed: got %d byte(s), expected %d", retval, (unsigned int)sizeof(tx_cfg));
                        mutex_unlock(&device->tx_fifo_lock);
                        continue;
                }
 
                retval = kfifo_out(&device->tx_fifo, &size, sizeof(size_t));
                if (retval != sizeof(size_t)) {
-                       dev_dbg(device->dev, "reading msg size from fifo failed: got %d, expected %d", retval, (unsigned int)sizeof(size_t) );
+                       dev_dbg(device->dev, "reading msg size from fifo failed: got %d, expected %d", retval, (unsigned int)sizeof(size_t));
                        mutex_unlock(&device->tx_fifo_lock);
                        continue;
                }
@@ -725,9 +725,9 @@ pi433_tx_thread(void *data)
                device->free_in_fifo = FIFO_SIZE;
                position = 0;
                repetitions = tx_cfg.repetitions;
-               while ( (repetitions > 0) && (size > position) )
+               while ((repetitions > 0) && (size > position))
                {
-                       if ( (size - position) > device->free_in_fifo)
+                       if ((size - position) > device->free_in_fifo)
                        {       /* msg to big for fifo - take a part */
                                int temp = device->free_in_fifo;
                                device->free_in_fifo = 0;
@@ -742,7 +742,7 @@ pi433_tx_thread(void *data)
                                repetitions--;
                                rf69_write_fifo(spi,
                                                &buffer[position],
-                                               (size - position) );
+                                               (size - position));
                                position = 0; /* reset for next repetition */
                        }
 
@@ -755,8 +755,8 @@ pi433_tx_thread(void *data)
                dev_dbg(device->dev, "thread: wait for packet to get sent/fifo to be empty");
                wait_event_interruptible(device->fifo_wait_queue,
                                         device->free_in_fifo == FIFO_SIZE ||
-                                        kthread_should_stop() );
-               if ( kthread_should_stop() )    printk("ABORT\n");
+                                        kthread_should_stop());
+               if (kthread_should_stop())      printk("ABORT\n");
 
 
                /* STOP_TRANSMISSION */
@@ -853,11 +853,11 @@ pi433_write(struct file *filp, const char __user *buf,
         */
        mutex_lock(&device->tx_fifo_lock);
        retval = kfifo_in(&device->tx_fifo, &instance->tx_cfg, sizeof(instance->tx_cfg));
-       if ( retval != sizeof(instance->tx_cfg) )
+       if (retval != sizeof(instance->tx_cfg))
                goto abort;
 
-       retval = kfifo_in (&device->tx_fifo, &count, sizeof(size_t));
-       if ( retval != sizeof(size_t) )
+       retval = kfifo_in(&device->tx_fifo, &count, sizeof(size_t));
+       if (retval != sizeof(size_t))
                goto abort;
 
        retval = kfifo_from_user(&device->tx_fifo, buf, count, &copied);
@@ -1043,7 +1043,7 @@ static int setup_GPIOs(struct pi433_device *device)
                if (device->gpiod[i] == ERR_PTR(-EBUSY))
                        dev_dbg(&device->spi->dev, "%s is busy.", name);
 
-               if ( IS_ERR(device->gpiod[i]) )
+               if (IS_ERR(device->gpiod[i]))
                {
                        retval = PTR_ERR(device->gpiod[i]);
                        /* release already allocated gpios */
@@ -1089,7 +1089,7 @@ static void free_GPIOs(struct pi433_device *device)
        for (i = 0; i < NUM_DIO; i++)
        {
                /* check if gpiod is valid */
-               if ( IS_ERR(device->gpiod[i]) )
+               if (IS_ERR(device->gpiod[i]))
                        continue;
 
                free_irq(device->irq_num[i], device);
index 6e38e6a515a42679594e1917a6ac4cfe0893424d..770c33c9e60ee09e3a4245dced3351fbd101132d 100644 (file)
@@ -757,7 +757,7 @@ int rf69_set_dagc(struct spi_device *spi, enum dagc dagc)
 
 /*-------------------------------------------------------------------------*/
 
-int rf69_read_fifo (struct spi_device *spi, u8 *buffer, unsigned int size)
+int rf69_read_fifo(struct spi_device *spi, u8 *buffer, unsigned int size)
 {
 #ifdef DEBUG_FIFO_ACCESS
        int i;
@@ -811,7 +811,7 @@ int rf69_write_fifo(struct spi_device *spi, u8 *buffer, unsigned int size)
                dev_dbg(&spi->dev, "0x%x\n", buffer[i]);
 #endif
 
-       return spi_write (spi, local_buffer, size + 1);
+       return spi_write(spi, local_buffer, size + 1);
 }
 
 /*-------------------------------------------------------------------------*/
index ba25ab6aeae7dcf0aa6c610ff9bfa4909723f738..e8803241b13b8e9767078f8fab517457d740b53c 100644 (file)
@@ -73,10 +73,10 @@ int rf69_set_tx_start_condition(struct spi_device *spi, enum txStartCondition tx
 int rf69_set_fifo_threshold(struct spi_device *spi, u8 threshold);
 int rf69_set_dagc(struct spi_device *spi, enum dagc dagc);
 
-int rf69_read_fifo (struct spi_device *spi, u8 *buffer, unsigned int size);
+int rf69_read_fifo(struct spi_device *spi, u8 *buffer, unsigned int size);
 int rf69_write_fifo(struct spi_device *spi, u8 *buffer, unsigned int size);
 
-u8  rf69_read_reg (struct spi_device *spi, u8 addr);
+u8  rf69_read_reg(struct spi_device *spi, u8 addr);
 int rf69_write_reg(struct spi_device *spi, u8 addr, u8 value);