Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1270383 > unrolled thread

[PATCH] comedi: dmm32at: Fix coding style - use BIT macro

Started byRanjith Thangavel <ranjithece24@gmail.com>
First post2015-11-16 18:10 +0100
Last post2015-11-16 18:30 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH] comedi: dmm32at: Fix coding style - use BIT macro Ranjith Thangavel <ranjithece24@gmail.com> - 2015-11-16 18:10 +0100
    RE: [PATCH] comedi: dmm32at: Fix coding style - use BIT macro Hartley Sweeten <HartleyS@visionengravers.com> - 2015-11-16 18:30 +0100

#1270383 — [PATCH] comedi: dmm32at: Fix coding style - use BIT macro

FromRanjith Thangavel <ranjithece24@gmail.com>
Date2015-11-16 18:10 +0100
Subject[PATCH] comedi: dmm32at: Fix coding style - use BIT macro
Message-ID<qvvrY-1EC-19@gated-at.bofh.it>
BIT macro is used for defining BIT location instead of
shifting operator, usleep_range is preferred over
udelay - coding style issue

Signed-off-by: Ranjith Thangavel <ranjithece24@gmail.com>
---
 drivers/staging/comedi/drivers/dmm32at.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/staging/comedi/drivers/dmm32at.c b/drivers/staging/comedi/drivers/dmm32at.c
index d312fda..9f8c9eb 100644
--- a/drivers/staging/comedi/drivers/dmm32at.c
+++ b/drivers/staging/comedi/drivers/dmm32at.c
@@ -508,7 +508,7 @@ static int dmm32at_reset(struct comedi_device *dev)
 	outb(DMM32AT_CTRL_RESETA, dev->iobase + DMM32AT_CTRL_REG);
 
 	/* allow a millisecond to reset */
-	udelay(1000);
+	usleep_range(1000, 1050);
 
 	/* zero scan and fifo control */
 	outb(0x0, dev->iobase + DMM32AT_FIFO_CTRL_REG);
@@ -524,7 +524,7 @@ static int dmm32at_reset(struct comedi_device *dev)
 	outb(DMM32AT_RANGE_U10, dev->iobase + DMM32AT_AI_CFG_REG);
 
 	/* should take 10 us to settle, here's a hundred */
-	udelay(100);
+	usleep_range(100, 150);
 
 	/* read back the values */
 	ailo = inb(dev->iobase + DMM32AT_AI_LO_CHAN_REG);
-- 
1.7.10.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1270403

FromHartley Sweeten <HartleyS@visionengravers.com>
Date2015-11-16 18:30 +0100
Message-ID<qvvLj-1Mp-11@gated-at.bofh.it>
In reply to#1270383
On Monday, November 16, 2015 10:09 AM, Ranjith Thangavel wrote:
> BIT macro is used for defining BIT location instead of
> shifting operator, usleep_range is preferred over
> udelay - coding style issue
>
> Signed-off-by: Ranjith Thangavel <ranjithece24@gmail.com>
> ---
>  drivers/staging/comedi/drivers/dmm32at.c |    4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/dmm32at.c b/drivers/staging/comedi/drivers/dmm32at.c
> index d312fda..9f8c9eb 100644
> --- a/drivers/staging/comedi/drivers/dmm32at.c
> +++ b/drivers/staging/comedi/drivers/dmm32at.c
> @@ -508,7 +508,7 @@ static int dmm32at_reset(struct comedi_device *dev)
>  	outb(DMM32AT_CTRL_RESETA, dev->iobase + DMM32AT_CTRL_REG);
>  
>  	/* allow a millisecond to reset */
> -	udelay(1000);
> +	usleep_range(1000, 1050);
>  
>  	/* zero scan and fifo control */
>  	outb(0x0, dev->iobase + DMM32AT_FIFO_CTRL_REG);
> @@ -524,7 +524,7 @@ static int dmm32at_reset(struct comedi_device *dev)
>  	outb(DMM32AT_RANGE_U10, dev->iobase + DMM32AT_AI_CFG_REG);
>  
>  	/* should take 10 us to settle, here's a hundred */
> -	udelay(100);
> +	usleep_range(100, 150);
>  
>  	/* read back the values */
>  	ailo = inb(dev->iobase + DMM32AT_AI_LO_CHAN_REG);

Nothing in this patch uses the BIT macro.

Please make sure your commit messages actually match the patch.

You also posted a different patch on Saturday with the exact same commit message.

Hartley

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web