mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rasmus Villemoes <linux@rasmusvillemoes.dk>
To: Russell King <linux@armlinux.org.uk>
Cc: Li Yang <leoyang.li@nxp.com>, Marc Zyngier <maz@kernel.org>,
	Rasmus Villemoes <linux@rasmusvillemoes.dk>,
	kbuild test robot <lkp@intel.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH] arm: avoid cpumask_t typedef in arch_trigger_cpumask_backtrace
Date: Thu, 21 Nov 2019 10:25:16 +0100	[thread overview]
Message-ID: <20191121092516.9041-1-linux@rasmusvillemoes.dk> (raw)

I was trying to enable a previously PPC-only driver for ARM. That
driver happens to include asm/irq.h without some previous header
recursively pulling in linux/cpumask.h, resulting in kbuild kindly
informing me [1]

   In file included from drivers/soc/fsl/qe/ucc.c:18:0:
>> arch/arm/include/asm/irq.h:34:50: error: unknown type name 'cpumask_t'
    extern void arch_trigger_cpumask_backtrace(const cpumask_t *mask,

Instead of including linux/cpumask.h from asm/irq.h just for the
cpumask_t typedef, use the spelling "struct cpumask" and add a
forward declaration of that. For consistency, update the definition of
the function accordingly.

No functional change.

[1] https://lore.kernel.org/lkml/201911210258.dfd8HF9z%25lkp@intel.com/

Reported-by: kbuild test robot <lkp@intel.com>
Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
---
We're past -rc8, so I probably can't hope for this to make it into
5.4. However, it currently blocks a rather large series of mine from
being picked up and getting time in -next. Would it be ok with the ARM
maintainers if I ask Li Yang to carry this as part of that large
series?

 arch/arm/include/asm/irq.h | 3 ++-
 arch/arm/kernel/smp.c      | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/arch/arm/include/asm/irq.h b/arch/arm/include/asm/irq.h
index 46d41140df27..d8deb81bc8ce 100644
--- a/arch/arm/include/asm/irq.h
+++ b/arch/arm/include/asm/irq.h
@@ -31,7 +31,8 @@ void handle_IRQ(unsigned int, struct pt_regs *);
 void init_IRQ(void);
 
 #ifdef CONFIG_SMP
-extern void arch_trigger_cpumask_backtrace(const cpumask_t *mask,
+struct cpumask;
+extern void arch_trigger_cpumask_backtrace(const struct cpumask *mask,
 					   bool exclude_self);
 #define arch_trigger_cpumask_backtrace arch_trigger_cpumask_backtrace
 #endif
diff --git a/arch/arm/kernel/smp.c b/arch/arm/kernel/smp.c
index 4b0bab2607e4..b096200c7436 100644
--- a/arch/arm/kernel/smp.c
+++ b/arch/arm/kernel/smp.c
@@ -806,7 +806,8 @@ static void raise_nmi(cpumask_t *mask)
 	__smp_cross_call(mask, IPI_CPU_BACKTRACE);
 }
 
-void arch_trigger_cpumask_backtrace(const cpumask_t *mask, bool exclude_self)
+void arch_trigger_cpumask_backtrace(const struct cpumask *mask,
+				    bool exclude_self)
 {
 	nmi_trigger_cpumask_backtrace(mask, exclude_self, raise_nmi);
 }
-- 
2.23.0


                 reply	other threads:[~2019-11-21  9:25 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 \
    --in-reply-to=20191121092516.9041-1-linux@rasmusvillemoes.dk \
    --to=linux@rasmusvillemoes.dk \
    --cc=leoyang.li@nxp.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=lkp@intel.com \
    --cc=maz@kernel.org \
    /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

all inboxes | Powered by JetHome®