All of lore.kernel.org
 help / color / mirror / Atom feed
* [dgc-xfs:vfs-scale 4/11] lib/dlock-list.c:67:16: error: assigning to 'struct cpumask *' from 'const struct cpumask *' discards qualifiers
@ 2023-12-06 15:39 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2023-12-06 15:39 UTC (permalink / raw)
  To: Dave Chinner; +Cc: oe-kbuild-all

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dgc/linux-xfs.git vfs-scale
head:   5e5e95a86ea3aa15d83654ec3752451959a689e6
commit: 7a215da6235ea23015452201ae78f1664c27ab8a [4/11] lib/dlock-list: Make sibling CPUs share the same linked list
config: x86_64-buildonly-randconfig-001-20231206 (https://download.01.org/0day-ci/archive/20231206/202312062348.Mq7trSIx-lkp@intel.com/config)
compiler: clang version 16.0.4 (https://github.com/llvm/llvm-project.git ae42196bc493ffe877a7e3dff8be32035dea4d07)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20231206/202312062348.Mq7trSIx-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/202312062348.Mq7trSIx-lkp@intel.com/

All errors (new ones prefixed by >>):

>> lib/dlock-list.c:67:16: error: assigning to 'struct cpumask *' from 'const struct cpumask *' discards qualifiers [-Werror,-Wincompatible-pointer-types-discards-qualifiers]
                   sibling_mask = topology_sibling_cpumask(cpu);
                                ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   1 error generated.


vim +67 lib/dlock-list.c

    36	
    37	/*
    38	 * Initialize cpu2idx mapping table & nr_dlock_lists.
    39	 *
    40	 * It is possible that a dlock-list can be allocated before the cpu2idx is
    41	 * initialized. In this case, all the cpus are mapped to the first entry
    42	 * before initialization.
    43	 *
    44	 * All the sibling CPUs of a sibling group will map to the same dlock list so
    45	 * as to reduce the number of dlock lists to be maintained while minimizing
    46	 * cacheline contention.
    47	 *
    48	 * As the sibling masks are set up in the core initcall phase, this function
    49	 * has to be done in the postcore phase to get the right data.
    50	 */
    51	static int __init cpu2idx_init(void)
    52	{
    53		int idx, cpu;
    54		struct cpumask *sibling_mask;
    55		static struct cpumask mask __initdata;
    56	
    57		cpumask_clear(&mask);
    58		idx = 0;
    59		for_each_possible_cpu(cpu) {
    60			int scpu;
    61	
    62			if (cpumask_test_cpu(cpu, &mask))
    63				continue;
    64			per_cpu(cpu2idx, cpu) = idx;
    65			cpumask_set_cpu(cpu, &mask);
    66	
  > 67			sibling_mask = topology_sibling_cpumask(cpu);
    68			if (sibling_mask) {
    69				for_each_cpu(scpu, sibling_mask) {
    70					per_cpu(cpu2idx, scpu) = idx;
    71					cpumask_set_cpu(scpu, &mask);
    72				}
    73			}
    74			idx++;
    75		}
    76	
    77		/*
    78		 * nr_dlock_lists can only be set after cpu2idx is properly
    79		 * initialized.
    80		 */
    81		smp_mb();
    82		nr_dlock_lists = idx;
    83		WARN_ON(nr_dlock_lists > nr_cpu_ids);
    84	
    85		pr_info("dlock-list: %d head entries per dlock list.\n",
    86			nr_dlock_lists);
    87		return 0;
    88	}
    89	postcore_initcall(cpu2idx_init);
    90	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2023-12-06 15:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-06 15:39 [dgc-xfs:vfs-scale 4/11] lib/dlock-list.c:67:16: error: assigning to 'struct cpumask *' from 'const struct cpumask *' discards qualifiers 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.