alsa-devel.alsa-project.org archive mirror
 help / color / mirror / Atom feed
* [patch] ASoC: Intel: Skylake: Fix a shift wrapping bug
@ 2016-10-13  8:55 Dan Carpenter
  2016-10-18 13:56 ` Vinod Koul
  2016-10-26 10:15 ` Applied "ASoC: Intel: Skylake: Fix a shift wrapping bug" to the asoc tree Mark Brown
  0 siblings, 2 replies; 3+ messages in thread
From: Dan Carpenter @ 2016-10-13  8:55 UTC (permalink / raw)
  To: Liam Girdwood, Dharageswari R
  Cc: Mark Brown, Jaroslav Kysela, Takashi Iwai, Vinod Koul, Shreyas NC,
	Senthilnathan Veppur, Ramesh Babu, Colin Ian King, alsa-devel,
	kernel-janitors

"*val" is a u64.  It definitely looks like we intend to use the high 32
bits as well.

Fixes: 700a9a63f9c1 ("ASoC: Intel: Skylake: Add module instance id generation APIs")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

diff --git a/sound/soc/intel/skylake/skl-sst-utils.c b/sound/soc/intel/skylake/skl-sst-utils.c
index 8dc0303..ea162fb 100644
--- a/sound/soc/intel/skylake/skl-sst-utils.c
+++ b/sound/soc/intel/skylake/skl-sst-utils.c
@@ -179,7 +179,7 @@ static inline int skl_getid_32(struct uuid_module *module, u64 *val,
 		index = ffz(mask_val);
 		pvt_id = index + word1_mask + word2_mask;
 		if (pvt_id <= (max_inst - 1)) {
-			*val |= 1 << (index + word1_mask);
+			*val |= 1ULL << (index + word1_mask);
 			return pvt_id;
 		}
 	}

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

* Re: [patch] ASoC: Intel: Skylake: Fix a shift wrapping bug
  2016-10-13  8:55 [patch] ASoC: Intel: Skylake: Fix a shift wrapping bug Dan Carpenter
@ 2016-10-18 13:56 ` Vinod Koul
  2016-10-26 10:15 ` Applied "ASoC: Intel: Skylake: Fix a shift wrapping bug" to the asoc tree Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Vinod Koul @ 2016-10-18 13:56 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Liam Girdwood, Dharageswari R, Mark Brown, Jaroslav Kysela,
	Takashi Iwai, Shreyas NC, Senthilnathan Veppur, Ramesh Babu,
	Colin Ian King, alsa-devel, kernel-janitors, Kranthi G

On Thu, Oct 13, 2016 at 11:55:48AM +0300, Dan Carpenter wrote:
> "*val" is a u64.  It definitely looks like we intend to use the high 32
> bits as well.
> 
> Fixes: 700a9a63f9c1 ("ASoC: Intel: Skylake: Add module instance id generation APIs")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>

Acked-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Kranthi G <gudishax.kranthikumar@intel.com>

-- 
~Vinod

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

* Applied "ASoC: Intel: Skylake: Fix a shift wrapping bug" to the asoc tree
  2016-10-13  8:55 [patch] ASoC: Intel: Skylake: Fix a shift wrapping bug Dan Carpenter
  2016-10-18 13:56 ` Vinod Koul
@ 2016-10-26 10:15 ` Mark Brown
  1 sibling, 0 replies; 3+ messages in thread
From: Mark Brown @ 2016-10-26 10:15 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Vinod Koul, Kranthi G, Mark Brown, Liam Girdwood, Dharageswari R,
	alsa-devel

The patch

   ASoC: Intel: Skylake: Fix a shift wrapping bug

has been applied to the asoc tree at

   git://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 c8eabf821cac120afb78ca251b07cbf520406a7e Mon Sep 17 00:00:00 2001
From: Dan Carpenter <dan.carpenter@oracle.com>
Date: Thu, 13 Oct 2016 11:55:48 +0300
Subject: [PATCH] ASoC: Intel: Skylake: Fix a shift wrapping bug

"*val" is a u64.  It definitely looks like we intend to use the high 32
bits as well.

Fixes: 700a9a63f9c1 ("ASoC: Intel: Skylake: Add module instance id generation APIs")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Acked-by: Vinod Koul <vinod.koul@intel.com>
Tested-by: Kranthi G <gudishax.kranthikumar@intel.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
---
 sound/soc/intel/skylake/skl-sst-utils.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sound/soc/intel/skylake/skl-sst-utils.c b/sound/soc/intel/skylake/skl-sst-utils.c
index 8dc03039b311..ea162fbf68e5 100644
--- a/sound/soc/intel/skylake/skl-sst-utils.c
+++ b/sound/soc/intel/skylake/skl-sst-utils.c
@@ -179,7 +179,7 @@ static inline int skl_getid_32(struct uuid_module *module, u64 *val,
 		index = ffz(mask_val);
 		pvt_id = index + word1_mask + word2_mask;
 		if (pvt_id <= (max_inst - 1)) {
-			*val |= 1 << (index + word1_mask);
+			*val |= 1ULL << (index + word1_mask);
 			return pvt_id;
 		}
 	}
-- 
2.8.1


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

end of thread, other threads:[~2016-10-26 10:15 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-10-13  8:55 [patch] ASoC: Intel: Skylake: Fix a shift wrapping bug Dan Carpenter
2016-10-18 13:56 ` Vinod Koul
2016-10-26 10:15 ` Applied "ASoC: Intel: Skylake: Fix a shift wrapping bug" to the asoc tree Mark Brown

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