mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Joe Perches <joe@perches.com>
Cc: linux-kernel@vger.kernel.org,
	Thibaut Varene <T-Bone@parisc-linux.org>,
	Jaroslav Kysela <perex@perex.cz>,
	linux-parisc@vger.kernel.org, alsa-devel@alsa-project.org
Subject: Re: [PATCH 11/11] sound: ad1889: Fix probable mask then right shift defects
Date: Mon, 27 Oct 2014 08:41:20 +0100	[thread overview]
Message-ID: <s5hbnoy7ye7.wl-tiwai@suse.de> (raw)
In-Reply-To: <20f33139e87eb74f0ac50d0503a241936d4e0ff5.1414387334.git.joe@perches.com>

At Sun, 26 Oct 2014 22:25:07 -0700,
Joe Perches wrote:
> 
> Precedence of & and >> is not the same and is not left to right.
> shift has higher precedence and should be done after the mask.
> 
> Add parentheses around the mask.
> 
> Signed-off-by: Joe Perches <joe@perches.com>

Thanks, applied.


Takashi


> ---
>  sound/pci/ad1889.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/sound/pci/ad1889.c b/sound/pci/ad1889.c
> index 7bfdf9c..1610c38 100644
> --- a/sound/pci/ad1889.c
> +++ b/sound/pci/ad1889.c
> @@ -681,7 +681,7 @@ snd_ad1889_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffe
>  	
>  	/* WARQ is at offset 12 */
>  	tmp = (reg & AD_DS_WSMC_WARQ) ?
> -			(((reg & AD_DS_WSMC_WARQ >> 12) & 0x01) ? 12 : 18) : 4;
> +		((((reg & AD_DS_WSMC_WARQ) >> 12) & 0x01) ? 12 : 18) : 4;
>  	tmp /= (reg & AD_DS_WSMC_WAST) ? 2 : 1;
>  	
>  	snd_iprintf(buffer, "Wave FIFO: %d %s words\n\n", tmp,
> @@ -693,7 +693,7 @@ snd_ad1889_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffe
>  	
>  	/* SYRQ is at offset 4 */
>  	tmp = (reg & AD_DS_WSMC_SYRQ) ?
> -			(((reg & AD_DS_WSMC_SYRQ >> 4) & 0x01) ? 12 : 18) : 4;
> +		((((reg & AD_DS_WSMC_SYRQ) >> 4) & 0x01) ? 12 : 18) : 4;
>  	tmp /= (reg & AD_DS_WSMC_WAST) ? 2 : 1;
>  	
>  	snd_iprintf(buffer, "Synthesis FIFO: %d %s words\n\n", tmp,
> @@ -709,7 +709,7 @@ snd_ad1889_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffe
>  	
>  	/* ACRQ is at offset 4 */
>  	tmp = (reg & AD_DS_RAMC_ACRQ) ?
> -			(((reg & AD_DS_RAMC_ACRQ >> 4) & 0x01) ? 12 : 18) : 4;
> +		((((reg & AD_DS_RAMC_ACRQ) >> 4) & 0x01) ? 12 : 18) : 4;
>  	tmp /= (reg & AD_DS_RAMC_ADST) ? 2 : 1;
>  	
>  	snd_iprintf(buffer, "ADC FIFO: %d %s words\n\n", tmp,
> @@ -720,7 +720,7 @@ snd_ad1889_proc_read(struct snd_info_entry *entry, struct snd_info_buffer *buffe
>  			
>  	/* RERQ is at offset 12 */
>  	tmp = (reg & AD_DS_RAMC_RERQ) ?
> -			(((reg & AD_DS_RAMC_RERQ >> 12) & 0x01) ? 12 : 18) : 4;
> +		((((reg & AD_DS_RAMC_RERQ) >> 12) & 0x01) ? 12 : 18) : 4;
>  	tmp /= (reg & AD_DS_RAMC_ADST) ? 2 : 1;
>  	
>  	snd_iprintf(buffer, "Resampler FIFO: %d %s words\n\n", tmp,
> -- 
> 2.1.2
> 

      reply	other threads:[~2014-10-27  7:41 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-27  5:24 [PATCH 00/11] treewide: mask then shift defects and style updates Joe Perches
2014-10-27  5:24 ` [PATCH 01/11] block: nvme-scsi: Fix probable mask then right shift defects Joe Perches
2014-11-10 19:33   ` Verma, Vishal L
2014-10-27  5:24 ` [PATCH 02/11] radeon: evergreen: " Joe Perches
2014-10-27  9:14   ` Michel Dänzer
2014-10-27 14:14     ` [PATCH 02/11 V2] radeon: evergreen: Fix probable mask then right shift defect Joe Perches
2014-10-28  3:42       ` Michel Dänzer
2014-10-28 14:06       ` Alex Deucher
2014-10-29  3:03         ` Michel Dänzer
2014-10-27  5:24 ` [PATCH 03/11] aiptek: Fix probable mask then right shift defects Joe Perches
2014-10-27 14:44   ` Dmitry Torokhov
2014-10-27 17:56     ` Joe Perches
2014-10-27 18:01       ` Dmitry Torokhov
2014-10-27 18:03         ` Joe Perches
2014-10-27  5:25 ` [PATCH 04/11] dvb-net: " Joe Perches
2014-10-27  5:25 ` [PATCH 05/11] cx25840/cx18: Use standard ordering of mask and shift Joe Perches
2014-11-08 13:41   ` Andy Walls
2014-10-27  5:25 ` [PATCH 06/11] wm8350-core: Fix probable mask then right shift defect Joe Perches
2014-10-27 12:47   ` Charles Keepax
2014-11-03 18:02   ` Lee Jones
2014-10-27  5:25 ` [PATCH 07/11] iwlwifi: dvm: " Joe Perches
2014-10-27  6:14   ` Grumbach, Emmanuel
2014-10-27  5:25 ` [PATCH 08/11] ssb: driver_chip_comon_pmu: " Joe Perches
2014-10-27 17:32   ` Michael Büsch
2014-10-27  5:25 ` [PATCH 09/11] tty: ipwireless: Fix probable mask then right shift defects Joe Perches
2014-10-27 13:18   ` David Sterba
2014-10-27 14:17   ` Jiri Kosina
2014-10-28  1:57     ` Greg Kroah-Hartman
2014-10-27  5:25 ` [PATCH 10/11] hwa-hc: Fix probable mask then right shift defect Joe Perches
2014-10-27  5:25 ` [PATCH 11/11] sound: ad1889: Fix probable mask then right shift defects Joe Perches
2014-10-27  7:41   ` Takashi Iwai [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=s5hbnoy7ye7.wl-tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=T-Bone@parisc-linux.org \
    --cc=alsa-devel@alsa-project.org \
    --cc=joe@perches.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-parisc@vger.kernel.org \
    --cc=perex@perex.cz \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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®