mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] genirq/affinity: Fix build waring in __irq_build_affinity_masks
@ 2019-08-28  8:58 Ming Lei
  2019-08-28 10:22 ` [tip: irq/core] genirq/affinity: Remove const qualifier from node_to_cpumask argument tip-bot2 for Ming Lei
  0 siblings, 1 reply; 2+ messages in thread
From: Ming Lei @ 2019-08-28  8:58 UTC (permalink / raw)
  To: Thomas Gleixner
  Cc: linux-kernel, Ming Lei, kbuild test robot, Keith Busch, Jon Derrick

When CONFIG_CPUMASK_OFFSTACK isn't enabled, 'cpumask_var_t' will be
defined as 'typedef struct cpumask cpumask_var_t[1]', so we can't
declare the argument of 'node_to_cpumask' as 'const cpumask_var_t *'
for alloc_nodes_vectors().

Fixes the following warning:

   kernel/irq/affinity.c: In function '__irq_build_affinity_masks':
>> kernel/irq/affinity.c:287:31: warning: passing argument 2 of 'alloc_nodes_vectors' from incompatible pointer type
     alloc_nodes_vectors(numvecs, node_to_cpumask, cpu_mask,
                                  ^
   kernel/irq/affinity.c:128:13: note: expected 'const struct cpumask (*)[1]' but argument is of type 'struct cpumask (*)[1]'
    static void alloc_nodes_vectors(unsigned int numvecs,
                ^

Fixes: b1a5a73e64e9 ("genirq/affinity: Spread vectors on node according to nr_cpu ratio")
Reported-by: kbuild test robot <lkp@intel.com>
Cc: Keith Busch <kbusch@kernel.org>
Cc: Jon Derrick <jonathan.derrick@intel.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
---
 kernel/irq/affinity.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c
index d905e844bf3a..4d89ad4fae3b 100644
--- a/kernel/irq/affinity.c
+++ b/kernel/irq/affinity.c
@@ -126,7 +126,7 @@ static int ncpus_cmp_func(const void *l, const void *r)
  * for each node.
  */
 static void alloc_nodes_vectors(unsigned int numvecs,
-				const cpumask_var_t *node_to_cpumask,
+				cpumask_var_t *node_to_cpumask,
 				const struct cpumask *cpu_mask,
 				const nodemask_t nodemsk,
 				struct cpumask *nmsk,
-- 
2.20.1


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

* [tip: irq/core] genirq/affinity: Remove const qualifier from node_to_cpumask argument
  2019-08-28  8:58 [PATCH] genirq/affinity: Fix build waring in __irq_build_affinity_masks Ming Lei
@ 2019-08-28 10:22 ` tip-bot2 for Ming Lei
  0 siblings, 0 replies; 2+ messages in thread
From: tip-bot2 for Ming Lei @ 2019-08-28 10:22 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: kbuild test robot, Ming Lei, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, linux-kernel

The following commit has been merged into the irq/core branch of tip:

Commit-ID:     101f85b56d03b36418bbf867f67d81710839b0ec
Gitweb:        https://git.kernel.org/tip/101f85b56d03b36418bbf867f67d81710839b0ec
Author:        Ming Lei <ming.lei@redhat.com>
AuthorDate:    Wed, 28 Aug 2019 16:58:15 +08:00
Committer:     Thomas Gleixner <tglx@linutronix.de>
CommitterDate: Wed, 28 Aug 2019 12:20:43 +02:00

genirq/affinity: Remove const qualifier from node_to_cpumask argument

When CONFIG_CPUMASK_OFFSTACK isn't enabled, 'cpumask_var_t' is as

'typedef struct cpumask cpumask_var_t[1]',

so the argument 'node_to_cpumask' alloc_nodes_vectors() can't be declared
as 'const cpumask_var_t *'

Fixes the following warning:

   kernel/irq/affinity.c: In function '__irq_build_affinity_masks':
     alloc_nodes_vectors(numvecs, node_to_cpumask, cpu_mask,
                                  ^
   kernel/irq/affinity.c:128:13: note: expected 'const struct cpumask (*)[1]' but argument is of type 'struct cpumask (*)[1]'
    static void alloc_nodes_vectors(unsigned int numvecs,
                ^
Fixes: b1a5a73e64e9 ("genirq/affinity: Spread vectors on node according to nr_cpu ratio")
Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Link: https://lkml.kernel.org/r/20190828085815.19931-1-ming.lei@redhat.com

---
 kernel/irq/affinity.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c
index d905e84..4d89ad4 100644
--- a/kernel/irq/affinity.c
+++ b/kernel/irq/affinity.c
@@ -126,7 +126,7 @@ static int ncpus_cmp_func(const void *l, const void *r)
  * for each node.
  */
 static void alloc_nodes_vectors(unsigned int numvecs,
-				const cpumask_var_t *node_to_cpumask,
+				cpumask_var_t *node_to_cpumask,
 				const struct cpumask *cpu_mask,
 				const nodemask_t nodemsk,
 				struct cpumask *nmsk,

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

end of thread, other threads:[~2019-08-28 10:22 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-28  8:58 [PATCH] genirq/affinity: Fix build waring in __irq_build_affinity_masks Ming Lei
2019-08-28 10:22 ` [tip: irq/core] genirq/affinity: Remove const qualifier from node_to_cpumask argument tip-bot2 for Ming Lei

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®