drivers/net/wireless/ath/ath10k/sdio.c:2234:2: warning: Non-boolean value returned from function returning bool
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: f01c30de86f1047e9bae1b1b1417b0ce8dcd15b1
commit: 3c45f21af84eb05a355919abc80cf70a3a681cee ath10k: sdio: add firmware coredump support
compiler: nios2-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <rong.a.chen(a)intel.com>
cppcheck possible warnings: (new ones prefixed by >>, may not real problems)
>> drivers/net/wireless/ath/ath10k/sdio.c:2234:2: warning: Non-boolean value returned from function returning bool [returnNonBoolInBooleanFunction]
return param & HI_OPTION_SDIO_CRASH_DUMP_ENHANCEMENT_FW;
^
vim +2234 drivers/net/wireless/ath/ath10k/sdio.c
3c45f21af84eb05 Wen Gong 2020-08-18 2225
3c45f21af84eb05 Wen Gong 2020-08-18 2226 static bool ath10k_sdio_is_fast_dump_supported(struct ath10k *ar)
3c45f21af84eb05 Wen Gong 2020-08-18 2227 {
3c45f21af84eb05 Wen Gong 2020-08-18 2228 u32 param;
3c45f21af84eb05 Wen Gong 2020-08-18 2229
3c45f21af84eb05 Wen Gong 2020-08-18 2230 ath10k_sdio_read_host_interest_value(ar, HI_ITEM(hi_option_flag2), ¶m);
3c45f21af84eb05 Wen Gong 2020-08-18 2231
3c45f21af84eb05 Wen Gong 2020-08-18 2232 ath10k_dbg(ar, ATH10K_DBG_SDIO, "sdio hi_option_flag2 %x\n", param);
3c45f21af84eb05 Wen Gong 2020-08-18 2233
3c45f21af84eb05 Wen Gong 2020-08-18 @2234 return param & HI_OPTION_SDIO_CRASH_DUMP_ENHANCEMENT_FW;
3c45f21af84eb05 Wen Gong 2020-08-18 2235 }
3c45f21af84eb05 Wen Gong 2020-08-18 2236
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[mripard:vc4/rework-helpers 12/28] drivers/clk/clk.c:2385 clk_set_min_rate() warn: variable dereferenced before check 'clk' (see line 2383)
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/mripard/linux.git vc4/rework-helpers
head: 0b08b344d2e1241f8135321b3e0421d95d855bc6
commit: 1f25a431c207a9f4e9024f8285b8a97654e78f39 [12/28] clk: trace: Trace range functions
config: i386-randconfig-m021-20201113 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
New smatch warnings:
drivers/clk/clk.c:2385 clk_set_min_rate() warn: variable dereferenced before check 'clk' (see line 2383)
vim +/clk +2385 drivers/clk/clk.c
4dff95dc9477a34 Stephen Boyd 2015-04-30 2381 int clk_set_min_rate(struct clk *clk, unsigned long rate)
035a61c314eb3da Tomeu Vizoso 2015-01-23 2382 {
1f25a431c207a9f Maxime Ripard 2020-10-01 @2383 trace_clk_set_min_rate(clk->core, rate);
^^^^^^^^^
Derefenced
1f25a431c207a9f Maxime Ripard 2020-10-01 2384
035a61c314eb3da Tomeu Vizoso 2015-01-23 @2385 if (!clk)
^^^^
Checked too late.
035a61c314eb3da Tomeu Vizoso 2015-01-23 2386 return 0;
035a61c314eb3da Tomeu Vizoso 2015-01-23 2387
4dff95dc9477a34 Stephen Boyd 2015-04-30 2388 return clk_set_rate_range(clk, rate, clk->max_rate);
035a61c314eb3da Tomeu Vizoso 2015-01-23 2389 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[jfern:coresched 14/39] kernel/sched/core.c:4708 pick_next_task() error: we previously assumed 'next' could be null (see line 4704)
by Dan Carpenter
tree: https://git.kernel.org/pub/scm/linux/kernel/git/jfern/linux.git coresched
head: 680ec43dead6f0f84db19ef07fc0f5ea44e9f2b3
commit: e7a440f33a800ee9fdf07defb1176932ab4a59b1 [14/39] sched: Simplify the core pick loop for optimized case
config: x86_64-randconfig-m001-20201113 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
kernel/sched/core.c:4708 pick_next_task() error: we previously assumed 'next' could be null (see line 4704)
vim +/next +4708 kernel/sched/core.c
620989bb8ec95d Peter Zijlstra 2020-06-30 4634 static struct task_struct *
620989bb8ec95d Peter Zijlstra 2020-06-30 4635 pick_next_task(struct rq *rq, struct task_struct *prev, struct rq_flags *rf)
620989bb8ec95d Peter Zijlstra 2020-06-30 4636 {
620989bb8ec95d Peter Zijlstra 2020-06-30 4637 struct task_struct *next, *max = NULL;
620989bb8ec95d Peter Zijlstra 2020-06-30 4638 const struct sched_class *class;
620989bb8ec95d Peter Zijlstra 2020-06-30 4639 const struct cpumask *smt_mask;
e4fe729c9bf5c1 Joel Fernandes (Google 2020-06-30 4640) bool fi_before = false;
620989bb8ec95d Peter Zijlstra 2020-06-30 4641 bool need_sync;
620989bb8ec95d Peter Zijlstra 2020-06-30 4642 int i, j, cpu;
620989bb8ec95d Peter Zijlstra 2020-06-30 4643
620989bb8ec95d Peter Zijlstra 2020-06-30 4644 if (!sched_core_enabled(rq))
620989bb8ec95d Peter Zijlstra 2020-06-30 4645 return __pick_next_task(rq, prev, rf);
620989bb8ec95d Peter Zijlstra 2020-06-30 4646
620989bb8ec95d Peter Zijlstra 2020-06-30 4647 cpu = cpu_of(rq);
620989bb8ec95d Peter Zijlstra 2020-06-30 4648
620989bb8ec95d Peter Zijlstra 2020-06-30 4649 /* Stopper task is switching into idle, no need core-wide selection. */
620989bb8ec95d Peter Zijlstra 2020-06-30 4650 if (cpu_is_offline(cpu)) {
620989bb8ec95d Peter Zijlstra 2020-06-30 4651 /*
620989bb8ec95d Peter Zijlstra 2020-06-30 4652 * Reset core_pick so that we don't enter the fastpath when
620989bb8ec95d Peter Zijlstra 2020-06-30 4653 * coming online. core_pick would already be migrated to
620989bb8ec95d Peter Zijlstra 2020-06-30 4654 * another cpu during offline.
620989bb8ec95d Peter Zijlstra 2020-06-30 4655 */
620989bb8ec95d Peter Zijlstra 2020-06-30 4656 rq->core_pick = NULL;
620989bb8ec95d Peter Zijlstra 2020-06-30 4657 return __pick_next_task(rq, prev, rf);
620989bb8ec95d Peter Zijlstra 2020-06-30 4658 }
620989bb8ec95d Peter Zijlstra 2020-06-30 4659
620989bb8ec95d Peter Zijlstra 2020-06-30 4660 /*
620989bb8ec95d Peter Zijlstra 2020-06-30 4661 * If there were no {en,de}queues since we picked (IOW, the task
620989bb8ec95d Peter Zijlstra 2020-06-30 4662 * pointers are all still valid), and we haven't scheduled the last
620989bb8ec95d Peter Zijlstra 2020-06-30 4663 * pick yet, do so now.
620989bb8ec95d Peter Zijlstra 2020-06-30 4664 *
620989bb8ec95d Peter Zijlstra 2020-06-30 4665 * rq->core_pick can be NULL if no selection was made for a CPU because
620989bb8ec95d Peter Zijlstra 2020-06-30 4666 * it was either offline or went offline during a sibling's core-wide
620989bb8ec95d Peter Zijlstra 2020-06-30 4667 * selection. In this case, do a core-wide selection.
620989bb8ec95d Peter Zijlstra 2020-06-30 4668 */
620989bb8ec95d Peter Zijlstra 2020-06-30 4669 if (rq->core->core_pick_seq == rq->core->core_task_seq &&
620989bb8ec95d Peter Zijlstra 2020-06-30 4670 rq->core->core_pick_seq != rq->core_sched_seq &&
620989bb8ec95d Peter Zijlstra 2020-06-30 4671 rq->core_pick) {
620989bb8ec95d Peter Zijlstra 2020-06-30 4672 WRITE_ONCE(rq->core_sched_seq, rq->core->core_pick_seq);
620989bb8ec95d Peter Zijlstra 2020-06-30 4673
620989bb8ec95d Peter Zijlstra 2020-06-30 4674 next = rq->core_pick;
620989bb8ec95d Peter Zijlstra 2020-06-30 4675 if (next != prev) {
620989bb8ec95d Peter Zijlstra 2020-06-30 4676 put_prev_task(rq, prev);
620989bb8ec95d Peter Zijlstra 2020-06-30 4677 set_next_task(rq, next);
620989bb8ec95d Peter Zijlstra 2020-06-30 4678 }
620989bb8ec95d Peter Zijlstra 2020-06-30 4679
620989bb8ec95d Peter Zijlstra 2020-06-30 4680 rq->core_pick = NULL;
620989bb8ec95d Peter Zijlstra 2020-06-30 4681 return next;
620989bb8ec95d Peter Zijlstra 2020-06-30 4682 }
620989bb8ec95d Peter Zijlstra 2020-06-30 4683
620989bb8ec95d Peter Zijlstra 2020-06-30 4684 put_prev_task_balance(rq, prev, rf);
620989bb8ec95d Peter Zijlstra 2020-06-30 4685
620989bb8ec95d Peter Zijlstra 2020-06-30 4686 smt_mask = cpu_smt_mask(cpu);
620989bb8ec95d Peter Zijlstra 2020-06-30 4687 need_sync = !!rq->core->core_cookie;
620989bb8ec95d Peter Zijlstra 2020-06-30 4688
620989bb8ec95d Peter Zijlstra 2020-06-30 4689 /* reset state */
620989bb8ec95d Peter Zijlstra 2020-06-30 4690 rq->core->core_cookie = 0UL;
ba9df3989cb9de Vineeth Pillai 2020-08-28 4691 if (rq->core->core_forceidle) {
ba9df3989cb9de Vineeth Pillai 2020-08-28 4692 need_sync = true;
e4fe729c9bf5c1 Joel Fernandes (Google 2020-06-30 4693) fi_before = true;
ba9df3989cb9de Vineeth Pillai 2020-08-28 4694 rq->core->core_forceidle = false;
ba9df3989cb9de Vineeth Pillai 2020-08-28 4695 }
e7a440f33a800e Joel Fernandes (Google 2020-11-05 4696)
e7a440f33a800e Joel Fernandes (Google 2020-11-05 4697) /*
e7a440f33a800e Joel Fernandes (Google 2020-11-05 4698) * Optimize for common case where this CPU has no cookies
e7a440f33a800e Joel Fernandes (Google 2020-11-05 4699) * and there are no cookied tasks running on siblings.
e7a440f33a800e Joel Fernandes (Google 2020-11-05 4700) */
e7a440f33a800e Joel Fernandes (Google 2020-11-05 4701) if (!need_sync) {
e7a440f33a800e Joel Fernandes (Google 2020-11-05 4702) for_each_class(class) {
e7a440f33a800e Joel Fernandes (Google 2020-11-05 4703) next = class->pick_task(rq);
e7a440f33a800e Joel Fernandes (Google 2020-11-05 @4704) if (next)
e7a440f33a800e Joel Fernandes (Google 2020-11-05 4705) break;
^^^^^
If we exit the loop without hitting this break
e7a440f33a800e Joel Fernandes (Google 2020-11-05 4706) }
e7a440f33a800e Joel Fernandes (Google 2020-11-05 4707)
e7a440f33a800e Joel Fernandes (Google 2020-11-05 @4708) if (!next->core_cookie) {
^^^^^^
then this will crash.
e7a440f33a800e Joel Fernandes (Google 2020-11-05 4709) rq->core_pick = NULL;
e7a440f33a800e Joel Fernandes (Google 2020-11-05 4710) goto done;
e7a440f33a800e Joel Fernandes (Google 2020-11-05 4711) }
e7a440f33a800e Joel Fernandes (Google 2020-11-05 4712) need_sync = true;
e7a440f33a800e Joel Fernandes (Google 2020-11-05 4713) }
e7a440f33a800e Joel Fernandes (Google 2020-11-05 4714)
620989bb8ec95d Peter Zijlstra 2020-06-30 4715 for_each_cpu(i, smt_mask) {
620989bb8ec95d Peter Zijlstra 2020-06-30 4716 struct rq *rq_i = cpu_rq(i);
620989bb8ec95d Peter Zijlstra 2020-06-30 4717
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[hverkuil-media:tegrav7 4/31] drivers/media/i2c/imx274.c:1864 imx274_probe() error: uninitialized symbol 'ret'.
by Dan Carpenter
tree: git://linuxtv.org/hverkuil/media_tree.git tegrav7
head: 21fdf53e9b25740c154944080601db0d0009f791
commit: 75bf8f97326c56ba2249f66b1ba86a4e1055e5d0 [4/31] media: i2c: Add support for IMX274 supplies and external clock
config: x86_64-randconfig-m001-20201113 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
Reported-by: Dan Carpenter <dan.carpenter(a)oracle.com>
smatch warnings:
drivers/media/i2c/imx274.c:1864 imx274_probe() error: uninitialized symbol 'ret'.
vim +/ret +1864 drivers/media/i2c/imx274.c
e671499303e4c0e Kieran Bingham 2019-07-10 1848 static int imx274_probe(struct i2c_client *client)
0985dd306f727df Leon Luo 2017-10-05 1849 {
0985dd306f727df Leon Luo 2017-10-05 1850 struct v4l2_subdev *sd;
0985dd306f727df Leon Luo 2017-10-05 1851 struct stimx274 *imx274;
0985dd306f727df Leon Luo 2017-10-05 1852 int ret;
0985dd306f727df Leon Luo 2017-10-05 1853
0985dd306f727df Leon Luo 2017-10-05 1854 /* initialize imx274 */
0985dd306f727df Leon Luo 2017-10-05 1855 imx274 = devm_kzalloc(&client->dev, sizeof(*imx274), GFP_KERNEL);
0985dd306f727df Leon Luo 2017-10-05 1856 if (!imx274)
0985dd306f727df Leon Luo 2017-10-05 1857 return -ENOMEM;
0985dd306f727df Leon Luo 2017-10-05 1858
0985dd306f727df Leon Luo 2017-10-05 1859 mutex_init(&imx274->lock);
0985dd306f727df Leon Luo 2017-10-05 1860
75bf8f97326c56b Sowjanya Komatineni 2020-06-03 1861 imx274->xclk = devm_clk_get(&client->dev, "xclk");
75bf8f97326c56b Sowjanya Komatineni 2020-06-03 1862 if (IS_ERR(imx274->xclk)) {
75bf8f97326c56b Sowjanya Komatineni 2020-06-03 1863 dev_err(&client->dev, "Failed to get xclk\n");
75bf8f97326c56b Sowjanya Komatineni 2020-06-03 @1864 return ret;
This should be "return PTR_ERR(imx274->xclk);
75bf8f97326c56b Sowjanya Komatineni 2020-06-03 1865 }
75bf8f97326c56b Sowjanya Komatineni 2020-06-03 1866
75bf8f97326c56b Sowjanya Komatineni 2020-06-03 1867 ret = clk_set_rate(imx274->xclk, IMX274_DEFAULT_CLK_FREQ);
75bf8f97326c56b Sowjanya Komatineni 2020-06-03 1868 if (ret < 0) {
75bf8f97326c56b Sowjanya Komatineni 2020-06-03 1869 dev_err(&client->dev, "Failed to set xclk rate\n");
75bf8f97326c56b Sowjanya Komatineni 2020-06-03 1870 return ret;
75bf8f97326c56b Sowjanya Komatineni 2020-06-03 1871 }
75bf8f97326c56b Sowjanya Komatineni 2020-06-03 1872
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months
[sound:test/usb-hacks-wip 44/53] sound/usb/endpoint.c:1255:5: warning: no previous prototype for function 'snd_usb_sync_endpoint_start'
by kernel test robot
tree: https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git test/usb-hacks-wip
head: 8d9dd7caccc6daebab8b2a1a7bbd09e605b83fba
commit: ca31918f6843b5369d0c900c43bfe5f71441b5b2 [44/53] ALSA: usb-audio: Refactor endpoint management
config: x86_64-randconfig-a001-20201115 (attached as .config)
compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 9a85643cd357e412cff69067bb5c4840e228c2ab)
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
# https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git/commit/?i...
git remote add sound https://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound.git
git fetch --no-tags sound test/usb-hacks-wip
git checkout ca31918f6843b5369d0c900c43bfe5f71441b5b2
# 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/usb/endpoint.c:1255:5: warning: no previous prototype for function 'snd_usb_sync_endpoint_start' [-Wmissing-prototypes]
int snd_usb_sync_endpoint_start(struct snd_usb_endpoint *ep,
^
sound/usb/endpoint.c:1255:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
int snd_usb_sync_endpoint_start(struct snd_usb_endpoint *ep,
^
static
>> sound/usb/endpoint.c:1298:6: warning: no previous prototype for function 'snd_usb_sync_endpoint_stop' [-Wmissing-prototypes]
void snd_usb_sync_endpoint_stop(struct snd_usb_endpoint *ep)
^
sound/usb/endpoint.c:1298:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void snd_usb_sync_endpoint_stop(struct snd_usb_endpoint *ep)
^
static
2 warnings generated.
vim +/snd_usb_sync_endpoint_start +1255 sound/usb/endpoint.c
1254
> 1255 int snd_usb_sync_endpoint_start(struct snd_usb_endpoint *ep,
1256 struct snd_usb_endpoint *data_ep)
1257 {
1258 int err;
1259
1260 err = snd_usb_endpoint_start(ep);
1261 return err;
1262 }
1263
1264 /**
1265 * snd_usb_endpoint_stop: stop an snd_usb_endpoint
1266 *
1267 * @ep: the endpoint to stop (may be NULL)
1268 *
1269 * A call to this function will decrement the use count of the endpoint.
1270 * In case the last user has requested the endpoint stop, the URBs will
1271 * actually be deactivated.
1272 *
1273 * Must be balanced to calls of snd_usb_endpoint_start().
1274 *
1275 * The caller needs to synchronize the pending stop operation via
1276 * snd_usb_endpoint_sync_pending_stop().
1277 */
1278 void snd_usb_endpoint_stop(struct snd_usb_endpoint *ep)
1279 {
1280 if (!ep)
1281 return;
1282
1283 usb_audio_dbg(ep->chip, "Stopping %s EP 0x%x (count %d)\n",
1284 ep_type_name(ep->type), ep->ep_num, ep->use_count);
1285
1286 if (snd_BUG_ON(ep->use_count == 0))
1287 return;
1288
1289 if (ep->sync_master)
1290 WRITE_ONCE(ep->sync_master->sync_slave, NULL);
1291
1292 if (--ep->use_count == 0) {
1293 deactivate_urbs(ep, false);
1294 set_bit(EP_FLAG_STOPPING, &ep->flags);
1295 }
1296 }
1297
> 1298 void snd_usb_sync_endpoint_stop(struct snd_usb_endpoint *ep)
1299 {
1300 snd_usb_endpoint_stop(ep);
1301 }
1302
---
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 2/2] drm/mediatek: Use struct dma_buf_map in GEM vmap ops
by kernel test robot
Hi Thomas,
I love your patch! Perhaps something to improve:
[auto build test WARNING on linus/master]
[also build test WARNING on v5.10-rc4]
[cannot apply to next-20201113]
[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/Thomas-Zimmermann/drm-Build-fixe...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f8394f232b1eab649ce2df5c5f15b0e528c92091
config: arm64-allyesconfig (attached as .config)
compiler: aarch64-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://github.com/0day-ci/linux/commit/1e81f225d3ffc9e951faab8deb96ef620...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Thomas-Zimmermann/drm-Build-fixes-for-msm-and-mediatek/20201109-183736
git checkout 1e81f225d3ffc9e951faab8deb96ef6209db7742
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm64
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 >>):
In file included from drivers/gpu/drm/mediatek/mtk_drm_gem.c:14:
drivers/gpu/drm/mediatek/mtk_drm_gem.h:48:63: warning: 'struct dma_buf_map' declared inside parameter list will not be visible outside of this definition or declaration
48 | int mtk_drm_gem_prime_vmap(struct drm_gem_object *obj, struct dma_buf_map *map);
| ^~~~~~~~~~~
drivers/gpu/drm/mediatek/mtk_drm_gem.h:49:66: warning: 'struct dma_buf_map' declared inside parameter list will not be visible outside of this definition or declaration
49 | void mtk_drm_gem_prime_vunmap(struct drm_gem_object *obj, struct dma_buf_map *map);
| ^~~~~~~~~~~
>> drivers/gpu/drm/mediatek/mtk_drm_gem.c:232:63: warning: 'struct dma_buf_map' declared inside parameter list will not be visible outside of this definition or declaration
232 | int mtk_drm_gem_prime_vmap(struct drm_gem_object *obj, struct dma_buf_map *map)
| ^~~~~~~~~~~
drivers/gpu/drm/mediatek/mtk_drm_gem.c:232:5: error: conflicting types for 'mtk_drm_gem_prime_vmap'
232 | int mtk_drm_gem_prime_vmap(struct drm_gem_object *obj, struct dma_buf_map *map)
| ^~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/mediatek/mtk_drm_gem.c:14:
drivers/gpu/drm/mediatek/mtk_drm_gem.h:48:5: note: previous declaration of 'mtk_drm_gem_prime_vmap' was here
48 | int mtk_drm_gem_prime_vmap(struct drm_gem_object *obj, struct dma_buf_map *map);
| ^~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/mediatek/mtk_drm_gem.c: In function 'mtk_drm_gem_prime_vmap':
drivers/gpu/drm/mediatek/mtk_drm_gem.c:259:2: error: implicit declaration of function 'dma_buf_map_set_vaddr' [-Werror=implicit-function-declaration]
259 | dma_buf_map_set_vaddr(map, mtk_gem->kvaddr);
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/mediatek/mtk_drm_gem.c: At top level:
drivers/gpu/drm/mediatek/mtk_drm_gem.c:264:66: warning: 'struct dma_buf_map' declared inside parameter list will not be visible outside of this definition or declaration
264 | void mtk_drm_gem_prime_vunmap(struct drm_gem_object *obj, struct dma_buf_map *map)
| ^~~~~~~~~~~
drivers/gpu/drm/mediatek/mtk_drm_gem.c:264:6: error: conflicting types for 'mtk_drm_gem_prime_vunmap'
264 | void mtk_drm_gem_prime_vunmap(struct drm_gem_object *obj, struct dma_buf_map *map)
| ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/mediatek/mtk_drm_gem.c:14:
drivers/gpu/drm/mediatek/mtk_drm_gem.h:49:6: note: previous declaration of 'mtk_drm_gem_prime_vunmap' was here
49 | void mtk_drm_gem_prime_vunmap(struct drm_gem_object *obj, struct dma_buf_map *map);
| ^~~~~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/mediatek/mtk_drm_gem.c: In function 'mtk_drm_gem_prime_vunmap':
drivers/gpu/drm/mediatek/mtk_drm_gem.c:267:19: error: dereferencing pointer to incomplete type 'struct dma_buf_map'
267 | void *vaddr = map->vaddr;
| ^~
cc1: some warnings being treated as errors
vim +232 drivers/gpu/drm/mediatek/mtk_drm_gem.c
231
> 232 int mtk_drm_gem_prime_vmap(struct drm_gem_object *obj, struct dma_buf_map *map)
233 {
234 struct mtk_drm_gem_obj *mtk_gem = to_mtk_gem_obj(obj);
235 struct sg_table *sgt = NULL;
236 unsigned int npages;
237
238 if (mtk_gem->kvaddr)
239 goto out;
240
241 sgt = mtk_gem_prime_get_sg_table(obj);
242 if (IS_ERR(sgt))
243 return PTR_ERR(sgt);
244
245 npages = obj->size >> PAGE_SHIFT;
246 mtk_gem->pages = kcalloc(npages, sizeof(*mtk_gem->pages), GFP_KERNEL);
247 if (!mtk_gem->pages) {
248 kfree(sgt);
249 return -ENOMEM;
250 }
251
252 drm_prime_sg_to_page_addr_arrays(sgt, mtk_gem->pages, NULL, npages);
253
254 mtk_gem->kvaddr = vmap(mtk_gem->pages, npages, VM_MAP,
255 pgprot_writecombine(PAGE_KERNEL));
256
257 out:
258 kfree(sgt);
259 dma_buf_map_set_vaddr(map, mtk_gem->kvaddr);
260
261 return 0;
262 }
263
---
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/2] drm/msm: Use struct dma_buf_map in GEM vmap ops
by kernel test robot
Hi Thomas,
I love your patch! Yet something to improve:
[auto build test ERROR on linus/master]
[also build test ERROR on v5.10-rc4]
[cannot apply to next-20201113]
[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/Thomas-Zimmermann/drm-Build-fixe...
base: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git f8394f232b1eab649ce2df5c5f15b0e528c92091
config: arm-defconfig (attached as .config)
compiler: arm-linux-gnueabi-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://github.com/0day-ci/linux/commit/23efc78fd2f5e71dabe163eec64d60989...
git remote add linux-review https://github.com/0day-ci/linux
git fetch --no-tags linux-review Thomas-Zimmermann/drm-Build-fixes-for-msm-and-mediatek/20201109-183736
git checkout 23efc78fd2f5e71dabe163eec64d609891160175
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=arm
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp(a)intel.com>
All error/warnings (new ones prefixed by >>):
In file included from drivers/gpu/drm/msm/msm_drv.c:21:
drivers/gpu/drm/msm/msm_drv.h:299:59: warning: 'struct dma_buf_map' declared inside parameter list will not be visible outside of this definition or declaration
299 | int msm_gem_prime_vmap(struct drm_gem_object *obj, struct dma_buf_map *map);
| ^~~~~~~~~~~
drivers/gpu/drm/msm/msm_drv.h:300:62: warning: 'struct dma_buf_map' declared inside parameter list will not be visible outside of this definition or declaration
300 | void msm_gem_prime_vunmap(struct drm_gem_object *obj, struct dma_buf_map *map);
| ^~~~~~~~~~~
drivers/gpu/drm/msm/msm_drv.c:123:15: warning: no previous prototype for '_msm_ioremap' [-Wmissing-prototypes]
123 | void __iomem *_msm_ioremap(struct platform_device *pdev, const char *name,
| ^~~~~~~~~~~~
>> drivers/gpu/drm/msm/msm_drv.c:1016:24: error: initialization of 'void * (*)(struct drm_gem_object *)' from incompatible pointer type 'int (*)(struct drm_gem_object *, struct dma_buf_map *)' [-Werror=incompatible-pointer-types]
1016 | .gem_prime_vmap = msm_gem_prime_vmap,
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/msm/msm_drv.c:1016:24: note: (near initialization for 'msm_driver.gem_prime_vmap')
>> drivers/gpu/drm/msm/msm_drv.c:1017:24: error: initialization of 'void (*)(struct drm_gem_object *, void *)' from incompatible pointer type 'void (*)(struct drm_gem_object *, struct dma_buf_map *)' [-Werror=incompatible-pointer-types]
1017 | .gem_prime_vunmap = msm_gem_prime_vunmap,
| ^~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/msm/msm_drv.c:1017:24: note: (near initialization for 'msm_driver.gem_prime_vunmap')
cc1: some warnings being treated as errors
--
In file included from drivers/gpu/drm/msm/msm_gem_prime.c:11:
drivers/gpu/drm/msm/msm_drv.h:299:59: warning: 'struct dma_buf_map' declared inside parameter list will not be visible outside of this definition or declaration
299 | int msm_gem_prime_vmap(struct drm_gem_object *obj, struct dma_buf_map *map);
| ^~~~~~~~~~~
drivers/gpu/drm/msm/msm_drv.h:300:62: warning: 'struct dma_buf_map' declared inside parameter list will not be visible outside of this definition or declaration
300 | void msm_gem_prime_vunmap(struct drm_gem_object *obj, struct dma_buf_map *map);
| ^~~~~~~~~~~
>> drivers/gpu/drm/msm/msm_gem_prime.c:25:59: warning: 'struct dma_buf_map' declared inside parameter list will not be visible outside of this definition or declaration
25 | int msm_gem_prime_vmap(struct drm_gem_object *obj, struct dma_buf_map *map)
| ^~~~~~~~~~~
>> drivers/gpu/drm/msm/msm_gem_prime.c:25:5: error: conflicting types for 'msm_gem_prime_vmap'
25 | int msm_gem_prime_vmap(struct drm_gem_object *obj, struct dma_buf_map *map)
| ^~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/msm/msm_gem_prime.c:11:
drivers/gpu/drm/msm/msm_drv.h:299:5: note: previous declaration of 'msm_gem_prime_vmap' was here
299 | int msm_gem_prime_vmap(struct drm_gem_object *obj, struct dma_buf_map *map);
| ^~~~~~~~~~~~~~~~~~
drivers/gpu/drm/msm/msm_gem_prime.c: In function 'msm_gem_prime_vmap':
>> drivers/gpu/drm/msm/msm_gem_prime.c:32:2: error: implicit declaration of function 'dma_buf_map_set_vaddr' [-Werror=implicit-function-declaration]
32 | dma_buf_map_set_vaddr(map, vaddr);
| ^~~~~~~~~~~~~~~~~~~~~
drivers/gpu/drm/msm/msm_gem_prime.c: At top level:
drivers/gpu/drm/msm/msm_gem_prime.c:37:62: warning: 'struct dma_buf_map' declared inside parameter list will not be visible outside of this definition or declaration
37 | void msm_gem_prime_vunmap(struct drm_gem_object *obj, struct dma_buf_map *map)
| ^~~~~~~~~~~
>> drivers/gpu/drm/msm/msm_gem_prime.c:37:6: error: conflicting types for 'msm_gem_prime_vunmap'
37 | void msm_gem_prime_vunmap(struct drm_gem_object *obj, struct dma_buf_map *map)
| ^~~~~~~~~~~~~~~~~~~~
In file included from drivers/gpu/drm/msm/msm_gem_prime.c:11:
drivers/gpu/drm/msm/msm_drv.h:300:6: note: previous declaration of 'msm_gem_prime_vunmap' was here
300 | void msm_gem_prime_vunmap(struct drm_gem_object *obj, struct dma_buf_map *map);
| ^~~~~~~~~~~~~~~~~~~~
cc1: some warnings being treated as errors
vim +1016 drivers/gpu/drm/msm/msm_drv.c
c8afe684c95cd17 Rob Clark 2013-06-26 992
c8afe684c95cd17 Rob Clark 2013-06-26 993 static struct drm_driver msm_driver = {
5b38e7475e3dc54 Daniel Vetter 2019-01-29 994 .driver_features = DRIVER_GEM |
b4b15c865da67e6 Rob Clark 2013-09-28 995 DRIVER_RENDER |
a5436e1d241488f Rob Clark 2015-06-04 996 DRIVER_ATOMIC |
ab723b7a992a19b Bas Nieuwenhuizen 2020-01-24 997 DRIVER_MODESET |
ab723b7a992a19b Bas Nieuwenhuizen 2020-01-24 998 DRIVER_SYNCOBJ,
7198e6b03155f6d Rob Clark 2013-07-19 999 .open = msm_open,
94df145c7e17c62 Daniel Vetter 2017-03-08 1000 .postclose = msm_postclose,
4ccbc6e57562965 Noralf Trønnes 2017-12-05 1001 .lastclose = drm_fb_helper_lastclose,
c8afe684c95cd17 Rob Clark 2013-06-26 1002 .irq_handler = msm_irq,
c8afe684c95cd17 Rob Clark 2013-06-26 1003 .irq_preinstall = msm_irq_preinstall,
c8afe684c95cd17 Rob Clark 2013-06-26 1004 .irq_postinstall = msm_irq_postinstall,
c8afe684c95cd17 Rob Clark 2013-06-26 1005 .irq_uninstall = msm_irq_uninstall,
48e7f18392c66f9 Kristian H. Kristensen 2019-03-20 1006 .gem_free_object_unlocked = msm_gem_free_object,
c8afe684c95cd17 Rob Clark 2013-06-26 1007 .gem_vm_ops = &vm_ops,
c8afe684c95cd17 Rob Clark 2013-06-26 1008 .dumb_create = msm_gem_dumb_create,
c8afe684c95cd17 Rob Clark 2013-06-26 1009 .dumb_map_offset = msm_gem_dumb_map_offset,
05b849111c07454 Rob Clark 2013-09-28 1010 .prime_handle_to_fd = drm_gem_prime_handle_to_fd,
05b849111c07454 Rob Clark 2013-09-28 1011 .prime_fd_to_handle = drm_gem_prime_fd_to_handle,
05b849111c07454 Rob Clark 2013-09-28 1012 .gem_prime_pin = msm_gem_prime_pin,
05b849111c07454 Rob Clark 2013-09-28 1013 .gem_prime_unpin = msm_gem_prime_unpin,
05b849111c07454 Rob Clark 2013-09-28 1014 .gem_prime_get_sg_table = msm_gem_prime_get_sg_table,
05b849111c07454 Rob Clark 2013-09-28 1015 .gem_prime_import_sg_table = msm_gem_prime_import_sg_table,
05b849111c07454 Rob Clark 2013-09-28 @1016 .gem_prime_vmap = msm_gem_prime_vmap,
05b849111c07454 Rob Clark 2013-09-28 @1017 .gem_prime_vunmap = msm_gem_prime_vunmap,
77a147e742afe33 Daniel Thompson 2014-11-12 1018 .gem_prime_mmap = msm_gem_prime_mmap,
c8afe684c95cd17 Rob Clark 2013-06-26 1019 #ifdef CONFIG_DEBUG_FS
c8afe684c95cd17 Rob Clark 2013-06-26 1020 .debugfs_init = msm_debugfs_init,
c8afe684c95cd17 Rob Clark 2013-06-26 1021 #endif
7198e6b03155f6d Rob Clark 2013-07-19 1022 .ioctls = msm_ioctls,
167b606aa262270 Jordan Crouse 2017-05-08 1023 .num_ioctls = ARRAY_SIZE(msm_ioctls),
c8afe684c95cd17 Rob Clark 2013-06-26 1024 .fops = &fops,
c8afe684c95cd17 Rob Clark 2013-06-26 1025 .name = "msm",
c8afe684c95cd17 Rob Clark 2013-06-26 1026 .desc = "MSM Snapdragon DRM",
c8afe684c95cd17 Rob Clark 2013-06-26 1027 .date = "20130625",
a8d854c102f8809 Rob Clark 2016-06-01 1028 .major = MSM_VERSION_MAJOR,
a8d854c102f8809 Rob Clark 2016-06-01 1029 .minor = MSM_VERSION_MINOR,
a8d854c102f8809 Rob Clark 2016-06-01 1030 .patchlevel = MSM_VERSION_PATCHLEVEL,
c8afe684c95cd17 Rob Clark 2013-06-26 1031 };
c8afe684c95cd17 Rob Clark 2013-06-26 1032
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
1 year, 10 months