linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] ALSA: sound/ppc: Use bitwise instead of arithmetic operator for flags
@ 2020-05-07  3:54 Samuel Zou
  2020-05-07  7:06 ` Takashi Iwai
  0 siblings, 1 reply; 2+ messages in thread
From: Samuel Zou @ 2020-05-07  3:54 UTC (permalink / raw)
  To: perex, tiwai, mpe, benh, paulus
  Cc: alsa-devel, linuxppc-dev, linux-kernel, Samuel Zou

Fix the following coccinelle warnings:

sound/ppc/pmac.c:729:57-58: WARNING: sum of probable bitmasks, consider |
sound/ppc/pmac.c:229:37-38: WARNING: sum of probable bitmasks, consider |

Reported-by: Hulk Robot <hulkci@huawei.com>
Signed-off-by: Samuel Zou <zou_wei@huawei.com>
---
 sound/ppc/pmac.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/ppc/pmac.c b/sound/ppc/pmac.c
index 592532c..2e750b3 100644
--- a/sound/ppc/pmac.c
+++ b/sound/ppc/pmac.c
@@ -226,7 +226,7 @@ static int snd_pmac_pcm_prepare(struct snd_pmac *chip, struct pmac_stream *rec,
 		offset += rec->period_size;
 	}
 	/* make loop */
-	cp->command = cpu_to_le16(DBDMA_NOP + BR_ALWAYS);
+	cp->command = cpu_to_le16(DBDMA_NOP | BR_ALWAYS);
 	cp->cmd_dep = cpu_to_le32(rec->cmd.addr);
 
 	snd_pmac_dma_stop(rec);
@@ -726,7 +726,7 @@ void snd_pmac_beep_dma_start(struct snd_pmac *chip, int bytes, unsigned long add
 	chip->extra_dma.cmds->xfer_status = cpu_to_le16(0);
 	chip->extra_dma.cmds->cmd_dep = cpu_to_le32(chip->extra_dma.addr);
 	chip->extra_dma.cmds->phy_addr = cpu_to_le32(addr);
-	chip->extra_dma.cmds->command = cpu_to_le16(OUTPUT_MORE + BR_ALWAYS);
+	chip->extra_dma.cmds->command = cpu_to_le16(OUTPUT_MORE | BR_ALWAYS);
 	out_le32(&chip->awacs->control,
 		 (in_le32(&chip->awacs->control) & ~0x1f00)
 		 | (speed << 8));
-- 
2.6.2


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

* Re: [PATCH -next] ALSA: sound/ppc: Use bitwise instead of arithmetic operator for flags
  2020-05-07  3:54 [PATCH -next] ALSA: sound/ppc: Use bitwise instead of arithmetic operator for flags Samuel Zou
@ 2020-05-07  7:06 ` Takashi Iwai
  0 siblings, 0 replies; 2+ messages in thread
From: Takashi Iwai @ 2020-05-07  7:06 UTC (permalink / raw)
  To: Samuel Zou
  Cc: perex, tiwai, mpe, benh, paulus, alsa-devel, linuxppc-dev, linux-kernel

On Thu, 07 May 2020 05:54:07 +0200,
Samuel Zou wrote:
> 
> Fix the following coccinelle warnings:
> 
> sound/ppc/pmac.c:729:57-58: WARNING: sum of probable bitmasks, consider |
> sound/ppc/pmac.c:229:37-38: WARNING: sum of probable bitmasks, consider |
> 
> Reported-by: Hulk Robot <hulkci@huawei.com>
> Signed-off-by: Samuel Zou <zou_wei@huawei.com>

Applied, thanks.


Takashi

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

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

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

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).