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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20190828085815.19931-1-ming.lei@redhat.com>
Date:   Wed, 28 Aug 2019 16:58:15 +0800
From:   Ming Lei <ming.lei@...hat.com>
To:     Thomas Gleixner <tglx@...utronix.de>
Cc:     linux-kernel@...r.kernel.org, Ming Lei <ming.lei@...hat.com>,
        kbuild test robot <lkp@...el.com>,
        Keith Busch <kbusch@...nel.org>,
        Jon Derrick <jonathan.derrick@...el.com>
Subject: [PATCH] genirq/affinity: Fix build waring in __irq_build_affinity_masks

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@...el.com>
Cc: Keith Busch <kbusch@...nel.org>
Cc: Jon Derrick <jonathan.derrick@...el.com>
Signed-off-by: Ming Lei <ming.lei@...hat.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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ