* [PATCH] Staging: comedi: adl_pci9118.c : fixed code style issue
@ 2017-11-18 17:46 Fabian Baumanis
2017-11-20 11:12 ` Ian Abbott
2017-11-24 15:53 ` Greg KH
0 siblings, 2 replies; 3+ messages in thread
From: Fabian Baumanis @ 2017-11-18 17:46 UTC (permalink / raw)
To: gregkh; +Cc: abbotti, devel, linux-kernel, hsweeten, larturus
Removed uneccessary parantheses which were sorrounding two
if-statements.
Signed-off-by: Fabian Baumanis <baumanisf@gmail.com>
---
drivers/staging/comedi/drivers/adl_pci9118.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c
index 1cc9b7e..c77b994 100644
--- a/drivers/staging/comedi/drivers/adl_pci9118.c
+++ b/drivers/staging/comedi/drivers/adl_pci9118.c
@@ -946,8 +946,7 @@ static int pci9118_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
devpriv->ai_add_back = 0;
if (devpriv->master) {
devpriv->usedma = 1;
- if ((cmd->flags & CMDF_WAKE_EOS) &&
- (cmd->scan_end_arg == 1)) {
+ if (cmd->flags & CMDF_WAKE_EOS && cmd->scan_end_arg == 1) {
if (cmd->convert_src == TRIG_NOW)
devpriv->ai_add_back = 1;
if (cmd->convert_src == TRIG_TIMER) {
--
2.7.4
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH] Staging: comedi: adl_pci9118.c : fixed code style issue
2017-11-18 17:46 [PATCH] Staging: comedi: adl_pci9118.c : fixed code style issue Fabian Baumanis
@ 2017-11-20 11:12 ` Ian Abbott
2017-11-24 15:53 ` Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Ian Abbott @ 2017-11-20 11:12 UTC (permalink / raw)
To: Fabian Baumanis, gregkh; +Cc: devel, linux-kernel, hsweeten, larturus
On 18/11/17 17:46, Fabian Baumanis wrote:
> Removed uneccessary parantheses which were sorrounding two
> if-statements.
There is only one 'if' statement changed by the patch. Apart from that
(and the typos in the patch description), the patch is fine as far as it
goes. However, the checkpatch script identifies several similar
"unnecessary parentheses" issues in this file, and it would be better to
take care of them all with a single patch rather than patching them one
at a time.
>
> Signed-off-by: Fabian Baumanis <baumanisf@gmail.com>
> ---
> drivers/staging/comedi/drivers/adl_pci9118.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c
> index 1cc9b7e..c77b994 100644
> --- a/drivers/staging/comedi/drivers/adl_pci9118.c
> +++ b/drivers/staging/comedi/drivers/adl_pci9118.c
> @@ -946,8 +946,7 @@ static int pci9118_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
> devpriv->ai_add_back = 0;
> if (devpriv->master) {
> devpriv->usedma = 1;
> - if ((cmd->flags & CMDF_WAKE_EOS) &&
> - (cmd->scan_end_arg == 1)) {
> + if (cmd->flags & CMDF_WAKE_EOS && cmd->scan_end_arg == 1) {
> if (cmd->convert_src == TRIG_NOW)
> devpriv->ai_add_back = 1;
> if (cmd->convert_src == TRIG_TIMER) {
>
--
-=( Ian Abbott @ MEV Ltd. E-mail: <abbotti@mev.co.uk> )=-
-=( Web: http://www.mev.co.uk/ )=-
^ permalink raw reply [flat|nested] 3+ messages in thread* Re: [PATCH] Staging: comedi: adl_pci9118.c : fixed code style issue
2017-11-18 17:46 [PATCH] Staging: comedi: adl_pci9118.c : fixed code style issue Fabian Baumanis
2017-11-20 11:12 ` Ian Abbott
@ 2017-11-24 15:53 ` Greg KH
1 sibling, 0 replies; 3+ messages in thread
From: Greg KH @ 2017-11-24 15:53 UTC (permalink / raw)
To: Fabian Baumanis; +Cc: abbotti, devel, linux-kernel, hsweeten, larturus
On Sat, Nov 18, 2017 at 06:46:38PM +0100, Fabian Baumanis wrote:
> Removed uneccessary parantheses which were sorrounding two
> if-statements.
>
> Signed-off-by: Fabian Baumanis <baumanisf@gmail.com>
> ---
> drivers/staging/comedi/drivers/adl_pci9118.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/staging/comedi/drivers/adl_pci9118.c b/drivers/staging/comedi/drivers/adl_pci9118.c
> index 1cc9b7e..c77b994 100644
> --- a/drivers/staging/comedi/drivers/adl_pci9118.c
> +++ b/drivers/staging/comedi/drivers/adl_pci9118.c
> @@ -946,8 +946,7 @@ static int pci9118_ai_cmd(struct comedi_device *dev, struct comedi_subdevice *s)
> devpriv->ai_add_back = 0;
> if (devpriv->master) {
> devpriv->usedma = 1;
> - if ((cmd->flags & CMDF_WAKE_EOS) &&
> - (cmd->scan_end_arg == 1)) {
> + if (cmd->flags & CMDF_WAKE_EOS && cmd->scan_end_arg == 1) {
Ick, no, now I need to remember which has higher precedence, "&" or
"&&". It's "&" right? I should not have to go look it up.
The code as-is is just fine.
thanks,
greg k-h
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-11-24 15:53 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-11-18 17:46 [PATCH] Staging: comedi: adl_pci9118.c : fixed code style issue Fabian Baumanis
2017-11-20 11:12 ` Ian Abbott
2017-11-24 15:53 ` Greg KH
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.