linux-mm.kvack.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Danilo Krummrich <dakr@redhat.com>
Cc: oe-kbuild-all@lists.linux.dev,
	Linux Memory Management List <linux-mm@kvack.org>,
	Dave Airlie <airlied@redhat.com>
Subject: [linux-next:master 13355/13985] drivers/gpu/drm/nouveau/nouveau_fence.c:210:45: sparse: sparse: incorrect type in initializer (different address spaces)
Date: Tue, 5 Sep 2023 20:44:22 +0800	[thread overview]
Message-ID: <202309052034.pmZzofzh-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head:   c50216cfa084d5eb67dc10e646a3283da1595bb6
commit: 978474dc8278f661930e02e08d292a45a45fa01a [13355/13985] drm/nouveau: fence: fix undefined fence state after emit
config: i386-randconfig-061-20230904 (https://download.01.org/0day-ci/archive/20230905/202309052034.pmZzofzh-lkp@intel.com/config)
compiler: gcc-11 (Debian 11.3.0-12) 11.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20230905/202309052034.pmZzofzh-lkp@intel.com/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202309052034.pmZzofzh-lkp@intel.com/

sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/nouveau/nouveau_fence.c:210:45: sparse: sparse: incorrect type in initializer (different address spaces) @@     expected struct nouveau_channel *chan @@     got struct nouveau_channel [noderef] __rcu *channel @@
   drivers/gpu/drm/nouveau/nouveau_fence.c:210:45: sparse:     expected struct nouveau_channel *chan
   drivers/gpu/drm/nouveau/nouveau_fence.c:210:45: sparse:     got struct nouveau_channel [noderef] __rcu *channel
   drivers/gpu/drm/nouveau/nouveau_fence.c:418:24: sparse: sparse: incorrect type in assignment (different address spaces) @@     expected struct nouveau_channel [noderef] __rcu *channel @@     got struct nouveau_channel *chan @@
   drivers/gpu/drm/nouveau/nouveau_fence.c:418:24: sparse:     expected struct nouveau_channel [noderef] __rcu *channel
   drivers/gpu/drm/nouveau/nouveau_fence.c:418:24: sparse:     got struct nouveau_channel *chan

vim +210 drivers/gpu/drm/nouveau/nouveau_fence.c

   206	
   207	int
   208	nouveau_fence_emit(struct nouveau_fence *fence)
   209	{
 > 210		struct nouveau_channel *chan = fence->channel;
   211		struct nouveau_fence_chan *fctx = chan->fence;
   212		struct nouveau_fence_priv *priv = (void*)chan->drm->fence;
   213		int ret;
   214	
   215		fence->timeout  = jiffies + (15 * HZ);
   216	
   217		if (priv->uevent)
   218			dma_fence_init(&fence->base, &nouveau_fence_ops_uevent,
   219				       &fctx->lock, fctx->context, ++fctx->sequence);
   220		else
   221			dma_fence_init(&fence->base, &nouveau_fence_ops_legacy,
   222				       &fctx->lock, fctx->context, ++fctx->sequence);
   223		kref_get(&fctx->fence_ref);
   224	
   225		ret = fctx->emit(fence);
   226		if (!ret) {
   227			dma_fence_get(&fence->base);
   228			spin_lock_irq(&fctx->lock);
   229	
   230			if (unlikely(fctx->killed)) {
   231				spin_unlock_irq(&fctx->lock);
   232				dma_fence_put(&fence->base);
   233				return -ENODEV;
   234			}
   235	
   236			if (nouveau_fence_update(chan, fctx))
   237				nvif_event_block(&fctx->event);
   238	
   239			list_add_tail(&fence->head, &fctx->pending);
   240			spin_unlock_irq(&fctx->lock);
   241		}
   242	
   243		return ret;
   244	}
   245	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki


                 reply	other threads:[~2023-09-05 12:45 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202309052034.pmZzofzh-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=airlied@redhat.com \
    --cc=dakr@redhat.com \
    --cc=linux-mm@kvack.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox