Re: [PATCH] drm/vmwgfx: use min_t to replace min
by kernel test robot
Hi Bernard,
Thank you for the patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.10-rc4 next-20201118]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/Bernard-Zhao/drm-vmwgfx-use-min_...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 0fa8ee0d9ab95c9350b8b84574824d9a384a9f7d
config: i386-randconfig-a012-20201118 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
reproduce (this is a W=1 build):
# https://github.com/0day-ci/linux/commit/7de055295e38f294671f936d65719c021...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Bernard-Zhao/drm-vmwgfx-use-min_t-to-replace-min/20201118-191834
git checkout 7de055295e38f294671f936d65719c02195251ca
# save the attached .config to linux build tree
make W=1 ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All errors (new ones prefixed by >>):
drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c: In function 'vmw_gmr2_bind':
include/linux/minmax.h:110:46: error: expected expression before ')' token
110 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
| ^
include/linux/minmax.h:18:21: note: in definition of macro '__typecheck'
18 | (!!(sizeof((typeof(x) *)1 == (typeof(y) *)1)))
| ^
include/linux/minmax.h:42:24: note: in expansion of macro '__safe_cmp'
42 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/minmax.h:110:27: note: in expansion of macro '__careful_cmp'
110 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
| ^~~~~~~~~~~~~
drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c:75:22: note: in expansion of macro 'min_t'
75 | unsigned long nr = min_t((unsigned long), num_pages, VMW_PPN_PER_REMAP);
| ^~~~~
include/linux/minmax.h:110:46: error: expected expression before ')' token
110 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
| ^
include/linux/minmax.h:26:48: note: in definition of macro '__is_constexpr'
26 | (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
| ^
include/linux/minmax.h:32:25: note: in expansion of macro '__no_side_effects'
32 | (__typecheck(x, y) && __no_side_effects(x, y))
| ^~~~~~~~~~~~~~~~~
include/linux/minmax.h:42:24: note: in expansion of macro '__safe_cmp'
42 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/minmax.h:110:27: note: in expansion of macro '__careful_cmp'
110 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
| ^~~~~~~~~~~~~
drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c:75:22: note: in expansion of macro 'min_t'
75 | unsigned long nr = min_t((unsigned long), num_pages, VMW_PPN_PER_REMAP);
| ^~~~~
include/linux/minmax.h:110:57: error: expected expression before ')' token
110 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
| ^
include/linux/minmax.h:26:48: note: in definition of macro '__is_constexpr'
26 | (sizeof(int) == sizeof(*(8 ? ((void *)((long)(x) * 0l)) : (int *)8)))
| ^
include/linux/minmax.h:32:25: note: in expansion of macro '__no_side_effects'
32 | (__typecheck(x, y) && __no_side_effects(x, y))
| ^~~~~~~~~~~~~~~~~
include/linux/minmax.h:42:24: note: in expansion of macro '__safe_cmp'
42 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~
include/linux/minmax.h:110:27: note: in expansion of macro '__careful_cmp'
110 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
| ^~~~~~~~~~~~~
drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c:75:22: note: in expansion of macro 'min_t'
75 | unsigned long nr = min_t((unsigned long), num_pages, VMW_PPN_PER_REMAP);
| ^~~~~
include/linux/minmax.h:110:46: error: expected expression before ')' token
110 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
| ^
include/linux/minmax.h:34:27: note: in definition of macro '__cmp'
34 | #define __cmp(x, y, op) ((x) op (y) ? (x) : (y))
| ^
include/linux/minmax.h:110:27: note: in expansion of macro '__careful_cmp'
110 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
| ^~~~~~~~~~~~~
drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c:75:22: note: in expansion of macro 'min_t'
75 | unsigned long nr = min_t((unsigned long), num_pages, VMW_PPN_PER_REMAP);
| ^~~~~
include/linux/minmax.h:110:46: error: expected expression before ')' token
110 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
| ^
include/linux/minmax.h:37:10: note: in definition of macro '__cmp_once'
37 | typeof(x) unique_x = (x); \
| ^
include/linux/minmax.h:110:27: note: in expansion of macro '__careful_cmp'
110 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
| ^~~~~~~~~~~~~
drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c:75:22: note: in expansion of macro 'min_t'
75 | unsigned long nr = min_t((unsigned long), num_pages, VMW_PPN_PER_REMAP);
| ^~~~~
include/linux/minmax.h:110:57: error: expected expression before ')' token
110 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
| ^
include/linux/minmax.h:38:10: note: in definition of macro '__cmp_once'
38 | typeof(y) unique_y = (y); \
| ^
include/linux/minmax.h:110:27: note: in expansion of macro '__careful_cmp'
110 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
| ^~~~~~~~~~~~~
drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c:75:22: note: in expansion of macro 'min_t'
75 | unsigned long nr = min_t((unsigned long), num_pages, VMW_PPN_PER_REMAP);
| ^~~~~
include/linux/minmax.h:110:57: error: expected expression before ')' token
110 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
| ^
include/linux/minmax.h:38:25: note: in definition of macro '__cmp_once'
38 | typeof(y) unique_y = (y); \
| ^
include/linux/minmax.h:110:27: note: in expansion of macro '__careful_cmp'
110 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
| ^~~~~~~~~~~~~
drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c:75:22: note: in expansion of macro 'min_t'
75 | unsigned long nr = min_t((unsigned long), num_pages, VMW_PPN_PER_REMAP);
| ^~~~~
>> include/linux/compiler-gcc.h:47:45: error: '__UNIQUE_ID___x264' undeclared (first use in this function); did you mean '__UNIQUE_ID___y265'?
47 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~~~~~~
include/linux/minmax.h:34:27: note: in definition of macro '__cmp'
34 | #define __cmp(x, y, op) ((x) op (y) ? (x) : (y))
| ^
include/linux/minmax.h:44:3: note: in expansion of macro '__cmp_once'
44 | __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
| ^~~~~~~~~~
include/linux/compiler_types.h:60:22: note: in expansion of macro '___PASTE'
60 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:47:29: note: in expansion of macro '__PASTE'
47 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
include/linux/compiler_types.h:60:22: note: in expansion of macro '___PASTE'
60 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:47:37: note: in expansion of macro '__PASTE'
47 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
include/linux/minmax.h:44:20: note: in expansion of macro '__UNIQUE_ID'
44 | __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
| ^~~~~~~~~~~
include/linux/minmax.h:110:27: note: in expansion of macro '__careful_cmp'
110 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
| ^~~~~~~~~~~~~
drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c:75:22: note: in expansion of macro 'min_t'
75 | unsigned long nr = min_t((unsigned long), num_pages, VMW_PPN_PER_REMAP);
| ^~~~~
include/linux/compiler-gcc.h:47:45: note: each undeclared identifier is reported only once for each function it appears in
47 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~~~~~~
include/linux/minmax.h:34:27: note: in definition of macro '__cmp'
34 | #define __cmp(x, y, op) ((x) op (y) ? (x) : (y))
| ^
include/linux/minmax.h:44:3: note: in expansion of macro '__cmp_once'
44 | __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
| ^~~~~~~~~~
include/linux/compiler_types.h:60:22: note: in expansion of macro '___PASTE'
60 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:47:29: note: in expansion of macro '__PASTE'
47 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
include/linux/compiler_types.h:60:22: note: in expansion of macro '___PASTE'
60 | #define __PASTE(a,b) ___PASTE(a,b)
| ^~~~~~~~
include/linux/compiler-gcc.h:47:37: note: in expansion of macro '__PASTE'
47 | #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
| ^~~~~~~
include/linux/minmax.h:44:20: note: in expansion of macro '__UNIQUE_ID'
44 | __cmp_once(x, y, __UNIQUE_ID(__x), __UNIQUE_ID(__y), op))
| ^~~~~~~~~~~
include/linux/minmax.h:110:27: note: in expansion of macro '__careful_cmp'
110 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
| ^~~~~~~~~~~~~
drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c:75:22: note: in expansion of macro 'min_t'
75 | unsigned long nr = min_t((unsigned long), num_pages, VMW_PPN_PER_REMAP);
| ^~~~~
include/linux/minmax.h:42:2: error: first argument to '__builtin_choose_expr' not a constant
42 | __builtin_choose_expr(__safe_cmp(x, y), \
| ^~~~~~~~~~~~~~~~~~~~~
include/linux/minmax.h:110:27: note: in expansion of macro '__careful_cmp'
110 | #define min_t(type, x, y) __careful_cmp((type)(x), (type)(y), <)
| ^~~~~~~~~~~~~
drivers/gpu/drm/vmwgfx/vmwgfx_gmr.c:75:22: note: in expansion of macro 'min_t'
75 | unsigned long nr = min_t((unsigned long), num_pages, VMW_PPN_PER_REMAP);
| ^~~~~
vim +47 include/linux/compiler-gcc.h
87358710c1fb4f1 David Woodhouse 2018-02-19 46
cb984d101b30eb7 Joe Perches 2015-06-25 @47 #define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__)
cb984d101b30eb7 Joe Perches 2015-06-25 48
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[android-common:android-4.19-stable 15791/19507] sound/soc/soc-dapm.c:3698:12: warning: stack frame size of 2088 bytes in function 'snd_soc_dai_link_event'
by kernel test robot
Hi Greg,
FYI, the error/warning still remains.
tree: https://android.googlesource.com/kernel/common android-4.19-stable
head: 7f0c07bea50da99ebb98f126b9537225268f176e
commit: b8539473ea414eaa4ef28791fa308a6ab8c5d67c [15791/19507] ANDROID: GKI: workqueue.h: add Android ABI padding to some structures
config: x86_64-randconfig-a015-20201118 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b2613fb2f0f53691dd0211895afbb9413457fca7)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android-4.19-stable
git checkout b8539473ea414eaa4ef28791fa308a6ab8c5d67c
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> sound/soc/soc-dapm.c:3698:12: warning: stack frame size of 2088 bytes in function 'snd_soc_dai_link_event' [-Wframe-larger-than=]
static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,
^
1 warning generated.
vim +/snd_soc_dai_link_event +3698 sound/soc/soc-dapm.c
4ba1327ab8ce179 Mark Brown 2008-05-13 3697
c74184ed30ecce2 Mark Brown 2012-04-04 @3698 static int snd_soc_dai_link_event(struct snd_soc_dapm_widget *w,
c74184ed30ecce2 Mark Brown 2012-04-04 3699 struct snd_kcontrol *kcontrol, int event)
c74184ed30ecce2 Mark Brown 2012-04-04 3700 {
c74184ed30ecce2 Mark Brown 2012-04-04 3701 struct snd_soc_dapm_path *source_p, *sink_p;
c74184ed30ecce2 Mark Brown 2012-04-04 3702 struct snd_soc_dai *source, *sink;
249dc49576fc953 Charles Keepax 2018-08-15 3703 struct snd_soc_pcm_runtime *rtd = w->priv;
c66150824b8a809 Nikesh Oswal 2015-02-02 3704 const struct snd_soc_pcm_stream *config = w->params + w->params_select;
c74184ed30ecce2 Mark Brown 2012-04-04 3705 struct snd_pcm_substream substream;
9747cec21e2d55e Mark Brown 2012-04-26 3706 struct snd_pcm_hw_params *params = NULL;
8053f21675b073b Nicolin Chen 2016-07-26 3707 struct snd_pcm_runtime *runtime = NULL;
3ba66feb59810e2 Takashi Iwai 2018-07-25 3708 unsigned int fmt;
0376916b7b2cff6 Charles Keepax 2018-09-06 3709 int ret = 0;
c74184ed30ecce2 Mark Brown 2012-04-04 3710
bf4edea863c435c Takashi Iwai 2013-11-07 3711 if (WARN_ON(!config) ||
a3423b02cf745c1 Lars-Peter Clausen 2015-08-11 3712 WARN_ON(list_empty(&w->edges[SND_SOC_DAPM_DIR_OUT]) ||
a3423b02cf745c1 Lars-Peter Clausen 2015-08-11 3713 list_empty(&w->edges[SND_SOC_DAPM_DIR_IN])))
bf4edea863c435c Takashi Iwai 2013-11-07 3714 return -EINVAL;
c74184ed30ecce2 Mark Brown 2012-04-04 3715
c74184ed30ecce2 Mark Brown 2012-04-04 3716 /* We only support a single source and sink, pick the first */
a3423b02cf745c1 Lars-Peter Clausen 2015-08-11 3717 source_p = list_first_entry(&w->edges[SND_SOC_DAPM_DIR_OUT],
a3423b02cf745c1 Lars-Peter Clausen 2015-08-11 3718 struct snd_soc_dapm_path,
a3423b02cf745c1 Lars-Peter Clausen 2015-08-11 3719 list_node[SND_SOC_DAPM_DIR_OUT]);
a3423b02cf745c1 Lars-Peter Clausen 2015-08-11 3720 sink_p = list_first_entry(&w->edges[SND_SOC_DAPM_DIR_IN],
a3423b02cf745c1 Lars-Peter Clausen 2015-08-11 3721 struct snd_soc_dapm_path,
a3423b02cf745c1 Lars-Peter Clausen 2015-08-11 3722 list_node[SND_SOC_DAPM_DIR_IN]);
c74184ed30ecce2 Mark Brown 2012-04-04 3723
c74184ed30ecce2 Mark Brown 2012-04-04 3724 source = source_p->source->priv;
c74184ed30ecce2 Mark Brown 2012-04-04 3725 sink = sink_p->sink->priv;
c74184ed30ecce2 Mark Brown 2012-04-04 3726
c74184ed30ecce2 Mark Brown 2012-04-04 3727 /* Be a little careful as we don't want to overflow the mask array */
c74184ed30ecce2 Mark Brown 2012-04-04 3728 if (config->formats) {
c74184ed30ecce2 Mark Brown 2012-04-04 3729 fmt = ffs(config->formats) - 1;
c74184ed30ecce2 Mark Brown 2012-04-04 3730 } else {
30a6a1a4eed170b Liam Girdwood 2012-11-19 3731 dev_warn(w->dapm->dev, "ASoC: Invalid format %llx specified\n",
c74184ed30ecce2 Mark Brown 2012-04-04 3732 config->formats);
c74184ed30ecce2 Mark Brown 2012-04-04 3733 fmt = 0;
c74184ed30ecce2 Mark Brown 2012-04-04 3734 }
c74184ed30ecce2 Mark Brown 2012-04-04 3735
c74184ed30ecce2 Mark Brown 2012-04-04 3736 /* Currently very limited parameter selection */
9747cec21e2d55e Mark Brown 2012-04-26 3737 params = kzalloc(sizeof(*params), GFP_KERNEL);
9747cec21e2d55e Mark Brown 2012-04-26 3738 if (!params) {
9747cec21e2d55e Mark Brown 2012-04-26 3739 ret = -ENOMEM;
9747cec21e2d55e Mark Brown 2012-04-26 3740 goto out;
9747cec21e2d55e Mark Brown 2012-04-26 3741 }
9747cec21e2d55e Mark Brown 2012-04-26 3742 snd_mask_set(hw_param_mask(params, SNDRV_PCM_HW_PARAM_FORMAT), fmt);
c74184ed30ecce2 Mark Brown 2012-04-04 3743
9747cec21e2d55e Mark Brown 2012-04-26 3744 hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE)->min =
c74184ed30ecce2 Mark Brown 2012-04-04 3745 config->rate_min;
9747cec21e2d55e Mark Brown 2012-04-26 3746 hw_param_interval(params, SNDRV_PCM_HW_PARAM_RATE)->max =
c74184ed30ecce2 Mark Brown 2012-04-04 3747 config->rate_max;
c74184ed30ecce2 Mark Brown 2012-04-04 3748
9747cec21e2d55e Mark Brown 2012-04-26 3749 hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS)->min
c74184ed30ecce2 Mark Brown 2012-04-04 3750 = config->channels_min;
9747cec21e2d55e Mark Brown 2012-04-26 3751 hw_param_interval(params, SNDRV_PCM_HW_PARAM_CHANNELS)->max
c74184ed30ecce2 Mark Brown 2012-04-04 3752 = config->channels_max;
c74184ed30ecce2 Mark Brown 2012-04-04 3753
c74184ed30ecce2 Mark Brown 2012-04-04 3754 memset(&substream, 0, sizeof(substream));
c74184ed30ecce2 Mark Brown 2012-04-04 3755
8053f21675b073b Nicolin Chen 2016-07-26 3756 /* Allocate a dummy snd_pcm_runtime for startup() and other ops() */
8053f21675b073b Nicolin Chen 2016-07-26 3757 runtime = kzalloc(sizeof(*runtime), GFP_KERNEL);
8053f21675b073b Nicolin Chen 2016-07-26 3758 if (!runtime) {
8053f21675b073b Nicolin Chen 2016-07-26 3759 ret = -ENOMEM;
8053f21675b073b Nicolin Chen 2016-07-26 3760 goto out;
8053f21675b073b Nicolin Chen 2016-07-26 3761 }
8053f21675b073b Nicolin Chen 2016-07-26 3762 substream.runtime = runtime;
249dc49576fc953 Charles Keepax 2018-08-15 3763 substream.private_data = rtd;
8053f21675b073b Nicolin Chen 2016-07-26 3764
c74184ed30ecce2 Mark Brown 2012-04-04 3765 switch (event) {
c74184ed30ecce2 Mark Brown 2012-04-04 3766 case SND_SOC_DAPM_PRE_PMU:
c74184ed30ecce2 Mark Brown 2012-04-04 3767 substream.stream = SNDRV_PCM_STREAM_CAPTURE;
9900a4226c785db Kuninori Morimoto 2017-09-25 3768 if (source->driver->ops->startup) {
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3769 ret = source->driver->ops->startup(&substream, source);
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3770 if (ret < 0) {
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3771 dev_err(source->dev,
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3772 "ASoC: startup() failed: %d\n", ret);
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3773 goto out;
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3774 }
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3775 source->active++;
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3776 }
93e6958a3674d2f Benoit Cousson 2014-07-08 3777 ret = soc_dai_hw_params(&substream, params, source);
93e6958a3674d2f Benoit Cousson 2014-07-08 3778 if (ret < 0)
9747cec21e2d55e Mark Brown 2012-04-26 3779 goto out;
c74184ed30ecce2 Mark Brown 2012-04-04 3780
c74184ed30ecce2 Mark Brown 2012-04-04 3781 substream.stream = SNDRV_PCM_STREAM_PLAYBACK;
9900a4226c785db Kuninori Morimoto 2017-09-25 3782 if (sink->driver->ops->startup) {
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3783 ret = sink->driver->ops->startup(&substream, sink);
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3784 if (ret < 0) {
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3785 dev_err(sink->dev,
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3786 "ASoC: startup() failed: %d\n", ret);
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3787 goto out;
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3788 }
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3789 sink->active++;
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3790 }
93e6958a3674d2f Benoit Cousson 2014-07-08 3791 ret = soc_dai_hw_params(&substream, params, sink);
93e6958a3674d2f Benoit Cousson 2014-07-08 3792 if (ret < 0)
9747cec21e2d55e Mark Brown 2012-04-26 3793 goto out;
c74184ed30ecce2 Mark Brown 2012-04-04 3794 break;
c74184ed30ecce2 Mark Brown 2012-04-04 3795
c74184ed30ecce2 Mark Brown 2012-04-04 3796 case SND_SOC_DAPM_POST_PMU:
da18396f949ecaa Mark Brown 2013-02-06 3797 ret = snd_soc_dai_digital_mute(sink, 0,
da18396f949ecaa Mark Brown 2013-02-06 3798 SNDRV_PCM_STREAM_PLAYBACK);
c74184ed30ecce2 Mark Brown 2012-04-04 3799 if (ret != 0 && ret != -ENOTSUPP)
30a6a1a4eed170b Liam Girdwood 2012-11-19 3800 dev_warn(sink->dev, "ASoC: Failed to unmute: %d\n", ret);
9747cec21e2d55e Mark Brown 2012-04-26 3801 ret = 0;
c74184ed30ecce2 Mark Brown 2012-04-04 3802 break;
c74184ed30ecce2 Mark Brown 2012-04-04 3803
c74184ed30ecce2 Mark Brown 2012-04-04 3804 case SND_SOC_DAPM_PRE_PMD:
da18396f949ecaa Mark Brown 2013-02-06 3805 ret = snd_soc_dai_digital_mute(sink, 1,
da18396f949ecaa Mark Brown 2013-02-06 3806 SNDRV_PCM_STREAM_PLAYBACK);
c74184ed30ecce2 Mark Brown 2012-04-04 3807 if (ret != 0 && ret != -ENOTSUPP)
30a6a1a4eed170b Liam Girdwood 2012-11-19 3808 dev_warn(sink->dev, "ASoC: Failed to mute: %d\n", ret);
9747cec21e2d55e Mark Brown 2012-04-26 3809 ret = 0;
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3810
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3811 source->active--;
9900a4226c785db Kuninori Morimoto 2017-09-25 3812 if (source->driver->ops->shutdown) {
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3813 substream.stream = SNDRV_PCM_STREAM_CAPTURE;
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3814 source->driver->ops->shutdown(&substream, source);
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3815 }
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3816
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3817 sink->active--;
9900a4226c785db Kuninori Morimoto 2017-09-25 3818 if (sink->driver->ops->shutdown) {
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3819 substream.stream = SNDRV_PCM_STREAM_PLAYBACK;
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3820 sink->driver->ops->shutdown(&substream, sink);
9b8ef9f6b3fcccc Jeeja KP 2015-10-20 3821 }
c74184ed30ecce2 Mark Brown 2012-04-04 3822 break;
c74184ed30ecce2 Mark Brown 2012-04-04 3823
c74184ed30ecce2 Mark Brown 2012-04-04 3824 default:
a6ed0608bd289b4 Takashi Iwai 2013-11-06 3825 WARN(1, "Unknown event %d\n", event);
75881df3fd7708f Sudip Mukherjee 2015-09-10 3826 ret = -EINVAL;
c74184ed30ecce2 Mark Brown 2012-04-04 3827 }
c74184ed30ecce2 Mark Brown 2012-04-04 3828
9747cec21e2d55e Mark Brown 2012-04-26 3829 out:
8053f21675b073b Nicolin Chen 2016-07-26 3830 kfree(runtime);
9747cec21e2d55e Mark Brown 2012-04-26 3831 kfree(params);
9747cec21e2d55e Mark Brown 2012-04-26 3832 return ret;
c74184ed30ecce2 Mark Brown 2012-04-04 3833 }
c74184ed30ecce2 Mark Brown 2012-04-04 3834
:::::: The code at line 3698 was first introduced by commit
:::::: c74184ed30ecce2a5e9ae9aa22cb5e3942e0c7c7 ASoC: core: Support transparent CODEC<->CODEC DAI links
:::::: TO: Mark Brown <broonie(a)opensource.wolfsonmicro.com>
:::::: CC: Mark Brown <broonie(a)opensource.wolfsonmicro.com>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[tnguy-next-queue:dev-queue 29/94] drivers/net/ethernet/intel/ice/ice_flow.c:1703:1: warning: the frame size of 4104 bytes is larger than 1024 bytes
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git dev-queue
head: de0223bde011b2f6da54bfb8e087ac6718a32c8a
commit: 8452a38dcac801e875b13334d886dcf404fb4d33 [29/94] ice: create ACL entry
config: csky-randconfig-p002-20201117 (attached as .config)
compiler: csky-linux-gcc (GCC) 9.3.0
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git/comm...
git remote add tnguy-next-queue https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue.git
git fetch --no-tags tnguy-next-queue dev-queue
git checkout 8452a38dcac801e875b13334d886dcf404fb4d33
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=csky
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/net/ethernet/intel/ice/ice_flow.c: In function 'ice_flow_acl_frmt_entry':
>> drivers/net/ethernet/intel/ice/ice_flow.c:1703:1: warning: the frame size of 4104 bytes is larger than 1024 bytes [-Wframe-larger-than=]
1703 | }
| ^
vim +1703 drivers/net/ethernet/intel/ice/ice_flow.c
1544
1545 /**
1546 * ice_flow_acl_frmt_entry - Format ACL entry
1547 * @hw: pointer to the hardware structure
1548 * @prof: pointer to flow profile
1549 * @e: pointer to the flow entry
1550 * @data: pointer to a data buffer containing flow entry's match values/masks
1551 * @acts: array of actions to be performed on a match
1552 * @acts_cnt: number of actions
1553 *
1554 * Formats the key (and key_inverse) to be matched from the data passed in,
1555 * along with data from the flow profile. This key/key_inverse pair makes up
1556 * the 'entry' for an ACL flow entry.
1557 */
1558 static enum ice_status
1559 ice_flow_acl_frmt_entry(struct ice_hw *hw, struct ice_flow_prof *prof,
1560 struct ice_flow_entry *e, u8 *data,
1561 struct ice_flow_action *acts, u8 acts_cnt)
1562 {
1563 u8 *buf = NULL, *dontcare = NULL, *key = NULL, range = 0, dir_flag_msk;
1564 struct ice_aqc_acl_profile_ranges *range_buf = NULL;
1565 enum ice_status status;
1566 bool cnt_alloc;
1567 u8 prof_id = 0;
1568 u16 i, buf_sz;
1569
1570 status = ice_flow_get_hw_prof(hw, ICE_BLK_ACL, prof->id, &prof_id);
1571 if (status)
1572 return status;
1573
1574 /* Format the result action */
1575
1576 status = ice_flow_acl_check_actions(hw, acts, acts_cnt, &cnt_alloc);
1577 if (status)
1578 return status;
1579
1580 status = ICE_ERR_NO_MEMORY;
1581
1582 e->acts = devm_kmemdup(ice_hw_to_dev(hw), acts,
1583 acts_cnt * sizeof(*acts), GFP_KERNEL);
1584 if (!e->acts)
1585 goto out;
1586
1587 e->acts_cnt = acts_cnt;
1588
1589 /* Format the matching data */
1590 buf_sz = prof->cfg.scen->width;
1591 buf = kzalloc(buf_sz, GFP_KERNEL);
1592 if (!buf)
1593 goto out;
1594
1595 dontcare = kzalloc(buf_sz, GFP_KERNEL);
1596 if (!dontcare)
1597 goto out;
1598
1599 /* 'key' buffer will store both key and key_inverse, so must be twice
1600 * size of buf
1601 */
1602 key = devm_kzalloc(ice_hw_to_dev(hw), buf_sz * 2, GFP_KERNEL);
1603 if (!key)
1604 goto out;
1605
1606 range_buf = devm_kzalloc(ice_hw_to_dev(hw),
1607 sizeof(struct ice_aqc_acl_profile_ranges),
1608 GFP_KERNEL);
1609 if (!range_buf)
1610 goto out;
1611
1612 /* Set don't care mask to all 1's to start, will zero out used bytes */
1613 memset(dontcare, 0xff, buf_sz);
1614
1615 for (i = 0; i < prof->segs_cnt; i++) {
1616 struct ice_flow_seg_info *seg = &prof->segs[i];
1617 u8 j;
1618
1619 for_each_set_bit(j, (unsigned long *)&seg->match,
1620 ICE_FLOW_FIELD_IDX_MAX) {
1621 struct ice_flow_fld_info *info = &seg->fields[j];
1622
1623 if (info->type == ICE_FLOW_FLD_TYPE_RANGE)
1624 ice_flow_acl_frmt_entry_range(j, info,
1625 range_buf, data,
1626 &range);
1627 else
1628 ice_flow_acl_frmt_entry_fld(j, info, buf,
1629 dontcare, data);
1630 }
1631
1632 for (j = 0; j < seg->raws_cnt; j++) {
1633 struct ice_flow_fld_info *info = &seg->raws[j].info;
1634 u16 dst, src, mask, k;
1635 bool use_mask = false;
1636
1637 src = info->src.val;
1638 dst = info->entry.val -
1639 ICE_AQC_ACL_PROF_BYTE_SEL_START_IDX;
1640 mask = info->src.mask;
1641
1642 if (mask != ICE_FLOW_FLD_OFF_INVAL)
1643 use_mask = true;
1644
1645 for (k = 0; k < info->entry.last; k++, dst++) {
1646 buf[dst] = data[src++];
1647 if (use_mask)
1648 dontcare[dst] = ~data[mask++];
1649 else
1650 dontcare[dst] = 0;
1651 }
1652 }
1653 }
1654
1655 buf[prof->cfg.scen->pid_idx] = (u8)prof_id;
1656 dontcare[prof->cfg.scen->pid_idx] = 0;
1657
1658 /* Format the buffer for direction flags */
1659 dir_flag_msk = BIT(ICE_FLG_PKT_DIR);
1660
1661 if (prof->dir == ICE_FLOW_RX)
1662 buf[prof->cfg.scen->pkt_dir_idx] = dir_flag_msk;
1663
1664 if (range) {
1665 buf[prof->cfg.scen->rng_chk_idx] = range;
1666 /* Mark any unused range checkers as don't care */
1667 dontcare[prof->cfg.scen->rng_chk_idx] = ~range;
1668 e->range_buf = range_buf;
1669 } else {
1670 devm_kfree(ice_hw_to_dev(hw), range_buf);
1671 }
1672
1673 status = ice_set_key(key, buf_sz * 2, buf, NULL, dontcare, NULL, 0,
1674 buf_sz);
1675 if (status)
1676 goto out;
1677
1678 e->entry = key;
1679 e->entry_sz = buf_sz * 2;
1680
1681 out:
1682 kfree(buf);
1683 kfree(dontcare);
1684
1685 if (status && key)
1686 devm_kfree(ice_hw_to_dev(hw), key);
1687
1688 if (status && range_buf) {
1689 devm_kfree(ice_hw_to_dev(hw), range_buf);
1690 e->range_buf = NULL;
1691 }
1692
1693 if (status && e->acts) {
1694 devm_kfree(ice_hw_to_dev(hw), e->acts);
1695 e->acts = NULL;
1696 e->acts_cnt = 0;
1697 }
1698
1699 if (status && cnt_alloc)
1700 ice_flow_acl_free_act_cntr(hw, acts, acts_cnt);
1701
1702 return status;
> 1703 }
1704 /**
1705 * ice_flow_add_entry - Add a flow entry
1706 * @hw: pointer to the HW struct
1707 * @blk: classification stage
1708 * @prof_id: ID of the profile to add a new flow entry to
1709 * @entry_id: unique ID to identify this flow entry
1710 * @vsi_handle: software VSI handle for the flow entry
1711 * @prio: priority of the flow entry
1712 * @data: pointer to a data buffer containing flow entry's match values/masks
1713 * @acts: arrays of actions to be performed on a match
1714 * @acts_cnt: number of actions
1715 * @entry_h: pointer to buffer that receives the new flow entry's handle
1716 */
1717 enum ice_status
1718 ice_flow_add_entry(struct ice_hw *hw, enum ice_block blk, u64 prof_id,
1719 u64 entry_id, u16 vsi_handle, enum ice_flow_priority prio,
1720 void *data, struct ice_flow_action *acts, u8 acts_cnt,
1721 u64 *entry_h)
1722 {
1723 struct ice_flow_entry *e = NULL;
1724 struct ice_flow_prof *prof;
1725 enum ice_status status;
1726
1727 /* ACL entries must indicate an action */
1728 if (blk == ICE_BLK_ACL && (!acts || !acts_cnt))
1729 return ICE_ERR_PARAM;
1730
1731 /* No flow entry data is expected for RSS */
1732 if (!entry_h || (!data && blk != ICE_BLK_RSS))
1733 return ICE_ERR_BAD_PTR;
1734
1735 if (!ice_is_vsi_valid(hw, vsi_handle))
1736 return ICE_ERR_PARAM;
1737
1738 mutex_lock(&hw->fl_profs_locks[blk]);
1739
1740 prof = ice_flow_find_prof_id(hw, blk, prof_id);
1741 if (!prof) {
1742 status = ICE_ERR_DOES_NOT_EXIST;
1743 } else {
1744 /* Allocate memory for the entry being added and associate
1745 * the VSI to the found flow profile
1746 */
1747 e = devm_kzalloc(ice_hw_to_dev(hw), sizeof(*e), GFP_KERNEL);
1748 if (!e)
1749 status = ICE_ERR_NO_MEMORY;
1750 else
1751 status = ice_flow_assoc_prof(hw, blk, prof, vsi_handle);
1752 }
1753
1754 mutex_unlock(&hw->fl_profs_locks[blk]);
1755 if (status)
1756 goto out;
1757
1758 e->id = entry_id;
1759 e->vsi_handle = vsi_handle;
1760 e->prof = prof;
1761 e->priority = prio;
1762
1763 switch (blk) {
1764 case ICE_BLK_FD:
1765 case ICE_BLK_RSS:
1766 break;
1767 case ICE_BLK_ACL:
1768 /* ACL will handle the entry management */
1769 status = ice_flow_acl_frmt_entry(hw, prof, e, (u8 *)data, acts,
1770 acts_cnt);
1771 if (status)
1772 goto out;
1773 break;
1774 default:
1775 status = ICE_ERR_NOT_IMPL;
1776 goto out;
1777 }
1778
1779 if (blk != ICE_BLK_ACL) {
1780 /* ACL will handle the entry management */
1781 mutex_lock(&prof->entries_lock);
1782 list_add(&e->l_entry, &prof->entries);
1783 mutex_unlock(&prof->entries_lock);
1784 }
1785
1786 *entry_h = ICE_FLOW_ENTRY_HNDL(e);
1787
1788 out:
1789 if (status && e) {
1790 if (e->entry)
1791 devm_kfree(ice_hw_to_dev(hw), e->entry);
1792 devm_kfree(ice_hw_to_dev(hw), e);
1793 }
1794
1795 return status;
1796 }
1797
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[ribalda:uvc-noncontiguous 5/5] drivers/media/usb/uvc/uvc_video.c:1763:17: warning: incompatible integer to pointer conversion assigning to 'struct page from 'int'
by kernel test robot
tree: https://github.com/ribalda/linux uvc-noncontiguous
head: 08aff4b45dd51b3dfba18af4aa40b0fa5e2b5529
commit: 08aff4b45dd51b3dfba18af4aa40b0fa5e2b5529 [5/5] WIP media: uvc: Use dma_alloc_noncontiguos API
config: powerpc64-randconfig-r011-20201118 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b2613fb2f0f53691dd0211895afbb9413457fca7)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://github.com/ribalda/linux/commit/08aff4b45dd51b3dfba18af4aa40b0fa5...
git remote add ribalda https://github.com/ribalda/linux
git fetch --no-tags ribalda uvc-noncontiguous
git checkout 08aff4b45dd51b3dfba18af4aa40b0fa5e2b5529
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
drivers/media/usb/uvc/uvc_video.c:910:8: warning: no previous prototype for function 'uvc_video_dump_time_stats' [-Wmissing-prototypes]
size_t uvc_video_dump_time_stats(char *buf, size_t size,
^
drivers/media/usb/uvc/uvc_video.c:910:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
size_t uvc_video_dump_time_stats(char *buf, size_t size,
^
static
drivers/media/usb/uvc/uvc_video.c:931:8: warning: no previous prototype for function 'uvc_video_dump_speed' [-Wmissing-prototypes]
size_t uvc_video_dump_speed(char *buf, size_t size, const char *pfx, u64 bytes,
^
drivers/media/usb/uvc/uvc_video.c:931:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
size_t uvc_video_dump_speed(char *buf, size_t size, const char *pfx, u64 bytes,
^
static
drivers/media/usb/uvc/uvc_video.c:1738:4: error: implicit declaration of function 'dma_free_noncontiguous' [-Werror,-Wimplicit-function-declaration]
dma_free_noncontiguous(stream_to_dmadev(stream),
^
drivers/media/usb/uvc/uvc_video.c:1757:7: error: implicit declaration of function 'dma_can_alloc_noncontiguous' [-Werror,-Wimplicit-function-declaration]
if (!dma_can_alloc_noncontiguous(dma_dev)) {
^
drivers/media/usb/uvc/uvc_video.c:1763:19: error: implicit declaration of function 'dma_alloc_noncontiguous' [-Werror,-Wimplicit-function-declaration]
uvc_urb->pages = dma_alloc_noncontiguous(dma_dev, stream->urb_size,
^
drivers/media/usb/uvc/uvc_video.c:1763:19: note: did you mean 'dma_can_alloc_noncontiguous'?
drivers/media/usb/uvc/uvc_video.c:1757:7: note: 'dma_can_alloc_noncontiguous' declared here
if (!dma_can_alloc_noncontiguous(dma_dev)) {
^
>> drivers/media/usb/uvc/uvc_video.c:1763:17: warning: incompatible integer to pointer conversion assigning to 'struct page **' from 'int' [-Wint-conversion]
uvc_urb->pages = dma_alloc_noncontiguous(dma_dev, stream->urb_size,
^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/media/usb/uvc/uvc_video.c:1771:3: error: implicit declaration of function 'dma_free_noncontiguous' [-Werror,-Wimplicit-function-declaration]
dma_free_noncontiguous(dma_dev, stream->urb_size, uvc_urb->pages, uvc_urb->dma);
^
3 warnings and 4 errors generated.
vim +1763 drivers/media/usb/uvc/uvc_video.c
1751
1752 static bool uvc_alloc_urb_buffer(struct uvc_streaming *stream, struct uvc_urb *uvc_urb,
1753 gfp_t gfp_flags)
1754 {
1755 struct device *dma_dev = stream_to_dmadev(stream);
1756
1757 if (!dma_can_alloc_noncontiguous(dma_dev)) {
1758 uvc_urb->buffer = usb_alloc_coherent(stream->dev->udev, stream->urb_size,
1759 gfp_flags | __GFP_NOWARN, &uvc_urb->dma);
1760 return uvc_urb->buffer != NULL;
1761 }
1762
> 1763 uvc_urb->pages = dma_alloc_noncontiguous(dma_dev, stream->urb_size,
1764 &uvc_urb->dma, gfp_flags | __GFP_NOWARN, 0);
1765 if (!uvc_urb->pages)
1766 return false;
1767
1768 uvc_urb->buffer = vmap(uvc_urb->pages, PAGE_ALIGN(stream->urb_size) >> PAGE_SHIFT,
1769 VM_DMA_COHERENT, PAGE_KERNEL);
1770 if (!uvc_urb->buffer) {
1771 dma_free_noncontiguous(dma_dev, stream->urb_size, uvc_urb->pages, uvc_urb->dma);
1772 return false;
1773 }
1774
1775 return true;
1776 }
1777
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
Re: [PATCH 1/3] drm/mipi-dbi: Add support for Type B
by kernel test robot
Hi,
Thank you for the patch! Perhaps something to improve:
[auto build test WARNING on linux/master]
[also build test WARNING on robh/for-next drm-intel/for-linux-next drm-exynos/exynos-drm-next tegra-drm/drm/tegra/for-next linus/master v5.10-rc4 next-20201118]
[cannot apply to drm/drm-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]
url: https://github.com/0day-ci/linux/commits/mdurnev-gmail-com/drm-mipi-dbi-T...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 09162bc32c880a791c6c0668ce0745cf7958f576
config: alpha-randconfig-s032-20201118 (attached as .config)
compiler: alpha-linux-gcc (GCC) 9.3.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# apt-get install sparse
# sparse version: v0.6.3-107-gaf3512a6-dirty
# https://github.com/0day-ci/linux/commit/f75093067b26ff68b2de896f317a03a10...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review mdurnev-gmail-com/drm-mipi-dbi-Type-B-bus-support-drm-tiny-MRB2801/20201118-153901
git checkout f75093067b26ff68b2de896f317a03a10d8bc7ff
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' ARCH=alpha
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
"sparse warnings: (new ones prefixed by >>)"
>> drivers/gpu/drm/drm_mipi_dbi.c:1255:20: sparse: sparse: Using plain integer as NULL pointer
vim +1255 drivers/gpu/drm/drm_mipi_dbi.c
1234
1235 /**
1236 * mipi_dbi_gpio_init - Initialize MIPI DBI Type B interface implemented via GPIO
1237 * @dbi: MIPI DBI structure to initialize
1238 * @dc: D/C gpio
1239 * @wr: W/R gpio
1240 * @db: DB gpios
1241 * @wr_up_delay: Delay after setting DB and before changing W/R from low to high
1242 * @wr_down_delay: Delay after changing W/R from low to high
1243 *
1244 * This function sets &mipi_dbi->command, enables &mipi_dbi->read_commands for the
1245 * usual read commands. It should be followed by a call to mipi_dbi_dev_init() or
1246 * a driver-specific init.
1247 *
1248 * Returns:
1249 * Zero on success, negative error code on failure.
1250 */
1251 int mipi_dbi_gpio_init(struct mipi_dbi *dbi, struct gpio_desc *dc,
1252 struct gpio_desc *wr, struct gpio_descs *db,
1253 unsigned long wr_up_delay, unsigned long wr_down_delay)
1254 {
> 1255 dbi->spi = 0; /* Type B uses GPIO lines rather than SPI */
1256
1257 dbi->read_commands = mipi_dbi_dcs_read_commands;
1258 dbi->command = mipi_dbi_gpio_command;
1259
1260 dbi->dc = dc;
1261 dbi->wr = wr;
1262 dbi->db = db;
1263 dbi->wr_up_delay = wr_up_delay;
1264 dbi->wr_down_delay = wr_down_delay;
1265
1266 if (mipi_dbi_machine_little_endian())
1267 dbi->swap_bytes = true;
1268
1269 mutex_init(&dbi->cmdlock);
1270
1271 return 0;
1272 }
1273 EXPORT_SYMBOL(mipi_dbi_gpio_init);
1274
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[android-common:android-4.19 1/4] drivers/staging/android/ion/ion_system_heap.c:292:5: warning: no previous prototype for function 'ion_system_heap_create'
by kernel test robot
tree: https://android.googlesource.com/kernel/common android-4.19
head: 983e2cdf34d065dd89e93bd096a76994b29aebcd
commit: f64a8b79c0e85440319136ed928f22ed37481742 [1/4] ANDROID: staging: android: ion: enable modularizing the ion driver
config: x86_64-randconfig-a015-20201118 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b2613fb2f0f53691dd0211895afbb9413457fca7)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install x86_64 cross compiling tool for clang build
# apt-get install binutils-x86-64-linux-gnu
git remote add android-common https://android.googlesource.com/kernel/common
git fetch --no-tags android-common android-4.19
git checkout f64a8b79c0e85440319136ed928f22ed37481742
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/staging/android/ion/ion_system_heap.c:292:5: warning: no previous prototype for function 'ion_system_heap_create' [-Wmissing-prototypes]
int ion_system_heap_create(void)
^
drivers/staging/android/ion/ion_system_heap.c:292:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int ion_system_heap_create(void)
^
static
>> drivers/staging/android/ion/ion_system_heap.c:385:5: warning: no previous prototype for function 'ion_system_contig_heap_create' [-Wmissing-prototypes]
int ion_system_contig_heap_create(void)
^
drivers/staging/android/ion/ion_system_heap.c:385:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int ion_system_contig_heap_create(void)
^
static
2 warnings generated.
vim +/ion_system_heap_create +292 drivers/staging/android/ion/ion_system_heap.c
291
> 292 int ion_system_heap_create(void)
293 {
294 struct ion_heap *heap;
295
296 heap = __ion_system_heap_create();
297 if (IS_ERR(heap))
298 return PTR_ERR(heap);
299 heap->name = "ion_system_heap";
300
301 ion_device_add_heap(heap);
302 return 0;
303 }
304
305 static int ion_system_contig_heap_allocate(struct ion_heap *heap,
306 struct ion_buffer *buffer,
307 unsigned long len,
308 unsigned long flags)
309 {
310 int order = get_order(len);
311 struct page *page;
312 struct sg_table *table;
313 unsigned long i;
314 int ret;
315
316 page = alloc_pages(low_order_gfp_flags | __GFP_NOWARN, order);
317 if (!page)
318 return -ENOMEM;
319
320 split_page(page, order);
321
322 len = PAGE_ALIGN(len);
323 for (i = len >> PAGE_SHIFT; i < (1 << order); i++)
324 __free_page(page + i);
325
326 table = kmalloc(sizeof(*table), GFP_KERNEL);
327 if (!table) {
328 ret = -ENOMEM;
329 goto free_pages;
330 }
331
332 ret = sg_alloc_table(table, 1, GFP_KERNEL);
333 if (ret)
334 goto free_table;
335
336 sg_set_page(table->sgl, page, len, 0);
337
338 buffer->sg_table = table;
339
340 return 0;
341
342 free_table:
343 kfree(table);
344 free_pages:
345 for (i = 0; i < len >> PAGE_SHIFT; i++)
346 __free_page(page + i);
347
348 return ret;
349 }
350
351 static void ion_system_contig_heap_free(struct ion_buffer *buffer)
352 {
353 struct sg_table *table = buffer->sg_table;
354 struct page *page = sg_page(table->sgl);
355 unsigned long pages = PAGE_ALIGN(buffer->size) >> PAGE_SHIFT;
356 unsigned long i;
357
358 for (i = 0; i < pages; i++)
359 __free_page(page + i);
360 sg_free_table(table);
361 kfree(table);
362 }
363
364 static struct ion_heap_ops kmalloc_ops = {
365 .allocate = ion_system_contig_heap_allocate,
366 .free = ion_system_contig_heap_free,
367 .map_kernel = ion_heap_map_kernel,
368 .unmap_kernel = ion_heap_unmap_kernel,
369 .map_user = ion_heap_map_user,
370 };
371
372 static struct ion_heap *__ion_system_contig_heap_create(void)
373 {
374 struct ion_heap *heap;
375
376 heap = kzalloc(sizeof(*heap), GFP_KERNEL);
377 if (!heap)
378 return ERR_PTR(-ENOMEM);
379 heap->ops = &kmalloc_ops;
380 heap->type = ION_HEAP_TYPE_SYSTEM_CONTIG;
381 heap->name = "ion_system_contig_heap";
382 return heap;
383 }
384
> 385 int ion_system_contig_heap_create(void)
386 {
387 struct ion_heap *heap;
388
389 heap = __ion_system_contig_heap_create();
390 if (IS_ERR(heap))
391 return PTR_ERR(heap);
392
393 ion_device_add_heap(heap);
394 return 0;
395 }
396
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[ribalda:uvc-noncontiguous 4/5] drivers/media/usb/uvc/uvc_video.c:909:8: warning: no previous prototype for function 'uvc_video_dump_time_stats'
by kernel test robot
tree: https://github.com/ribalda/linux uvc-noncontiguous
head: 08aff4b45dd51b3dfba18af4aa40b0fa5e2b5529
commit: 817731cae164166428258499e995dfe1ed135ad1 [4/5] TEST-ONLY: media: uvcvideo: Add statistics for measuring performance
config: powerpc64-randconfig-r011-20201118 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project b2613fb2f0f53691dd0211895afbb9413457fca7)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# install powerpc64 cross compiling tool for clang build
# apt-get install binutils-powerpc64-linux-gnu
# https://github.com/ribalda/linux/commit/817731cae164166428258499e995dfe1e...
git remote add ribalda https://github.com/ribalda/linux
git fetch --no-tags ribalda uvc-noncontiguous
git checkout 817731cae164166428258499e995dfe1ed135ad1
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc64
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All warnings (new ones prefixed by >>):
>> drivers/media/usb/uvc/uvc_video.c:909:8: warning: no previous prototype for function 'uvc_video_dump_time_stats' [-Wmissing-prototypes]
size_t uvc_video_dump_time_stats(char *buf, size_t size,
^
drivers/media/usb/uvc/uvc_video.c:909:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
size_t uvc_video_dump_time_stats(char *buf, size_t size,
^
static
>> drivers/media/usb/uvc/uvc_video.c:930:8: warning: no previous prototype for function 'uvc_video_dump_speed' [-Wmissing-prototypes]
size_t uvc_video_dump_speed(char *buf, size_t size, const char *pfx, u64 bytes,
^
drivers/media/usb/uvc/uvc_video.c:930:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
size_t uvc_video_dump_speed(char *buf, size_t size, const char *pfx, u64 bytes,
^
static
2 warnings generated.
vim +/uvc_video_dump_time_stats +909 drivers/media/usb/uvc/uvc_video.c
908
> 909 size_t uvc_video_dump_time_stats(char *buf, size_t size,
910 struct uvc_stats_time *stat, const char *pfx)
911 {
912 unsigned int avg = 0;
913 unsigned int std = 0;
914
915 if (stat->qty) {
916 avg = div_u64(stat->duration, stat->qty);
917 std = int_sqrt64(div_u64(stat->duration2, stat->qty) -
918 avg * avg);
919 }
920
921 /* Stat durations are in nanoseconds, we present in micro-seconds */
922 return scnprintf(
923 buf, size,
924 "%s: %llu/%u uS/qty: %u.%03u avg %u.%03u std %u.%03u min %u.%03u max (uS)\n",
925 pfx, div_u64(stat->duration, 1000), stat->qty, avg / 1000,
926 avg % 1000, std / 1000, std % 1000, stat->min / 1000,
927 stat->min % 1000, stat->max / 1000, stat->max % 1000);
928 }
929
> 930 size_t uvc_video_dump_speed(char *buf, size_t size, const char *pfx, u64 bytes,
931 u64 milliseconds)
932 {
933 unsigned int rate = 0;
934 bool gbit = false;
935
936 if (milliseconds)
937 rate = div_u64(bytes * 8, milliseconds);
938
939 if (rate >= 1000000) {
940 gbit = true;
941 rate /= 1000;
942 }
943
944 /*
945 * bits/milliseconds == kilobits/seconds,
946 * presented here as Mbits/s (or Gbit/s) with 3 decimal places
947 */
948 return scnprintf(buf, size, "%s: %d.%03d %sbits/s\n", pfx, rate / 1000,
949 rate % 1000, gbit ? "G" : "M");
950 }
951
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months