* Re: [PATCH v6 14/22] dma-buf: Introduce new locking convention
[not found] <20220526235040.678984-15-dmitry.osipenko@collabora.com>
@ 2022-05-27 2:37 ` kernel test robot
2022-05-27 12:44 ` Dmitry Osipenko
0 siblings, 1 reply; 3+ messages in thread
From: kernel test robot @ 2022-05-27 2:37 UTC (permalink / raw)
To: Dmitry Osipenko, David Airlie, Gerd Hoffmann, Gurchetan Singh,
Chia-I Wu, Daniel Vetter, Daniel Almeida, Gert Wollny,
Gustavo Padovan, Daniel Stone, Tomeu Vizoso, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, Rob Herring, Steven Price,
Alyssa Rosenzweig, Rob Clark, Emil Velikov, Robin Murphy,
Qiang Yu, Sumit Semwal, Christian König, Pan, Xinhui,
Thierry Reding, Tomasz Figa, Marek Szyprowski,
Mauro Carvalho Chehab, Alex Deucher, Jani Nikula
Cc: llvm, kbuild-all, linux-media
Hi Dmitry,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[cannot apply to drm/drm-next media-tree/master drm-intel/for-linux-next v5.18]
[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/intel-lab-lkp/linux/commits/Dmitry-Osipenko/Add-generic-memory-shrinker-to-VirtIO-GPU-and-Panfrost-DRM-drivers/20220527-075717
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git cdeffe87f790dfd1baa193020411ce9a538446d7
config: hexagon-randconfig-r045-20220524 (https://download.01.org/0day-ci/archive/20220527/202205271042.1WRbRP1r-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 6f4644d194da594562027a5d458d9fb7a20ebc39)
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://github.com/intel-lab-lkp/linux/commit/97f090c47ec995a8cf3bced98526ee3eaa25f10f
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Dmitry-Osipenko/Add-generic-memory-shrinker-to-VirtIO-GPU-and-Panfrost-DRM-drivers/20220527-075717
git checkout 97f090c47ec995a8cf3bced98526ee3eaa25f10f
# save the config file
mkdir build_dir && cp config build_dir/.config
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=hexagon SHELL=/bin/bash drivers/dma-buf/
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
>> drivers/dma-buf/dma-buf.c:1339:10: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
return ret;
^~~
drivers/dma-buf/dma-buf.c:1331:9: note: initialize the variable 'ret' to silence this warning
int ret;
^
= 0
1 warning generated.
vim +/ret +1339 drivers/dma-buf/dma-buf.c
1327
1328 static int dma_buf_vmap_locked(struct dma_buf *dmabuf, struct iosys_map *map)
1329 {
1330 struct iosys_map ptr;
1331 int ret;
1332
1333 dma_resv_assert_held(dmabuf->resv);
1334
1335 if (dmabuf->vmapping_counter) {
1336 dmabuf->vmapping_counter++;
1337 BUG_ON(iosys_map_is_null(&dmabuf->vmap_ptr));
1338 *map = dmabuf->vmap_ptr;
> 1339 return ret;
1340 }
1341
1342 BUG_ON(iosys_map_is_set(&dmabuf->vmap_ptr));
1343
1344 ret = dmabuf->ops->vmap(dmabuf, &ptr);
1345 if (WARN_ON_ONCE(ret))
1346 return ret;
1347
1348 dmabuf->vmap_ptr = ptr;
1349 dmabuf->vmapping_counter = 1;
1350
1351 *map = dmabuf->vmap_ptr;
1352
1353 return 0;
1354 }
1355
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v6 14/22] dma-buf: Introduce new locking convention
2022-05-27 2:37 ` kernel test robot
@ 2022-05-27 12:44 ` Dmitry Osipenko
0 siblings, 0 replies; 3+ messages in thread
From: Dmitry Osipenko @ 2022-05-27 12:44 UTC (permalink / raw)
To: kernel test robot, David Airlie, Gerd Hoffmann, Gurchetan Singh,
Chia-I Wu, Daniel Vetter, Daniel Almeida, Gert Wollny,
Gustavo Padovan, Daniel Stone, Tomeu Vizoso, Maarten Lankhorst,
Maxime Ripard, Thomas Zimmermann, Rob Herring, Steven Price,
Alyssa Rosenzweig, Rob Clark, Emil Velikov, Robin Murphy,
Qiang Yu, Sumit Semwal, Christian König, Pan, Xinhui,
Thierry Reding, Tomasz Figa, Marek Szyprowski,
Mauro Carvalho Chehab, Alex Deucher, Jani Nikula
Cc: llvm, kbuild-all, linux-media
On 5/27/22 05:37, kernel test robot wrote:
>>> drivers/dma-buf/dma-buf.c:1339:10: warning: variable 'ret' is uninitialized when used here [-Wuninitialized]
> return ret;
> ^~~
> drivers/dma-buf/dma-buf.c:1331:9: note: initialize the variable 'ret' to silence this warning
> int ret;
> ^
> = 0
> 1 warning generated.
Interestingly, GCC doesn't detect this problem and it's a valid warning.
I'll correct it in v7.
--
Best regards,
Dmitry
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v6 14/22] dma-buf: Introduce new locking convention
[not found] <202205280550.MWGs9cj4-lkp@intel.com>
@ 2022-05-30 3:25 ` kernel test robot
0 siblings, 0 replies; 3+ messages in thread
From: kernel test robot @ 2022-05-30 3:25 UTC (permalink / raw)
To: Dmitry Osipenko; +Cc: llvm, kbuild-all
Hi Dmitry,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on next-20220527]
[cannot apply to drm/drm-next media-tree/master drm-intel/for-linux-next v5.18]
[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/intel-lab-lkp/linux/commits/Dmitry-Osipenko/Add-generic-memory-shrinker-to-VirtIO-GPU-and-Panfrost-DRM-drivers/20220527-075717
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git cdeffe87f790dfd1baa193020411ce9a538446d7
config: arm-randconfig-c002-20220524 (https://download.01.org/0day-ci/archive/20220528/202205280550.MWGs9cj4-lkp@intel.com/config)
compiler: clang version 15.0.0 (https://github.com/llvm/llvm-project 134d7f9a4b97e9035150d970bd9e376043c4577e)
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
# https://github.com/intel-lab-lkp/linux/commit/97f090c47ec995a8cf3bced98526ee3eaa25f10f
git remote add linux-review https://github.com/intel-lab-lkp/linux
git fetch --no-tags linux-review Dmitry-Osipenko/Add-generic-memory-shrinker-to-VirtIO-GPU-and-Panfrost-DRM-drivers/20220527-075717
git checkout 97f090c47ec995a8cf3bced98526ee3eaa25f10f
# save the config file
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm clang-analyzer
If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <yujie.liu@intel.com>
clang-analyzer warnings: (new ones prefixed by >>)
>> drivers/dma-buf/dma-buf.c:1339:3: warning: Undefined or garbage value returned to caller [clang-analyzer-core.uninitialized.UndefReturn]
return ret;
^
vim +1339 drivers/dma-buf/dma-buf.c
4c78513e457f72 drivers/base/dma-buf.c Daniel Vetter 2012-04-24 1327
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 1328 static int dma_buf_vmap_locked(struct dma_buf *dmabuf, struct iosys_map *map)
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 1329 {
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 1330 struct iosys_map ptr;
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 @1331 int ret;
4c78513e457f72 drivers/base/dma-buf.c Daniel Vetter 2012-04-24 1332
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 1333 dma_resv_assert_held(dmabuf->resv);
4c78513e457f72 drivers/base/dma-buf.c Daniel Vetter 2012-04-24 1334
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 1335 if (dmabuf->vmapping_counter) {
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 1336 dmabuf->vmapping_counter++;
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 1337 BUG_ON(iosys_map_is_null(&dmabuf->vmap_ptr));
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 1338 *map = dmabuf->vmap_ptr;
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 @1339 return ret;
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 1340 }
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 1341
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 1342 BUG_ON(iosys_map_is_set(&dmabuf->vmap_ptr));
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 1343
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 1344 ret = dmabuf->ops->vmap(dmabuf, &ptr);
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 1345 if (WARN_ON_ONCE(ret))
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 1346 return ret;
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 1347
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 1348 dmabuf->vmap_ptr = ptr;
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 1349 dmabuf->vmapping_counter = 1;
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 1350
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 1351 *map = dmabuf->vmap_ptr;
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 1352
97f090c47ec995 drivers/dma-buf/dma-buf.c Dmitry Osipenko 2022-05-27 1353 return 0;
4c78513e457f72 drivers/base/dma-buf.c Daniel Vetter 2012-04-24 1354 }
98f86c9e4ae320 drivers/base/dma-buf.c Dave Airlie 2012-05-20 1355
--
0-DAY CI Kernel Test Service
https://01.org/lkp
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-30 3:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <202205280550.MWGs9cj4-lkp@intel.com>
2022-05-30 3:25 ` [PATCH v6 14/22] dma-buf: Introduce new locking convention kernel test robot
[not found] <20220526235040.678984-15-dmitry.osipenko@collabora.com>
2022-05-27 2:37 ` kernel test robot
2022-05-27 12:44 ` Dmitry Osipenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox