All of lore.kernel.org
 help / color / mirror / Atom feed
* [s390:features 40/44] drivers/gpu/drm/drm_lock.c:75:24: sparse: sparse: incorrect type in argument 1 (different modifiers)
@ 2021-04-12 17:25 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-04-12 17:25 UTC (permalink / raw)
  To: Heiko Carstens; +Cc: kbuild-all, linux-s390

[-- Attachment #1: Type: text/plain, Size: 6430 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
head:   9d42a4d3e27db3cabad82483ed876d4c8b8bed65
commit: 000174233b91340ca52a9eca905d029a9a2aefd9 [40/44] s390/atomic,cmpxchg: switch to use atomic-instrumented.h
config: s390-randconfig-s032-20210412 (attached as .config)
compiler: s390-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-280-g2cd6d34e-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git/commit/?id=000174233b91340ca52a9eca905d029a9a2aefd9
        git remote add s390 https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git
        git fetch --no-tags s390 features
        git checkout 000174233b91340ca52a9eca905d029a9a2aefd9
        # 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=s390 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/drm_lock.c:75:24: sparse: sparse: incorrect type in argument 1 (different modifiers) @@     expected void *ptr @@     got unsigned int volatile *__ai_ptr @@
   drivers/gpu/drm/drm_lock.c:75:24: sparse:     expected void *ptr
   drivers/gpu/drm/drm_lock.c:75:24: sparse:     got unsigned int volatile *__ai_ptr
   drivers/gpu/drm/drm_lock.c:118:24: sparse: sparse: incorrect type in argument 1 (different modifiers) @@     expected void *ptr @@     got unsigned int volatile *__ai_ptr @@
   drivers/gpu/drm/drm_lock.c:118:24: sparse:     expected void *ptr
   drivers/gpu/drm/drm_lock.c:118:24: sparse:     got unsigned int volatile *__ai_ptr
   drivers/gpu/drm/drm_lock.c:141:24: sparse: sparse: incorrect type in argument 1 (different modifiers) @@     expected void *ptr @@     got unsigned int volatile *__ai_ptr @@
   drivers/gpu/drm/drm_lock.c:141:24: sparse:     expected void *ptr
   drivers/gpu/drm/drm_lock.c:141:24: sparse:     got unsigned int volatile *__ai_ptr
   drivers/gpu/drm/drm_lock.c:319:40: sparse: sparse: incorrect type in argument 1 (different modifiers) @@     expected void *ptr @@     got unsigned int volatile *__ai_ptr @@
   drivers/gpu/drm/drm_lock.c:319:40: sparse:     expected void *ptr
   drivers/gpu/drm/drm_lock.c:319:40: sparse:     got unsigned int volatile *__ai_ptr

vim +75 drivers/gpu/drm/drm_lock.c

4ac5ec40ec7002 Daniel Vetter     2010-08-23  48  
bd50d4a2168370 Benjamin Gaignard 2020-03-06  49  /*
1a75a222f5ca10 Daniel Vetter     2016-06-14  50   * Take the heavyweight lock.
1a75a222f5ca10 Daniel Vetter     2016-06-14  51   *
1a75a222f5ca10 Daniel Vetter     2016-06-14  52   * \param lock lock pointer.
1a75a222f5ca10 Daniel Vetter     2016-06-14  53   * \param context locking context.
1a75a222f5ca10 Daniel Vetter     2016-06-14  54   * \return one if the lock is held, or zero otherwise.
1a75a222f5ca10 Daniel Vetter     2016-06-14  55   *
1a75a222f5ca10 Daniel Vetter     2016-06-14  56   * Attempt to mark the lock as held by the given context, via the \p cmpxchg instruction.
1a75a222f5ca10 Daniel Vetter     2016-06-14  57   */
1a75a222f5ca10 Daniel Vetter     2016-06-14  58  static
1a75a222f5ca10 Daniel Vetter     2016-06-14  59  int drm_lock_take(struct drm_lock_data *lock_data,
1a75a222f5ca10 Daniel Vetter     2016-06-14  60  		  unsigned int context)
1a75a222f5ca10 Daniel Vetter     2016-06-14  61  {
1a75a222f5ca10 Daniel Vetter     2016-06-14  62  	unsigned int old, new, prev;
1a75a222f5ca10 Daniel Vetter     2016-06-14  63  	volatile unsigned int *lock = &lock_data->hw_lock->lock;
1a75a222f5ca10 Daniel Vetter     2016-06-14  64  
1a75a222f5ca10 Daniel Vetter     2016-06-14  65  	spin_lock_bh(&lock_data->spinlock);
1a75a222f5ca10 Daniel Vetter     2016-06-14  66  	do {
1a75a222f5ca10 Daniel Vetter     2016-06-14  67  		old = *lock;
1a75a222f5ca10 Daniel Vetter     2016-06-14  68  		if (old & _DRM_LOCK_HELD)
1a75a222f5ca10 Daniel Vetter     2016-06-14  69  			new = old | _DRM_LOCK_CONT;
1a75a222f5ca10 Daniel Vetter     2016-06-14  70  		else {
1a75a222f5ca10 Daniel Vetter     2016-06-14  71  			new = context | _DRM_LOCK_HELD |
1a75a222f5ca10 Daniel Vetter     2016-06-14  72  				((lock_data->user_waiters + lock_data->kernel_waiters > 1) ?
1a75a222f5ca10 Daniel Vetter     2016-06-14  73  				 _DRM_LOCK_CONT : 0);
1a75a222f5ca10 Daniel Vetter     2016-06-14  74  		}
1a75a222f5ca10 Daniel Vetter     2016-06-14 @75  		prev = cmpxchg(lock, old, new);
1a75a222f5ca10 Daniel Vetter     2016-06-14  76  	} while (prev != old);
1a75a222f5ca10 Daniel Vetter     2016-06-14  77  	spin_unlock_bh(&lock_data->spinlock);
1a75a222f5ca10 Daniel Vetter     2016-06-14  78  
1a75a222f5ca10 Daniel Vetter     2016-06-14  79  	if (_DRM_LOCKING_CONTEXT(old) == context) {
1a75a222f5ca10 Daniel Vetter     2016-06-14  80  		if (old & _DRM_LOCK_HELD) {
1a75a222f5ca10 Daniel Vetter     2016-06-14  81  			if (context != DRM_KERNEL_CONTEXT) {
1a75a222f5ca10 Daniel Vetter     2016-06-14  82  				DRM_ERROR("%d holds heavyweight lock\n",
1a75a222f5ca10 Daniel Vetter     2016-06-14  83  					  context);
1a75a222f5ca10 Daniel Vetter     2016-06-14  84  			}
1a75a222f5ca10 Daniel Vetter     2016-06-14  85  			return 0;
1a75a222f5ca10 Daniel Vetter     2016-06-14  86  		}
1a75a222f5ca10 Daniel Vetter     2016-06-14  87  	}
1a75a222f5ca10 Daniel Vetter     2016-06-14  88  
1a75a222f5ca10 Daniel Vetter     2016-06-14  89  	if ((_DRM_LOCKING_CONTEXT(new)) == context && (new & _DRM_LOCK_HELD)) {
1a75a222f5ca10 Daniel Vetter     2016-06-14  90  		/* Have lock */
1a75a222f5ca10 Daniel Vetter     2016-06-14  91  		return 1;
1a75a222f5ca10 Daniel Vetter     2016-06-14  92  	}
1a75a222f5ca10 Daniel Vetter     2016-06-14  93  	return 0;
1a75a222f5ca10 Daniel Vetter     2016-06-14  94  }
1a75a222f5ca10 Daniel Vetter     2016-06-14  95  

:::::: The code at line 75 was first introduced by commit
:::::: 1a75a222f5ca1063249b5c92972d32dcc3c8966e drm: Hide hw.lock cleanup in filp->release better

:::::: TO: Daniel Vetter <daniel.vetter@ffwll.ch>
:::::: CC: Daniel Vetter <daniel.vetter@ffwll.ch>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 23022 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* [s390:features 40/44] drivers/gpu/drm/drm_lock.c:75:24: sparse: sparse: incorrect type in argument 1 (different modifiers)
@ 2021-04-12 17:25 ` kernel test robot
  0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2021-04-12 17:25 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 6527 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git features
head:   9d42a4d3e27db3cabad82483ed876d4c8b8bed65
commit: 000174233b91340ca52a9eca905d029a9a2aefd9 [40/44] s390/atomic,cmpxchg: switch to use atomic-instrumented.h
config: s390-randconfig-s032-20210412 (attached as .config)
compiler: s390-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-280-g2cd6d34e-dirty
        # https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git/commit/?id=000174233b91340ca52a9eca905d029a9a2aefd9
        git remote add s390 https://git.kernel.org/pub/scm/linux/kernel/git/s390/linux.git
        git fetch --no-tags s390 features
        git checkout 000174233b91340ca52a9eca905d029a9a2aefd9
        # 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=s390 

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


sparse warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/drm_lock.c:75:24: sparse: sparse: incorrect type in argument 1 (different modifiers) @@     expected void *ptr @@     got unsigned int volatile *__ai_ptr @@
   drivers/gpu/drm/drm_lock.c:75:24: sparse:     expected void *ptr
   drivers/gpu/drm/drm_lock.c:75:24: sparse:     got unsigned int volatile *__ai_ptr
   drivers/gpu/drm/drm_lock.c:118:24: sparse: sparse: incorrect type in argument 1 (different modifiers) @@     expected void *ptr @@     got unsigned int volatile *__ai_ptr @@
   drivers/gpu/drm/drm_lock.c:118:24: sparse:     expected void *ptr
   drivers/gpu/drm/drm_lock.c:118:24: sparse:     got unsigned int volatile *__ai_ptr
   drivers/gpu/drm/drm_lock.c:141:24: sparse: sparse: incorrect type in argument 1 (different modifiers) @@     expected void *ptr @@     got unsigned int volatile *__ai_ptr @@
   drivers/gpu/drm/drm_lock.c:141:24: sparse:     expected void *ptr
   drivers/gpu/drm/drm_lock.c:141:24: sparse:     got unsigned int volatile *__ai_ptr
   drivers/gpu/drm/drm_lock.c:319:40: sparse: sparse: incorrect type in argument 1 (different modifiers) @@     expected void *ptr @@     got unsigned int volatile *__ai_ptr @@
   drivers/gpu/drm/drm_lock.c:319:40: sparse:     expected void *ptr
   drivers/gpu/drm/drm_lock.c:319:40: sparse:     got unsigned int volatile *__ai_ptr

vim +75 drivers/gpu/drm/drm_lock.c

4ac5ec40ec7002 Daniel Vetter     2010-08-23  48  
bd50d4a2168370 Benjamin Gaignard 2020-03-06  49  /*
1a75a222f5ca10 Daniel Vetter     2016-06-14  50   * Take the heavyweight lock.
1a75a222f5ca10 Daniel Vetter     2016-06-14  51   *
1a75a222f5ca10 Daniel Vetter     2016-06-14  52   * \param lock lock pointer.
1a75a222f5ca10 Daniel Vetter     2016-06-14  53   * \param context locking context.
1a75a222f5ca10 Daniel Vetter     2016-06-14  54   * \return one if the lock is held, or zero otherwise.
1a75a222f5ca10 Daniel Vetter     2016-06-14  55   *
1a75a222f5ca10 Daniel Vetter     2016-06-14  56   * Attempt to mark the lock as held by the given context, via the \p cmpxchg instruction.
1a75a222f5ca10 Daniel Vetter     2016-06-14  57   */
1a75a222f5ca10 Daniel Vetter     2016-06-14  58  static
1a75a222f5ca10 Daniel Vetter     2016-06-14  59  int drm_lock_take(struct drm_lock_data *lock_data,
1a75a222f5ca10 Daniel Vetter     2016-06-14  60  		  unsigned int context)
1a75a222f5ca10 Daniel Vetter     2016-06-14  61  {
1a75a222f5ca10 Daniel Vetter     2016-06-14  62  	unsigned int old, new, prev;
1a75a222f5ca10 Daniel Vetter     2016-06-14  63  	volatile unsigned int *lock = &lock_data->hw_lock->lock;
1a75a222f5ca10 Daniel Vetter     2016-06-14  64  
1a75a222f5ca10 Daniel Vetter     2016-06-14  65  	spin_lock_bh(&lock_data->spinlock);
1a75a222f5ca10 Daniel Vetter     2016-06-14  66  	do {
1a75a222f5ca10 Daniel Vetter     2016-06-14  67  		old = *lock;
1a75a222f5ca10 Daniel Vetter     2016-06-14  68  		if (old & _DRM_LOCK_HELD)
1a75a222f5ca10 Daniel Vetter     2016-06-14  69  			new = old | _DRM_LOCK_CONT;
1a75a222f5ca10 Daniel Vetter     2016-06-14  70  		else {
1a75a222f5ca10 Daniel Vetter     2016-06-14  71  			new = context | _DRM_LOCK_HELD |
1a75a222f5ca10 Daniel Vetter     2016-06-14  72  				((lock_data->user_waiters + lock_data->kernel_waiters > 1) ?
1a75a222f5ca10 Daniel Vetter     2016-06-14  73  				 _DRM_LOCK_CONT : 0);
1a75a222f5ca10 Daniel Vetter     2016-06-14  74  		}
1a75a222f5ca10 Daniel Vetter     2016-06-14 @75  		prev = cmpxchg(lock, old, new);
1a75a222f5ca10 Daniel Vetter     2016-06-14  76  	} while (prev != old);
1a75a222f5ca10 Daniel Vetter     2016-06-14  77  	spin_unlock_bh(&lock_data->spinlock);
1a75a222f5ca10 Daniel Vetter     2016-06-14  78  
1a75a222f5ca10 Daniel Vetter     2016-06-14  79  	if (_DRM_LOCKING_CONTEXT(old) == context) {
1a75a222f5ca10 Daniel Vetter     2016-06-14  80  		if (old & _DRM_LOCK_HELD) {
1a75a222f5ca10 Daniel Vetter     2016-06-14  81  			if (context != DRM_KERNEL_CONTEXT) {
1a75a222f5ca10 Daniel Vetter     2016-06-14  82  				DRM_ERROR("%d holds heavyweight lock\n",
1a75a222f5ca10 Daniel Vetter     2016-06-14  83  					  context);
1a75a222f5ca10 Daniel Vetter     2016-06-14  84  			}
1a75a222f5ca10 Daniel Vetter     2016-06-14  85  			return 0;
1a75a222f5ca10 Daniel Vetter     2016-06-14  86  		}
1a75a222f5ca10 Daniel Vetter     2016-06-14  87  	}
1a75a222f5ca10 Daniel Vetter     2016-06-14  88  
1a75a222f5ca10 Daniel Vetter     2016-06-14  89  	if ((_DRM_LOCKING_CONTEXT(new)) == context && (new & _DRM_LOCK_HELD)) {
1a75a222f5ca10 Daniel Vetter     2016-06-14  90  		/* Have lock */
1a75a222f5ca10 Daniel Vetter     2016-06-14  91  		return 1;
1a75a222f5ca10 Daniel Vetter     2016-06-14  92  	}
1a75a222f5ca10 Daniel Vetter     2016-06-14  93  	return 0;
1a75a222f5ca10 Daniel Vetter     2016-06-14  94  }
1a75a222f5ca10 Daniel Vetter     2016-06-14  95  

:::::: The code at line 75 was first introduced by commit
:::::: 1a75a222f5ca1063249b5c92972d32dcc3c8966e drm: Hide hw.lock cleanup in filp->release better

:::::: TO: Daniel Vetter <daniel.vetter@ffwll.ch>
:::::: CC: Daniel Vetter <daniel.vetter@ffwll.ch>

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 23022 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-04-12 17:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-12 17:25 [s390:features 40/44] drivers/gpu/drm/drm_lock.c:75:24: sparse: sparse: incorrect type in argument 1 (different modifiers) kernel test robot
2021-04-12 17:25 ` kernel test robot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.