All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 3/3] ASoC: fix regwmask
       [not found] <CGME20200330073600epcas2p3712a5e92d86a524bedda790f2e273935@epcas2p3.samsung.com>
@ 2020-03-30  7:35 ` 이경택
  2020-03-30 17:22   ` Applied "ASoC: fix regwmask" to the asoc tree Mark Brown
                     ` (3 more replies)
  0 siblings, 4 replies; 6+ messages in thread
From: 이경택 @ 2020-03-30  7:35 UTC (permalink / raw)
  To: lgirdwood, broonie, tiwai; +Cc: alsa-devel

If regwshift is 32 and the selected architecture compiles '<<' operator
for signed int literal into rotating shift, '1<<regwshift' became 1 and
it makes regwmask to 0x0.
The literal is set to unsigned long to get intended regwmask.

Signed-off-by: Gyeongtaek Lee <gt82.lee@samsung.com>
---
 sound/soc/soc-ops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c
index 652657dc6809..55ffb34be95e 100644
--- a/sound/soc/soc-ops.c
+++ b/sound/soc/soc-ops.c
@@ -825,7 +825,7 @@ int snd_soc_get_xr_sx(struct snd_kcontrol *kcontrol,
 	unsigned int regbase = mc->regbase;
 	unsigned int regcount = mc->regcount;
 	unsigned int regwshift = component->val_bytes * BITS_PER_BYTE;
-	unsigned int regwmask = (1<<regwshift)-1;
+	unsigned int regwmask = (1UL<<regwshift)-1;
 	unsigned int invert = mc->invert;
 	unsigned long mask = (1UL<<mc->nbits)-1;
 	long min = mc->min;
@@ -874,7 +874,7 @@ int snd_soc_put_xr_sx(struct snd_kcontrol *kcontrol,
 	unsigned int regbase = mc->regbase;
 	unsigned int regcount = mc->regcount;
 	unsigned int regwshift = component->val_bytes * BITS_PER_BYTE;
-	unsigned int regwmask = (1<<regwshift)-1;
+	unsigned int regwmask = (1UL<<regwshift)-1;
 	unsigned int invert = mc->invert;
 	unsigned long mask = (1UL<<mc->nbits)-1;
 	long max = mc->max;
-- 
2.21.0



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

* Applied "ASoC: fix regwmask" to the asoc tree
  2020-03-30  7:35 ` [PATCH 3/3] ASoC: fix regwmask 이경택
@ 2020-03-30 17:22   ` Mark Brown
  2020-03-31  5:27   ` [PATCH 3/3] ASoC: fix regwmask 이경택
                     ` (2 subsequent siblings)
  3 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2020-03-30 17:22 UTC (permalink / raw)
  To: 이경택
  Cc: alsa-devel, Mark Brown, tiwai, Gyeongtaek Lee, lgirdwood

The patch

   ASoC: fix regwmask

has been applied to the asoc tree at

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/sound.git 

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.  

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

From 0ab070917afdc93670c2d0ea02ab6defb6246a7c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=EC=9D=B4=EA=B2=BD=ED=83=9D?= <gt82.lee@samsung.com>
Date: Mon, 30 Mar 2020 16:35:59 +0900
Subject: [PATCH] ASoC: fix regwmask

If regwshift is 32 and the selected architecture compiles '<<' operator
for signed int literal into rotating shift, '1<<regwshift' became 1 and
it makes regwmask to 0x0.
The literal is set to unsigned long to get intended regwmask.

Signed-off-by: Gyeongtaek Lee <gt82.lee@samsung.com>
Link: https://lore.kernel.org/r/001001d60665$db7af3e0$9270dba0$@samsung.com
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/soc-ops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c
index 652657dc6809..55ffb34be95e 100644
--- a/sound/soc/soc-ops.c
+++ b/sound/soc/soc-ops.c
@@ -825,7 +825,7 @@ int snd_soc_get_xr_sx(struct snd_kcontrol *kcontrol,
 	unsigned int regbase = mc->regbase;
 	unsigned int regcount = mc->regcount;
 	unsigned int regwshift = component->val_bytes * BITS_PER_BYTE;
-	unsigned int regwmask = (1<<regwshift)-1;
+	unsigned int regwmask = (1UL<<regwshift)-1;
 	unsigned int invert = mc->invert;
 	unsigned long mask = (1UL<<mc->nbits)-1;
 	long min = mc->min;
@@ -874,7 +874,7 @@ int snd_soc_put_xr_sx(struct snd_kcontrol *kcontrol,
 	unsigned int regbase = mc->regbase;
 	unsigned int regcount = mc->regcount;
 	unsigned int regwshift = component->val_bytes * BITS_PER_BYTE;
-	unsigned int regwmask = (1<<regwshift)-1;
+	unsigned int regwmask = (1UL<<regwshift)-1;
 	unsigned int invert = mc->invert;
 	unsigned long mask = (1UL<<mc->nbits)-1;
 	long max = mc->max;
-- 
2.20.1


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

* RE: [PATCH 3/3] ASoC: fix regwmask
  2020-03-30  7:35 ` [PATCH 3/3] ASoC: fix regwmask 이경택
  2020-03-30 17:22   ` Applied "ASoC: fix regwmask" to the asoc tree Mark Brown
@ 2020-03-31  5:27   ` 이경택
  2020-03-31  5:42   ` 이경택
  2020-03-31  6:51   ` 이경택
  3 siblings, 0 replies; 6+ messages in thread
From: 이경택 @ 2020-03-31  5:27 UTC (permalink / raw)
  To: lgirdwood, broonie, tiwai; +Cc: alsa-devel



-----Original Message-----
From: Alsa-devel <alsa-devel-bounces@alsa-project.org> On Behalf Of 이경택
Sent: Monday, March 30, 2020 4:36 PM
To: lgirdwood@gmail.com; broonie@kernel.org; tiwai@suse.com
Cc: alsa-devel@alsa-project.org
Subject: [PATCH 3/3] ASoC: fix regwmask

If regwshift is 32 and the selected architecture compiles '<<' operator for
signed int literal into rotating shift, '1<<regwshift' became 1 and it
makes regwmask to 0x0.
The literal is set to unsigned long to get intended regwmask.

Signed-off-by: Gyeongtaek Lee <gt82.lee@samsung.com>
---
 sound/soc/soc-ops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c index
652657dc6809..55ffb34be95e 100644
--- a/sound/soc/soc-ops.c
+++ b/sound/soc/soc-ops.c
@@ -825,7 +825,7 @@ int snd_soc_get_xr_sx(struct snd_kcontrol *kcontrol,
 	unsigned int regbase = mc->regbase;
 	unsigned int regcount = mc->regcount;
 	unsigned int regwshift = component->val_bytes * BITS_PER_BYTE;
-	unsigned int regwmask = (1<<regwshift)-1;
+	unsigned int regwmask = (1UL<<regwshift)-1;
 	unsigned int invert = mc->invert;
 	unsigned long mask = (1UL<<mc->nbits)-1;
 	long min = mc->min;
@@ -874,7 +874,7 @@ int snd_soc_put_xr_sx(struct snd_kcontrol *kcontrol,
 	unsigned int regbase = mc->regbase;
 	unsigned int regcount = mc->regcount;
 	unsigned int regwshift = component->val_bytes * BITS_PER_BYTE;
-	unsigned int regwmask = (1<<regwshift)-1;
+	unsigned int regwmask = (1UL<<regwshift)-1;
 	unsigned int invert = mc->invert;
 	unsigned long mask = (1UL<<mc->nbits)-1;
 	long max = mc->max;
--
2.21.0





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

* [PATCH 3/3] ASoC: fix regwmask
  2020-03-30  7:35 ` [PATCH 3/3] ASoC: fix regwmask 이경택
  2020-03-30 17:22   ` Applied "ASoC: fix regwmask" to the asoc tree Mark Brown
  2020-03-31  5:27   ` [PATCH 3/3] ASoC: fix regwmask 이경택
@ 2020-03-31  5:42   ` 이경택
  2020-03-31  6:51   ` 이경택
  3 siblings, 0 replies; 6+ messages in thread
From: 이경택 @ 2020-03-31  5:42 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, lgirdwood, tiwai, hmseo, tkjung, pilsun.jang

If regwshift is 32 and the selected architecture compiles '<<' operator for
signed int literal into rotating shift, '1<<regwshift' became 1 and it
makes regwmask to 0x0.
The literal is set to unsigned long to get intended regwmask.

Signed-off-by: Gyeongtaek Lee <gt82.lee@samsung.com>
---
 sound/soc/soc-ops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c index
652657dc6809..55ffb34be95e 100644
--- a/sound/soc/soc-ops.c
+++ b/sound/soc/soc-ops.c
@@ -825,7 +825,7 @@ int snd_soc_get_xr_sx(struct snd_kcontrol *kcontrol,
 	unsigned int regbase = mc->regbase;
 	unsigned int regcount = mc->regcount;
 	unsigned int regwshift = component->val_bytes * BITS_PER_BYTE;
-	unsigned int regwmask = (1<<regwshift)-1;
+	unsigned int regwmask = (1UL<<regwshift)-1;
 	unsigned int invert = mc->invert;
 	unsigned long mask = (1UL<<mc->nbits)-1;
 	long min = mc->min;
@@ -874,7 +874,7 @@ int snd_soc_put_xr_sx(struct snd_kcontrol *kcontrol,
 	unsigned int regbase = mc->regbase;
 	unsigned int regcount = mc->regcount;
 	unsigned int regwshift = component->val_bytes * BITS_PER_BYTE;
-	unsigned int regwmask = (1<<regwshift)-1;
+	unsigned int regwmask = (1UL<<regwshift)-1;
 	unsigned int invert = mc->invert;
 	unsigned long mask = (1UL<<mc->nbits)-1;
 	long max = mc->max;
--
2.21.0




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

* [PATCH 3/3] ASoC: fix regwmask
  2020-03-30  7:35 ` [PATCH 3/3] ASoC: fix regwmask 이경택
                     ` (2 preceding siblings ...)
  2020-03-31  5:42   ` 이경택
@ 2020-03-31  6:51   ` 이경택
  2020-03-31 11:38     ` Mark Brown
  3 siblings, 1 reply; 6+ messages in thread
From: 이경택 @ 2020-03-31  6:51 UTC (permalink / raw)
  To: broonie; +Cc: alsa-devel, lgirdwood, tiwai, hmseo, tkjung, pilsun.jang

If regwshift is 32 and the selected architecture compiles '<<' operator for signed int literal into rotating shift, '1<<regwshift'
became 1 and it makes regwmask to 0x0.
The literal is set to unsigned long to get intended regwmask.

Signed-off-by: Gyeongtaek Lee <gt82.lee@samsung.com>
---
 sound/soc/soc-ops.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sound/soc/soc-ops.c b/sound/soc/soc-ops.c index 652657dc6809..55ffb34be95e 100644
--- a/sound/soc/soc-ops.c
+++ b/sound/soc/soc-ops.c
@@ -825,7 +825,7 @@ int snd_soc_get_xr_sx(struct snd_kcontrol *kcontrol,
 	unsigned int regbase = mc->regbase;
 	unsigned int regcount = mc->regcount;
 	unsigned int regwshift = component->val_bytes * BITS_PER_BYTE;
-	unsigned int regwmask = (1<<regwshift)-1;
+	unsigned int regwmask = (1UL<<regwshift)-1;
 	unsigned int invert = mc->invert;
 	unsigned long mask = (1UL<<mc->nbits)-1;
 	long min = mc->min;
@@ -874,7 +874,7 @@ int snd_soc_put_xr_sx(struct snd_kcontrol *kcontrol,
 	unsigned int regbase = mc->regbase;
 	unsigned int regcount = mc->regcount;
 	unsigned int regwshift = component->val_bytes * BITS_PER_BYTE;
-	unsigned int regwmask = (1<<regwshift)-1;
+	unsigned int regwmask = (1UL<<regwshift)-1;
 	unsigned int invert = mc->invert;
 	unsigned long mask = (1UL<<mc->nbits)-1;
 	long max = mc->max;
--
2.21.0




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

* Re: [PATCH 3/3] ASoC: fix regwmask
  2020-03-31  6:51   ` 이경택
@ 2020-03-31 11:38     ` Mark Brown
  0 siblings, 0 replies; 6+ messages in thread
From: Mark Brown @ 2020-03-31 11:38 UTC (permalink / raw)
  To: �̰���
  Cc: alsa-devel, lgirdwood, tiwai, hmseo, tkjung, pilsun.jang

[-- Attachment #1: Type: text/plain, Size: 608 bytes --]

On Tue, Mar 31, 2020 at 03:51:01PM +0900, �̰��� wrote:
> If regwshift is 32 and the selected architecture compiles '<<' operator for signed int literal into rotating shift, '1<<regwshift'
> became 1 and it makes regwmask to 0x0.
> The literal is set to unsigned long to get intended regwmask.

Please do not submit new versions of already applied patches, please
submit incremental updates to the existing code.  Modifying existing
commits creates problems for other users building on top of those
commits so it's best practice to only change pubished git commits if
absolutely essential.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

end of thread, other threads:[~2020-03-31 11:39 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CGME20200330073600epcas2p3712a5e92d86a524bedda790f2e273935@epcas2p3.samsung.com>
2020-03-30  7:35 ` [PATCH 3/3] ASoC: fix regwmask 이경택
2020-03-30 17:22   ` Applied "ASoC: fix regwmask" to the asoc tree Mark Brown
2020-03-31  5:27   ` [PATCH 3/3] ASoC: fix regwmask 이경택
2020-03-31  5:42   ` 이경택
2020-03-31  6:51   ` 이경택
2020-03-31 11:38     ` Mark Brown

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.