[PATCH v2 1/4] drm: add drmm_encoder_alloc()
kernel test robot
lkp at intel.com
Fri Aug 28 03:06:30 UTC 2020
Hi Philipp,
I love your patch! Perhaps something to improve:
[auto build test WARNING on drm-intel/for-linux-next]
[also build test WARNING on drm-tip/drm-tip linus/master v5.9-rc2 next-20200827]
[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/Philipp-Zabel/drm-add-drmm_encoder_alloc/20200828-000957
base: git://anongit.freedesktop.org/drm-intel for-linux-next
config: arm-randconfig-r003-20200827 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project c10e63677f5d20f18010f8f68c631ddc97546f7d)
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 arm cross compiling tool for clang build
# apt-get install binutils-arm-linux-gnueabi
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>
All warnings (new ones prefixed by >>):
>> drivers/gpu/drm/drm_encoder.c:160:6: warning: variable 'ap' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (name)
^~~~
drivers/gpu/drm/drm_encoder.c:162:68: note: uninitialized use occurs here
ret = __drm_encoder_init(dev, encoder, funcs, encoder_type, name, ap);
^~
drivers/gpu/drm/drm_encoder.c:160:2: note: remove the 'if' if its condition is always true
if (name)
^~~~~~~~~
drivers/gpu/drm/drm_encoder.c:157:2: note: variable 'ap' is declared here
va_list ap;
^
drivers/gpu/drm/drm_encoder.c:227:6: warning: variable 'ap' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
if (name)
^~~~
drivers/gpu/drm/drm_encoder.c:229:68: note: uninitialized use occurs here
ret = __drm_encoder_init(dev, encoder, funcs, encoder_type, name, ap);
^~
drivers/gpu/drm/drm_encoder.c:227:2: note: remove the 'if' if its condition is always true
if (name)
^~~~~~~~~
drivers/gpu/drm/drm_encoder.c:215:2: note: variable 'ap' is declared here
va_list ap;
^
2 warnings generated.
# https://github.com/0day-ci/linux/commit/582208cffad6661715216bc2fd36f382012f8419
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Philipp-Zabel/drm-add-drmm_encoder_alloc/20200828-000957
git checkout 582208cffad6661715216bc2fd36f382012f8419
vim +160 drivers/gpu/drm/drm_encoder.c
136
137 /**
138 * drm_encoder_init - Init a preallocated encoder
139 * @dev: drm device
140 * @encoder: the encoder to init
141 * @funcs: callbacks for this encoder
142 * @encoder_type: user visible type of the encoder
143 * @name: printf style format string for the encoder name, or NULL for default name
144 *
145 * Initializes a preallocated encoder. Encoder should be subclassed as part of
146 * driver encoder objects. At driver unload time drm_encoder_cleanup() should be
147 * called from the driver's &drm_encoder_funcs.destroy hook.
148 *
149 * Returns:
150 * Zero on success, error code on failure.
151 */
152 int drm_encoder_init(struct drm_device *dev,
153 struct drm_encoder *encoder,
154 const struct drm_encoder_funcs *funcs,
155 int encoder_type, const char *name, ...)
156 {
157 va_list ap;
158 int ret;
159
> 160 if (name)
161 va_start(ap, name);
162 ret = __drm_encoder_init(dev, encoder, funcs, encoder_type, name, ap);
163 if (name)
164 va_end(ap);
165
166 return ret;
167 }
168 EXPORT_SYMBOL(drm_encoder_init);
169
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 26927 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20200828/d9503d74/attachment-0001.gz>
More information about the dri-devel
mailing list