Re: [PATCH 11/22] staging: comedi: s626: remove MC_TEST macro

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Mar 22, 2013 at 03:58:01PM -0700, H Hartley Sweeten wrote:
> This macro relies on a local variable having a specific name. Replace
> it with a new helper function, s626_mc_test().
> 
> -#define MC_TEST(REGADRS, CTRLWORD)	((readl(devpriv->base_addr+(REGADRS)) & CTRLWORD) != 0)
> +static bool s626_mc_test(struct comedi_device *dev,
> +			 unsigned int cmd, unsigned int reg)
> +{
> +	struct s626_private *devpriv = dev->private;
> +	unsigned int val;
> +
> +	val = readl(devpriv->base_addr + reg);
> +
> +	return (reg & cmd) ? true : false;
                ^^^
This should be "val" instead of "reg".

regards,
dan carpenter

_______________________________________________
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxx
http://driverdev.linuxdriverproject.org/mailman/listinfo/devel




[Index of Archives]     [Linux Driver Backports]     [DMA Engine]     [Linux GPIO]     [Linux SPI]     [Video for Linux]     [Linux USB Devel]     [Linux Coverity]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux