lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202201261947.fXVOY521-lkp@intel.com>
Date:   Wed, 26 Jan 2022 19:54:30 +0800
From:   kernel test robot <lkp@...el.com>
To:     James Morse <james.morse@....com>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org
Subject: [morse:mpam/snapshot/v5.16 92/137]
 drivers/platform/mpam/mpam_devices.c:277:5: warning: no previous prototype
 for 'mpam_ris_get_affinity'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git mpam/snapshot/v5.16
head:   364c1c42b229912132e1615c2ce15be7154e2156
commit: 14660e9725835a4ec28fbc00f4f5f742c673383f [92/137] arm_mpam: Add the class and component structures for ris firmware described
config: arm64-allyesconfig (https://download.01.org/0day-ci/archive/20220126/202201261947.fXVOY521-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 11.2.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://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git/commit/?id=14660e9725835a4ec28fbc00f4f5f742c673383f
        git remote add morse https://git.kernel.org/pub/scm/linux/kernel/git/morse/linux.git
        git fetch --no-tags morse mpam/snapshot/v5.16
        git checkout 14660e9725835a4ec28fbc00f4f5f742c673383f
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-11.2.0 make.cross O=build_dir ARCH=arm64 SHELL=/bin/bash drivers/platform/mpam/

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

All warnings (new ones prefixed by >>):

>> drivers/platform/mpam/mpam_devices.c:277:5: warning: no previous prototype for 'mpam_ris_get_affinity' [-Wmissing-prototypes]
     277 | int mpam_ris_get_affinity(struct mpam_msc *msc, cpumask_t *affinity,
         |     ^~~~~~~~~~~~~~~~~~~~~
>> drivers/platform/mpam/mpam_devices.c:310:5: warning: no previous prototype for 'mpam_ris_create_locked' [-Wmissing-prototypes]
     310 | int mpam_ris_create_locked(struct mpam_msc *msc, u8 ris_idx,
         |     ^~~~~~~~~~~~~~~~~~~~~~
   drivers/platform/mpam/mpam_devices.c:567:5: warning: no previous prototype for 'mpam_msc_drv_remove' [-Wmissing-prototypes]
     567 | int mpam_msc_drv_remove(struct platform_device *pdev)
         |     ^~~~~~~~~~~~~~~~~~~


vim +/mpam_ris_get_affinity +277 drivers/platform/mpam/mpam_devices.c

   276	
 > 277	int mpam_ris_get_affinity(struct mpam_msc *msc, cpumask_t *affinity,
   278				  enum mpam_class_types type, struct mpam_class *class,
   279				  struct mpam_component *comp)
   280	{
   281		int err;
   282	
   283		switch (type) {
   284		case MPAM_CLASS_CACHE:
   285			err = get_cpumask_from_cache_id(comp->comp_id, class->level,
   286							affinity);
   287			if (err)
   288				return err;
   289	
   290			if (cpumask_empty(affinity))
   291				pr_warn_once("%s no CPUs associated with cache node",
   292					     dev_name(&msc->pdev->dev));
   293	
   294			break;
   295		case MPAM_CLASS_MEMORY:
   296			*affinity = *cpumask_of_node(comp->comp_id);
   297			if (cpumask_empty(affinity))
   298				pr_warn_once("%s no CPUs associated with memory node",
   299					     dev_name(&msc->pdev->dev));
   300			break;
   301		case MPAM_CLASS_UNKNOWN:
   302			return 0;
   303		}
   304	
   305		cpumask_and(affinity, affinity, &msc->accessibility);
   306	
   307		return 0;
   308	}
   309	
 > 310	int mpam_ris_create_locked(struct mpam_msc *msc, u8 ris_idx,
   311				   enum mpam_class_types type, u8 class_id,
   312				   int component_id, gfp_t gfp)
   313	{
   314		int err;
   315		struct mpam_msc_ris *ris;
   316		struct mpam_class *class;
   317		struct mpam_component *comp;
   318	
   319		lockdep_assert_held(&mpam_list_lock);
   320	
   321		if (test_and_set_bit(ris_idx, msc->ris_idxs))
   322			return -EBUSY;
   323	
   324		ris = devm_kzalloc(&msc->pdev->dev, sizeof(*ris), gfp);
   325		if (!ris)
   326			return -ENOMEM;
   327	
   328		class = mpam_class_get(class_id, type, true, gfp);
   329		if (IS_ERR(class))
   330			return PTR_ERR(class);
   331	
   332		comp = mpam_component_get(class, component_id, true, gfp);
   333		if (IS_ERR(comp)) {
   334			if (list_empty(&class->components))
   335				mpam_class_destroy(class);
   336			return PTR_ERR(comp);
   337		}
   338	
   339		err = mpam_ris_get_affinity(msc, &ris->affinity, type, class, comp);
   340		if (err) {
   341			if (list_empty(&class->components))
   342				mpam_class_destroy(class);
   343			return err;
   344		}
   345	
   346		ris->ris_idx = ris_idx;
   347		INIT_LIST_HEAD_RCU(&ris->comp_list);
   348		INIT_LIST_HEAD_RCU(&ris->msc_list);
   349		ris->msc = msc;
   350		ris->comp = comp;
   351	
   352		cpumask_or(&comp->affinity, &comp->affinity, &ris->affinity);
   353		cpumask_or(&class->affinity, &class->affinity, &ris->affinity);
   354		list_add_rcu(&ris->comp_list, &comp->ris);
   355	
   356		return 0;
   357	}
   358	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ