* sound/soc/intel/haswell/sst-haswell-ipc.c:856 sst_hsw_stream_set_volume() warn: should 'stream->reply.stream_hw_id << 16' be a 64 bit
@ 2020-07-26 7:40 kernel test robot
0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2020-07-26 7:40 UTC (permalink / raw)
To: kbuild
[-- Attachment #1: Type: text/plain, Size: 15916 bytes --]
CC: kbuild-all(a)lists.01.org
CC: linux-kernel(a)vger.kernel.org
TO: Cezary Rojewski <cezary.rojewski@intel.com>
CC: Mark Brown <broonie@kernel.org>
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 04300d66f0a06d572d9f2ad6768c38cabde22179
commit: abf31feea26c0f412a191c83f408311a0de7435c ASoC: Intel: Update request-reply IPC model
date: 12 months ago
:::::: branch date: 10 hours ago
:::::: commit date: 12 months ago
config: i386-randconfig-m031-20200726 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
Reported-by: Dan Carpenter <dan.carpenter@oracle.com>
smatch warnings:
sound/soc/intel/haswell/sst-haswell-ipc.c:856 sst_hsw_stream_set_volume() warn: should 'stream->reply.stream_hw_id << 16' be a 64 bit type?
sound/soc/intel/haswell/sst-haswell-ipc.c:858 sst_hsw_stream_set_volume() warn: should 'stage_id << 10' be a 64 bit type?
sound/soc/intel/haswell/sst-haswell-ipc.c:942 sst_hsw_mixer_set_volume() warn: should 'hsw->mixer_info.mixer_hw_id << 16' be a 64 bit type?
sound/soc/intel/haswell/sst-haswell-ipc.c:944 sst_hsw_mixer_set_volume() warn: should 'stage_id << 10' be a 64 bit type?
# https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=abf31feea26c0f412a191c83f408311a0de7435c
git remote add linus https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
git remote update linus
git checkout abf31feea26c0f412a191c83f408311a0de7435c
vim +856 sound/soc/intel/haswell/sst-haswell-ipc.c
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 840
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 841 /* stream volume */
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 842 int sst_hsw_stream_set_volume(struct sst_hsw *hsw,
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 843 struct sst_hsw_stream *stream, u32 stage_id, u32 channel, u32 volume)
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 844 {
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 845 struct sst_hsw_ipc_volume_req *req;
abf31feea26c0f4 sound/soc/intel/haswell/sst-haswell-ipc.c Cezary Rojewski 2019-07-23 846 struct sst_ipc_message request;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 847 int ret;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 848
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 849 trace_ipc_request("set stream volume", stream->reply.stream_hw_id);
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 850
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 851 if (channel >= 2 && channel != SST_HSW_CHANNELS_ALL)
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 852 return -EINVAL;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 853
abf31feea26c0f4 sound/soc/intel/haswell/sst-haswell-ipc.c Cezary Rojewski 2019-07-23 854 request.header = IPC_GLB_TYPE(IPC_GLB_STREAM_MESSAGE) |
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 855 IPC_STR_TYPE(IPC_STR_STAGE_MESSAGE);
abf31feea26c0f4 sound/soc/intel/haswell/sst-haswell-ipc.c Cezary Rojewski 2019-07-23 @856 request.header |= (stream->reply.stream_hw_id << IPC_STR_ID_SHIFT);
abf31feea26c0f4 sound/soc/intel/haswell/sst-haswell-ipc.c Cezary Rojewski 2019-07-23 857 request.header |= (IPC_STG_SET_VOLUME << IPC_STG_TYPE_SHIFT);
abf31feea26c0f4 sound/soc/intel/haswell/sst-haswell-ipc.c Cezary Rojewski 2019-07-23 @858 request.header |= (stage_id << IPC_STG_ID_SHIFT);
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 859
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 860 req = &stream->vol_req;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 861 req->target_volume = volume;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 862
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 863 /* set both at same time ? */
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 864 if (channel == SST_HSW_CHANNELS_ALL) {
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 865 if (hsw->mute[0] && hsw->mute[1]) {
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 866 hsw->mute_volume[0] = hsw->mute_volume[1] = volume;
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 867 return 0;
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 868 } else if (hsw->mute[0])
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 869 req->channel = 1;
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 870 else if (hsw->mute[1])
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 871 req->channel = 0;
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 872 else
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 873 req->channel = SST_HSW_CHANNELS_ALL;
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 874 } else {
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 875 /* set only 1 channel */
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 876 if (hsw->mute[channel]) {
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 877 hsw->mute_volume[channel] = volume;
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 878 return 0;
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 879 }
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 880 req->channel = channel;
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 881 }
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 882
abf31feea26c0f4 sound/soc/intel/haswell/sst-haswell-ipc.c Cezary Rojewski 2019-07-23 883 request.data = req;
abf31feea26c0f4 sound/soc/intel/haswell/sst-haswell-ipc.c Cezary Rojewski 2019-07-23 884 request.size = sizeof(*req);
abf31feea26c0f4 sound/soc/intel/haswell/sst-haswell-ipc.c Cezary Rojewski 2019-07-23 885 ret = sst_ipc_tx_message_wait(&hsw->ipc, request, NULL);
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 886 if (ret < 0) {
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 887 dev_err(hsw->dev, "error: set stream volume failed\n");
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 888 return ret;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 889 }
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 890
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 891 return 0;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 892 }
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 893
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 894 int sst_hsw_mixer_get_volume(struct sst_hsw *hsw, u32 stage_id, u32 channel,
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 895 u32 *volume)
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 896 {
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 897 if (channel > 1)
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 898 return -EINVAL;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 899
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 900 sst_dsp_read(hsw->dsp, volume,
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 901 hsw->mixer_info.volume_register_address[channel],
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 902 sizeof(*volume));
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 903
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 904 return 0;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 905 }
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 906
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 907 /* global mixer volume */
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 908 int sst_hsw_mixer_set_volume(struct sst_hsw *hsw, u32 stage_id, u32 channel,
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 909 u32 volume)
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 910 {
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 911 struct sst_hsw_ipc_volume_req req;
abf31feea26c0f4 sound/soc/intel/haswell/sst-haswell-ipc.c Cezary Rojewski 2019-07-23 912 struct sst_ipc_message request;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 913 int ret;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 914
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 915 trace_ipc_request("set mixer volume", volume);
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 916
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 917 if (channel >= 2 && channel != SST_HSW_CHANNELS_ALL)
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 918 return -EINVAL;
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 919
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 920 /* set both at same time ? */
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 921 if (channel == SST_HSW_CHANNELS_ALL) {
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 922 if (hsw->mute[0] && hsw->mute[1]) {
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 923 hsw->mute_volume[0] = hsw->mute_volume[1] = volume;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 924 return 0;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 925 } else if (hsw->mute[0])
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 926 req.channel = 1;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 927 else if (hsw->mute[1])
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 928 req.channel = 0;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 929 else
f1e5982546edf96 sound/soc/intel/sst-haswell-ipc.c Jie Yang 2014-11-25 930 req.channel = SST_HSW_CHANNELS_ALL;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 931 } else {
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 932 /* set only 1 channel */
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 933 if (hsw->mute[channel]) {
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 934 hsw->mute_volume[channel] = volume;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 935 return 0;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 936 }
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 937 req.channel = channel;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 938 }
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 939
abf31feea26c0f4 sound/soc/intel/haswell/sst-haswell-ipc.c Cezary Rojewski 2019-07-23 940 request.header = IPC_GLB_TYPE(IPC_GLB_STREAM_MESSAGE) |
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 941 IPC_STR_TYPE(IPC_STR_STAGE_MESSAGE);
abf31feea26c0f4 sound/soc/intel/haswell/sst-haswell-ipc.c Cezary Rojewski 2019-07-23 @942 request.header |= (hsw->mixer_info.mixer_hw_id << IPC_STR_ID_SHIFT);
abf31feea26c0f4 sound/soc/intel/haswell/sst-haswell-ipc.c Cezary Rojewski 2019-07-23 943 request.header |= (IPC_STG_SET_VOLUME << IPC_STG_TYPE_SHIFT);
abf31feea26c0f4 sound/soc/intel/haswell/sst-haswell-ipc.c Cezary Rojewski 2019-07-23 @944 request.header |= (stage_id << IPC_STG_ID_SHIFT);
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 945
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 946 req.curve_duration = hsw->curve_duration;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 947 req.curve_type = hsw->curve_type;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 948 req.target_volume = volume;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 949
abf31feea26c0f4 sound/soc/intel/haswell/sst-haswell-ipc.c Cezary Rojewski 2019-07-23 950 request.data = &req;
abf31feea26c0f4 sound/soc/intel/haswell/sst-haswell-ipc.c Cezary Rojewski 2019-07-23 951 request.size = sizeof(req);
abf31feea26c0f4 sound/soc/intel/haswell/sst-haswell-ipc.c Cezary Rojewski 2019-07-23 952 ret = sst_ipc_tx_message_wait(&hsw->ipc, request, NULL);
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 953 if (ret < 0) {
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 954 dev_err(hsw->dev, "error: set mixer volume failed\n");
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 955 return ret;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 956 }
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 957
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 958 return 0;
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 959 }
a4b12990b680792 sound/soc/intel/sst-haswell-ipc.c Mark Brown 2014-03-12 960
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 33330 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2020-07-26 7:40 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-26 7:40 sound/soc/intel/haswell/sst-haswell-ipc.c:856 sst_hsw_stream_set_volume() warn: should 'stream->reply.stream_hw_id << 16' be a 64 bit kernel test robot
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.