public inbox for [email protected]
 help / color / mirror / Atom feed
From: kernel test robot <[email protected]>
To: "Michal Koutný" <[email protected]>
Cc: [email protected], Ammar Faizi <[email protected]>,
	GNU/Weeb Mailing List <[email protected]>,
	[email protected], Tejun Heo <[email protected]>
Subject: [ammarfaizi2-block:tj/cgroup/for-6.1 4/6] mm/memcontrol.c:5114:31: sparse: sparse: incorrect type in return expression (different base types)
Date: Sat, 27 Aug 2022 22:33:05 +0800	[thread overview]
Message-ID: <[email protected]> (raw)

tree:   https://github.com/ammarfaizi2/linux-block tj/cgroup/for-6.1
head:   075b593f54f0f3883532cb750081cae6917bc8fe
commit: fa7e439cf90ba23ea473d0b7d85efd02ae6ccf94 [4/6] cgroup: Homogenize cgroup_get_from_id() return value
config: s390-randconfig-s041-20220827 (https://download.01.org/0day-ci/archive/20220827/[email protected]/config)
compiler: s390-linux-gcc (GCC) 12.1.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.4-39-gce1a6720-dirty
        # https://github.com/ammarfaizi2/linux-block/commit/fa7e439cf90ba23ea473d0b7d85efd02ae6ccf94
        git remote add ammarfaizi2-block https://github.com/ammarfaizi2/linux-block
        git fetch --no-tags ammarfaizi2-block tj/cgroup/for-6.1
        git checkout fa7e439cf90ba23ea473d0b7d85efd02ae6ccf94
        # save the config file
        mkdir build_dir && cp config build_dir/.config
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-12.1.0 make.cross C=1 CF='-fdiagnostic-prefix -D__CHECK_ENDIAN__' O=build_dir ARCH=s390 SHELL=/bin/bash

If you fix the issue, kindly add following tag where applicable
Reported-by: kernel test robot <[email protected]>

sparse warnings: (new ones prefixed by >>)
   mm/memcontrol.c:4116:21: sparse: sparse: incompatible types in comparison expression (different address spaces):
   mm/memcontrol.c:4116:21: sparse:    struct mem_cgroup_threshold_ary [noderef] __rcu *
   mm/memcontrol.c:4116:21: sparse:    struct mem_cgroup_threshold_ary *
   mm/memcontrol.c:4118:21: sparse: sparse: incompatible types in comparison expression (different address spaces):
   mm/memcontrol.c:4118:21: sparse:    struct mem_cgroup_threshold_ary [noderef] __rcu *
   mm/memcontrol.c:4118:21: sparse:    struct mem_cgroup_threshold_ary *
   mm/memcontrol.c:4274:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   mm/memcontrol.c:4274:9: sparse:    struct mem_cgroup_threshold_ary [noderef] __rcu *
   mm/memcontrol.c:4274:9: sparse:    struct mem_cgroup_threshold_ary *
   mm/memcontrol.c:4368:9: sparse: sparse: incompatible types in comparison expression (different address spaces):
   mm/memcontrol.c:4368:9: sparse:    struct mem_cgroup_threshold_ary [noderef] __rcu *
   mm/memcontrol.c:4368:9: sparse:    struct mem_cgroup_threshold_ary *
>> mm/memcontrol.c:5114:31: sparse: sparse: incorrect type in return expression (different base types) @@     expected struct mem_cgroup * @@     got long @@
   mm/memcontrol.c:5998:23: sparse: sparse: incompatible types in comparison expression (different address spaces):
   mm/memcontrol.c:5998:23: sparse:    struct task_struct [noderef] __rcu *
   mm/memcontrol.c:5998:23: sparse:    struct task_struct *
   mm/memcontrol.c: note: in included file:
   include/linux/memcontrol.h:754:9: sparse: sparse: context imbalance in 'folio_lruvec_lock' - wrong count at exit
   include/linux/memcontrol.h:754:9: sparse: sparse: context imbalance in 'folio_lruvec_lock_irq' - wrong count at exit
   include/linux/memcontrol.h:754:9: sparse: sparse: context imbalance in 'folio_lruvec_lock_irqsave' - wrong count at exit
   mm/memcontrol.c:2034:6: sparse: sparse: context imbalance in 'folio_memcg_lock' - wrong count at exit
   mm/memcontrol.c:2086:17: sparse: sparse: context imbalance in '__folio_memcg_unlock' - unexpected unlock

vim +5114 mm/memcontrol.c

  5104	
  5105	#ifdef CONFIG_SHRINKER_DEBUG
  5106	struct mem_cgroup *mem_cgroup_get_from_ino(unsigned long ino)
  5107	{
  5108		struct cgroup *cgrp;
  5109		struct cgroup_subsys_state *css;
  5110		struct mem_cgroup *memcg;
  5111	
  5112		cgrp = cgroup_get_from_id(ino);
  5113		if (IS_ERR(cgrp))
> 5114			return PTR_ERR(cgrp);
  5115	
  5116		css = cgroup_get_e_css(cgrp, &memory_cgrp_subsys);
  5117		if (css)
  5118			memcg = container_of(css, struct mem_cgroup, css);
  5119		else
  5120			memcg = ERR_PTR(-ENOENT);
  5121	
  5122		cgroup_put(cgrp);
  5123	
  5124		return memcg;
  5125	}
  5126	#endif
  5127	

-- 
0-DAY CI Kernel Test Service
https://01.org/lkp

                 reply	other threads:[~2022-08-27 14:33 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 \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    [email protected] \
    /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