staging: comedi: cb_pcidas64: checkpatch.pl cleanup (else after return)
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 16 Jul 2014 17:43:21 +0000 (10:43 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 16 Jul 2014 20:34:22 +0000 (13:34 -0700)
Fix these checkpatch.pl warnings:

WARNING: else is not generally useful after a break or return

Also, remove an unnecessary trailing ';' at the end of a function.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/cb_pcidas64.c

index 035c3a1760054c290608a5e4e591fb5c8278475d..bf4c1b2eb3996cee34f1caee38d6cc66338aab1c 100644 (file)
@@ -636,8 +636,8 @@ static inline unsigned int ai_dma_ring_count(const struct pcidas64_board *board)
 {
        if (board->layout == LAYOUT_4020)
                return MAX_AI_DMA_RING_COUNT;
-       else
-               return MIN_AI_DMA_RING_COUNT;
+
+       return MIN_AI_DMA_RING_COUNT;
 }
 
 static const int bytes_in_sample = 2;
@@ -1045,9 +1045,9 @@ static inline unsigned short se_diff_bit_6xxx(struct comedi_device *dev,
        if ((thisboard->layout == LAYOUT_64XX && !use_differential) ||
            (thisboard->layout == LAYOUT_60XX && use_differential))
                return ADC_SE_DIFF_BIT;
-       else
-               return 0;
-};
+
+       return 0;
+}
 
 struct ext_clock_info {
        /*  master clock divisor to use for scans with external master clock */
@@ -2162,8 +2162,8 @@ static int use_hw_sample_counter(struct comedi_cmd *cmd)
 
        if (cmd->stop_src == TRIG_COUNT && cmd->stop_arg <= max_counter_value)
                return 1;
-       else
-               return 0;
+
+       return 0;
 }
 
 static void setup_sample_counters(struct comedi_device *dev,
@@ -3384,9 +3384,8 @@ static int dio_callback(int dir, int port, int data, unsigned long arg)
        if (dir) {
                writeb(data, iobase + port);
                return 0;
-       } else {
-               return readb(iobase + port);
        }
+       return readb(iobase + port);
 }
 
 static int dio_callback_4020(int dir, int port, int data, unsigned long arg)
@@ -3395,9 +3394,8 @@ static int dio_callback_4020(int dir, int port, int data, unsigned long arg)
        if (dir) {
                writew(data, iobase + 2 * port);
                return 0;
-       } else {
-               return readw(iobase + 2 * port);
        }
+       return readw(iobase + 2 * port);
 }
 
 static int di_rbits(struct comedi_device *dev, struct comedi_subdevice *s,
This page took 0.027717 seconds and 5 git commands to generate.