Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0953ee4a authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: ni_mio_common: checkpatch.pl cleanup (else not useful)



Fix the checkpatch.pl warnings:

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

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 95940961
Loading
Loading
Loading
Loading
+26 −34
Original line number Diff line number Diff line
@@ -250,7 +250,7 @@ static void ni_writel(struct comedi_device *dev, uint32_t data, int reg)

	if (devpriv->mite)
		writel(data, devpriv->mite->daq_io_addr + reg);
	else

	outl(data, dev->iobase + reg);
}

@@ -260,7 +260,7 @@ static void ni_writew(struct comedi_device *dev, uint16_t data, int reg)

	if (devpriv->mite)
		writew(data, devpriv->mite->daq_io_addr + reg);
	else

	outw(data, dev->iobase + reg);
}

@@ -270,7 +270,7 @@ static void ni_writeb(struct comedi_device *dev, uint8_t data, int reg)

	if (devpriv->mite)
		writeb(data, devpriv->mite->daq_io_addr + reg);
	else

	outb(data, dev->iobase + reg);
}

@@ -280,7 +280,7 @@ static uint32_t ni_readl(struct comedi_device *dev, int reg)

	if (devpriv->mite)
		return readl(devpriv->mite->daq_io_addr + reg);
	else

	return inl(dev->iobase + reg);
}

@@ -290,7 +290,7 @@ static uint16_t ni_readw(struct comedi_device *dev, int reg)

	if (devpriv->mite)
		return readw(devpriv->mite->daq_io_addr + reg);
	else

	return inw(dev->iobase + reg);
}

@@ -300,7 +300,7 @@ static uint8_t ni_readb(struct comedi_device *dev, int reg)

	if (devpriv->mite)
		return readb(devpriv->mite->daq_io_addr + reg);
	else

	return inb(dev->iobase + reg);
}

@@ -4195,9 +4195,9 @@ static int ni_8255_callback(int dir, int port, int data, unsigned long arg)
	if (dir) {
		ni_writeb(dev, data, Port_A + 2 * port);
		return 0;
	} else {
		return ni_readb(dev, Port_A + 2 * port);
	}

	return ni_readb(dev, Port_A + 2 * port);
}

static int ni_get_pwm_config(struct comedi_device *dev, unsigned int *data)
@@ -4635,10 +4635,9 @@ static unsigned ni_get_pfi_routing(struct comedi_device *dev, unsigned chan)
{
	struct ni_private *devpriv = dev->private;

	if (devpriv->is_m_series)
		return ni_m_series_get_pfi_routing(dev, chan);
	else
		return ni_old_get_pfi_routing(dev, chan);
	return (devpriv->is_m_series)
			? ni_m_series_get_pfi_routing(dev, chan)
			: ni_old_get_pfi_routing(dev, chan);
}

static int ni_set_pfi_routing(struct comedi_device *dev, unsigned chan,
@@ -4646,10 +4645,9 @@ static int ni_set_pfi_routing(struct comedi_device *dev, unsigned chan,
{
	struct ni_private *devpriv = dev->private;

	if (devpriv->is_m_series)
		return ni_m_series_set_pfi_routing(dev, chan, source);
	else
		return ni_old_set_pfi_routing(dev, chan, source);
	return (devpriv->is_m_series)
			? ni_m_series_set_pfi_routing(dev, chan, source)
			: ni_old_set_pfi_routing(dev, chan, source);
}

static int ni_config_filter(struct comedi_device *dev,
@@ -5045,9 +5043,8 @@ static int ni_set_master_clock(struct comedi_device *dev,
					    ("%s: we don't handle an unspecified clock period correctly yet, returning error.\n",
					     __func__);
					return -EINVAL;
				} else {
					devpriv->clock_ns = period_ns;
				}
				devpriv->clock_ns = period_ns;
				devpriv->clock_source = source;
			} else
				return -EINVAL;
@@ -5060,10 +5057,7 @@ static unsigned num_configurable_rtsi_channels(struct comedi_device *dev)
{
	struct ni_private *devpriv = dev->private;

	if (devpriv->is_m_series)
		return 8;
	else
		return 7;
	return (devpriv->is_m_series) ? 8 : 7;
}

static int ni_valid_rtsi_output_source(struct comedi_device *dev,
@@ -5075,13 +5069,11 @@ static int ni_valid_rtsi_output_source(struct comedi_device *dev,
		if (chan == old_RTSI_clock_channel) {
			if (source == NI_RTSI_OUTPUT_RTSI_OSC)
				return 1;
			else {
				printk
				    ("%s: invalid source for channel=%i, channel %i is always the RTSI clock for pre-m-series boards.\n",

			printk("%s: invalid source for channel=%i, channel %i is always the RTSI clock for pre-m-series boards.\n",
			       __func__, chan, old_RTSI_clock_channel);
			return 0;
		}
		}
		return 0;
	}
	switch (source) {