* [PATCH] staging: comedi: amplc_pci230: fix DACOUT write
@ 2014-08-19 11:32 Ian Abbott
2014-09-08 19:14 ` Greg Kroah-Hartman
0 siblings, 1 reply; 4+ messages in thread
From: Ian Abbott @ 2014-08-19 11:32 UTC (permalink / raw)
To: driverdev-devel
Cc: Greg Kroah-Hartman, Ian Abbott, H Hartley Sweeten, linux-kernel
Commit 4f9c63fe5333b27ab23ed399830c7977f6970744 ("staging: comedi:
amplc_pci230: refactor iobase addresses") removed some parentheses
(presumably to keep the line withing 80 chars) in
`pci230_ao_write_nofifo()` when writing to the DACOUT1 or DACOUT2
registers, but it removed the wrong parentheses. Fix it.
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
---
This bug is in linux-next master and staging-next.
---
drivers/staging/comedi/drivers/amplc_pci230.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/staging/comedi/drivers/amplc_pci230.c b/drivers/staging/comedi/drivers/amplc_pci230.c
index 0fd212f..dd69e47 100644
--- a/drivers/staging/comedi/drivers/amplc_pci230.c
+++ b/drivers/staging/comedi/drivers/amplc_pci230.c
@@ -628,7 +628,7 @@ static inline void pci230_ao_write_nofifo(struct comedi_device *dev,
/* Write mangled datum to appropriate DACOUT register. */
outw(pci230_ao_mangle_datum(dev, datum),
- devpriv->daqio + ((chan) == 0) ? PCI230_DACOUT1 : PCI230_DACOUT2);
+ devpriv->daqio + (chan == 0 ? PCI230_DACOUT1 : PCI230_DACOUT2));
}
static inline void pci230_ao_write_fifo(struct comedi_device *dev,
--
2.0.4
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: comedi: amplc_pci230: fix DACOUT write
2014-08-19 11:32 [PATCH] staging: comedi: amplc_pci230: fix DACOUT write Ian Abbott
@ 2014-09-08 19:14 ` Greg Kroah-Hartman
2014-09-08 19:34 ` Hartley Sweeten
0 siblings, 1 reply; 4+ messages in thread
From: Greg Kroah-Hartman @ 2014-09-08 19:14 UTC (permalink / raw)
To: Ian Abbott; +Cc: driverdev-devel, H Hartley Sweeten, linux-kernel
On Tue, Aug 19, 2014 at 12:32:36PM +0100, Ian Abbott wrote:
> Commit 4f9c63fe5333b27ab23ed399830c7977f6970744 ("staging: comedi:
> amplc_pci230: refactor iobase addresses") removed some parentheses
> (presumably to keep the line withing 80 chars) in
> `pci230_ao_write_nofifo()` when writing to the DACOUT1 or DACOUT2
> registers, but it removed the wrong parentheses. Fix it.
>
> Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
> ---
> This bug is in linux-next master and staging-next.
> ---
> drivers/staging/comedi/drivers/amplc_pci230.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/staging/comedi/drivers/amplc_pci230.c b/drivers/staging/comedi/drivers/amplc_pci230.c
> index 0fd212f..dd69e47 100644
> --- a/drivers/staging/comedi/drivers/amplc_pci230.c
> +++ b/drivers/staging/comedi/drivers/amplc_pci230.c
> @@ -628,7 +628,7 @@ static inline void pci230_ao_write_nofifo(struct comedi_device *dev,
>
> /* Write mangled datum to appropriate DACOUT register. */
> outw(pci230_ao_mangle_datum(dev, datum),
> - devpriv->daqio + ((chan) == 0) ? PCI230_DACOUT1 : PCI230_DACOUT2);
> + devpriv->daqio + (chan == 0 ? PCI230_DACOUT1 : PCI230_DACOUT2));
> }
>
> static inline void pci230_ao_write_fifo(struct comedi_device *dev,
> --
> 2.0.4
This doesn't apply to my tree anymore, is it still needed?
thanks,
greg k-h
^ permalink raw reply [flat|nested] 4+ messages in thread
* RE: [PATCH] staging: comedi: amplc_pci230: fix DACOUT write
2014-09-08 19:14 ` Greg Kroah-Hartman
@ 2014-09-08 19:34 ` Hartley Sweeten
2014-09-09 10:33 ` Ian Abbott
0 siblings, 1 reply; 4+ messages in thread
From: Hartley Sweeten @ 2014-09-08 19:34 UTC (permalink / raw)
To: Greg Kroah-Hartman, Ian Abbott; +Cc: driverdev-devel, linux-kernel
On Monday, September 08, 2014 12:15 PM, Greg Kroah-Hartman wrote:
> On Tue, Aug 19, 2014 at 12:32:36PM +0100, Ian Abbott wrote:
>> Commit 4f9c63fe5333b27ab23ed399830c7977f6970744 ("staging: comedi:
>> amplc_pci230: refactor iobase addresses") removed some parentheses
>> (presumably to keep the line withing 80 chars) in
>> `pci230_ao_write_nofifo()` when writing to the DACOUT1 or DACOUT2
>> registers, but it removed the wrong parentheses. Fix it.
>>
>> Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
>> ---
>> This bug is in linux-next master and staging-next.
>> ---
>> drivers/staging/comedi/drivers/amplc_pci230.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/staging/comedi/drivers/amplc_pci230.c b/drivers/staging/comedi/drivers/amplc_pci230.c
>> index 0fd212f..dd69e47 100644
>> --- a/drivers/staging/comedi/drivers/amplc_pci230.c
>> +++ b/drivers/staging/comedi/drivers/amplc_pci230.c
>> @@ -628,7 +628,7 @@ static inline void pci230_ao_write_nofifo(struct comedi_device *dev,
>>
>> /* Write mangled datum to appropriate DACOUT register. */
>> outw(pci230_ao_mangle_datum(dev, datum),
>> - devpriv->daqio + ((chan) == 0) ? PCI230_DACOUT1 : PCI230_DACOUT2);
>> + devpriv->daqio + (chan == 0 ? PCI230_DACOUT1 : PCI230_DACOUT2));
>> }
>>
>> static inline void pci230_ao_write_fifo(struct comedi_device *dev,
>> --
>> 2.0.4
>
> This doesn't apply to my tree anymore, is it still needed?
Looks like you already applied a similar patch from Dan Carpenter:
commit 94254d1baec765b22cc5df3a9a16a8cc9a79d406
Author: Dan Carpenter <dan.carpenter@oracle.com>
Date: Tue Aug 26 10:55:51 2014 +0300
staging: comedi: amplc_pci230: fix a precedence bug
Regards,
Hartley
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] staging: comedi: amplc_pci230: fix DACOUT write
2014-09-08 19:34 ` Hartley Sweeten
@ 2014-09-09 10:33 ` Ian Abbott
0 siblings, 0 replies; 4+ messages in thread
From: Ian Abbott @ 2014-09-09 10:33 UTC (permalink / raw)
To: Hartley Sweeten, Greg Kroah-Hartman; +Cc: driverdev-devel, linux-kernel
On 2014-09-08 20:34, Hartley Sweeten wrote:
> On Monday, September 08, 2014 12:15 PM, Greg Kroah-Hartman wrote:
>> On Tue, Aug 19, 2014 at 12:32:36PM +0100, Ian Abbott wrote:
>>> Commit 4f9c63fe5333b27ab23ed399830c7977f6970744 ("staging: comedi:
>>> amplc_pci230: refactor iobase addresses") removed some parentheses
>>> (presumably to keep the line withing 80 chars) in
>>> `pci230_ao_write_nofifo()` when writing to the DACOUT1 or DACOUT2
>>> registers, but it removed the wrong parentheses. Fix it.
>>>
>>> Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
>>> ---
>>> This bug is in linux-next master and staging-next.
>>> ---
>>> drivers/staging/comedi/drivers/amplc_pci230.c | 2 +-
>>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>>
>>> diff --git a/drivers/staging/comedi/drivers/amplc_pci230.c b/drivers/staging/comedi/drivers/amplc_pci230.c
>>> index 0fd212f..dd69e47 100644
>>> --- a/drivers/staging/comedi/drivers/amplc_pci230.c
>>> +++ b/drivers/staging/comedi/drivers/amplc_pci230.c
>>> @@ -628,7 +628,7 @@ static inline void pci230_ao_write_nofifo(struct comedi_device *dev,
>>>
>>> /* Write mangled datum to appropriate DACOUT register. */
>>> outw(pci230_ao_mangle_datum(dev, datum),
>>> - devpriv->daqio + ((chan) == 0) ? PCI230_DACOUT1 : PCI230_DACOUT2);
>>> + devpriv->daqio + (chan == 0 ? PCI230_DACOUT1 : PCI230_DACOUT2));
>>> }
>>>
>>> static inline void pci230_ao_write_fifo(struct comedi_device *dev,
>>> --
>>> 2.0.4
>>
>> This doesn't apply to my tree anymore, is it still needed?
>
> Looks like you already applied a similar patch from Dan Carpenter:
>
> commit 94254d1baec765b22cc5df3a9a16a8cc9a79d406
> Author: Dan Carpenter <dan.carpenter@oracle.com>
> Date: Tue Aug 26 10:55:51 2014 +0300
>
> staging: comedi: amplc_pci230: fix a precedence bug
No, it's no longer needed.
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Tel: +44 (0)161 477 1898 FAX: +44 (0)161 718 3587 )=-
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-09-09 10:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-08-19 11:32 [PATCH] staging: comedi: amplc_pci230: fix DACOUT write Ian Abbott
2014-09-08 19:14 ` Greg Kroah-Hartman
2014-09-08 19:34 ` Hartley Sweeten
2014-09-09 10:33 ` Ian Abbott
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).