mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH -next] ALSA: portman2x4: Use bitwise instead of arithmetic operator for flags
@ 2020-05-07  6:48 Samuel Zou
  2020-05-07  6:49 ` Joe Perches
  2020-05-07  7:07 ` Takashi Iwai
  0 siblings, 2 replies; 3+ messages in thread
From: Samuel Zou @ 2020-05-07  6:48 UTC (permalink / raw)
  To: perex, tiwai; +Cc: alsa-devel, linux-kernel, Samuel Zou

Fix the following coccinelle warning:

sound/drivers/portman2x4.c:460:34-35: WARNING: sum of probable bitmasks, consider |

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Samuel Zou <zou_wei@huawei.com>
---
 sound/drivers/portman2x4.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/drivers/portman2x4.c b/sound/drivers/portman2x4.c
index ecefa7c..38603cb 100644
--- a/sound/drivers/portman2x4.c
+++ b/sound/drivers/portman2x4.c
@@ -457,7 +457,7 @@ static int portman_probe(struct parport *p)
 
 	/* Set for RXDATA0 where no damage will be done. */
 	/* 5 */
-	parport_write_control(p, RXDATA0 + STROBE);	/* Write Strobe=1 to command reg. */
+	parport_write_control(p, RXDATA0 | STROBE);	/* Write Strobe=1 to command reg. */
 
 	/* 6 */
 	if ((parport_read_status(p) & ESTB) != ESTB)
-- 
2.6.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] ALSA: portman2x4: Use bitwise instead of arithmetic operator for flags
  2020-05-07  6:48 [PATCH -next] ALSA: portman2x4: Use bitwise instead of arithmetic operator for flags Samuel Zou
@ 2020-05-07  6:49 ` Joe Perches
  2020-05-07  7:07 ` Takashi Iwai
  1 sibling, 0 replies; 3+ messages in thread
From: Joe Perches @ 2020-05-07  6:49 UTC (permalink / raw)
  To: Samuel Zou, perex, tiwai; +Cc: alsa-devel, linux-kernel

On Thu, 2020-05-07 at 14:48 +0800, Samuel Zou wrote:
> Fix the following coccinelle warning:
> 
> sound/drivers/portman2x4.c:460:34-35: WARNING: sum of probable bitmasks, consider |

This one is reasonable.

> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Samuel Zou <zou_wei@huawei.com>
> ---
>  sound/drivers/portman2x4.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/sound/drivers/portman2x4.c b/sound/drivers/portman2x4.c
> index ecefa7c..38603cb 100644
> --- a/sound/drivers/portman2x4.c
> +++ b/sound/drivers/portman2x4.c
> @@ -457,7 +457,7 @@ static int portman_probe(struct parport *p)
>  
>  	/* Set for RXDATA0 where no damage will be done. */
>  	/* 5 */
> -	parport_write_control(p, RXDATA0 + STROBE);	/* Write Strobe=1 to command reg. */
> +	parport_write_control(p, RXDATA0 | STROBE);	/* Write Strobe=1 to command reg. */
>  
>  	/* 6 */
>  	if ((parport_read_status(p) & ESTB) != ESTB)


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] ALSA: portman2x4: Use bitwise instead of arithmetic operator for flags
  2020-05-07  6:48 [PATCH -next] ALSA: portman2x4: Use bitwise instead of arithmetic operator for flags Samuel Zou
  2020-05-07  6:49 ` Joe Perches
@ 2020-05-07  7:07 ` Takashi Iwai
  1 sibling, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2020-05-07  7:07 UTC (permalink / raw)
  To: Samuel Zou; +Cc: perex, tiwai, alsa-devel, linux-kernel

On Thu, 07 May 2020 08:48:55 +0200,
Samuel Zou wrote:
> 
> Fix the following coccinelle warning:
> 
> sound/drivers/portman2x4.c:460:34-35: WARNING: sum of probable bitmasks, consider |
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Samuel Zou <zou_wei@huawei.com>

Applied now.  Thanks.


Takashi

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-05-07  7:07 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-07  6:48 [PATCH -next] ALSA: portman2x4: Use bitwise instead of arithmetic operator for flags Samuel Zou
2020-05-07  6:49 ` Joe Perches
2020-05-07  7:07 ` Takashi Iwai

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®