diff options
author | Dan Carpenter <dan.carpenter@oracle.com> | 2015-04-09 05:02:39 -0400 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2015-04-09 05:58:06 -0400 |
commit | 75afbd052b3675e9b812f9327e19be63f3e7b5de (patch) | |
tree | f736cef4a386321e6bd11005c7a29a6e8ef8e044 | |
parent | 1f544fd8ff377127a512e20358045cc9b92c245c (diff) |
ASoC: Intel: do cast earlier in sst_cdev_tstamp()
My static checker complains about these because it looks like the
multiply can overflow and then we cast to a larger data type. I don't
think this is a problem, but it's also harmless to do the cast earlier
so let's silence the static checker warning.
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
-rw-r--r-- | sound/soc/intel/atom/sst/sst_drv_interface.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sound/soc/intel/atom/sst/sst_drv_interface.c b/sound/soc/intel/atom/sst/sst_drv_interface.c index 718838b3fc24..7b50a9d17ec1 100644 --- a/sound/soc/intel/atom/sst/sst_drv_interface.c +++ b/sound/soc/intel/atom/sst/sst_drv_interface.c | |||
@@ -381,7 +381,7 @@ static int sst_cdev_tstamp(struct device *dev, unsigned int str_id, | |||
381 | tstamp->copied_total = fw_tstamp.ring_buffer_counter; | 381 | tstamp->copied_total = fw_tstamp.ring_buffer_counter; |
382 | tstamp->pcm_frames = fw_tstamp.frames_decoded; | 382 | tstamp->pcm_frames = fw_tstamp.frames_decoded; |
383 | tstamp->pcm_io_frames = div_u64(fw_tstamp.hardware_counter, | 383 | tstamp->pcm_io_frames = div_u64(fw_tstamp.hardware_counter, |
384 | (u64)((stream->num_ch) * SST_GET_BYTES_PER_SAMPLE(24))); | 384 | (u64)stream->num_ch * SST_GET_BYTES_PER_SAMPLE(24)); |
385 | tstamp->sampling_rate = fw_tstamp.sampling_frequency; | 385 | tstamp->sampling_rate = fw_tstamp.sampling_frequency; |
386 | 386 | ||
387 | dev_dbg(dev, "PCM = %u\n", tstamp->pcm_io_frames); | 387 | dev_dbg(dev, "PCM = %u\n", tstamp->pcm_io_frames); |