From: Thomas Gleixner <tglx@linutronix.de>
To: LKML <linux-kernel@vger.kernel.org>
Cc: x86@kernel.org
Subject: [patch 15/15] x86/ioapic: Cleanup remaining coding style issues
Date: Fri, 2 Aug 2024 18:15:52 +0200 (CEST) [thread overview]
Message-ID: <20240802155441.158662179@linutronix.de> (raw)
In-Reply-To: 20240802155038.556977544@linutronix.de
Add missing new lines and reorder variable definitions.
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
---
arch/x86/kernel/apic/io_apic.c | 23 ++++++++++++-----------
1 file changed, 12 insertions(+), 11 deletions(-)
--- a/arch/x86/kernel/apic/io_apic.c
+++ b/arch/x86/kernel/apic/io_apic.c
@@ -264,12 +264,14 @@ static __attribute_const__ struct io_api
static inline void io_apic_eoi(unsigned int apic, unsigned int vector)
{
struct io_apic __iomem *io_apic = io_apic_base(apic);
+
writel(vector, &io_apic->eoi);
}
unsigned int native_io_apic_read(unsigned int apic, unsigned int reg)
{
struct io_apic __iomem *io_apic = io_apic_base(apic);
+
writel(reg, &io_apic->index);
return readl(&io_apic->data);
}
@@ -880,9 +882,9 @@ static bool mp_check_pin_attr(int irq, s
static int alloc_irq_from_domain(struct irq_domain *domain, int ioapic, u32 gsi,
struct irq_alloc_info *info)
{
+ int type = ioapics[ioapic].irqdomain_cfg.type;
bool legacy = false;
int irq = -1;
- int type = ioapics[ioapic].irqdomain_cfg.type;
switch (type) {
case IOAPIC_DOMAIN_LEGACY:
@@ -951,11 +953,11 @@ static int alloc_isa_irq_from_domain(str
static int mp_map_pin_to_irq(u32 gsi, int idx, int ioapic, int pin,
unsigned int flags, struct irq_alloc_info *info)
{
- int irq;
- bool legacy = false;
+ struct irq_domain *domain = mp_ioapic_irqdomain(ioapic);
struct irq_alloc_info tmp;
struct mp_chip_data *data;
- struct irq_domain *domain = mp_ioapic_irqdomain(ioapic);
+ bool legacy = false;
+ int irq;
if (!domain)
return -ENOSYS;
@@ -1269,8 +1271,7 @@ static struct { int pin, apic; } ioapic_
void __init enable_IO_APIC(void)
{
- int i8259_apic, i8259_pin;
- int apic, pin;
+ int i8259_apic, i8259_pin, apic, pin;
if (ioapic_is_disabled)
nr_ioapics = 0;
@@ -1943,9 +1944,9 @@ static void lapic_register_intr(int irq)
*/
static inline void __init unlock_ExtINT_logic(void)
{
- int apic, pin, i;
- struct IO_APIC_route_entry entry0, entry1;
unsigned char save_control, save_freq_select;
+ struct IO_APIC_route_entry entry0, entry1;
+ int apic, pin, i;
u32 apic_id;
pin = find_isa_irq_pin(8, mp_INT);
@@ -2211,11 +2212,11 @@ static inline void __init check_timer(vo
static int mp_irqdomain_create(int ioapic)
{
- struct irq_domain *parent;
+ struct mp_ioapic_gsi *gsi_cfg = mp_ioapic_gsi_routing(ioapic);
int hwirqs = mp_ioapic_pin_count(ioapic);
struct ioapic *ip = &ioapics[ioapic];
struct ioapic_domain_cfg *cfg = &ip->irqdomain_cfg;
- struct mp_ioapic_gsi *gsi_cfg = mp_ioapic_gsi_routing(ioapic);
+ struct irq_domain *parent;
struct fwnode_handle *fn;
struct irq_fwspec fwspec;
@@ -2491,8 +2492,8 @@ static struct resource *ioapic_resources
static struct resource * __init ioapic_setup_resources(void)
{
- unsigned long n;
struct resource *res;
+ unsigned long n;
char *mem;
int i;
next prev parent reply other threads:[~2024-08-02 16:15 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-08-02 16:15 [patch 00/15] x86/ioapic: Robustness fix and cleanup Thomas Gleixner
2024-08-02 16:15 ` [patch 01/15] x86/ioapic: Handle allocation failures gracefully Thomas Gleixner
2024-08-05 12:53 ` Breno Leitao
2024-08-02 16:15 ` [patch 02/15] x86/ioapic: Mark mp_alloc_timer_irq() __init Thomas Gleixner
2024-08-05 12:55 ` Breno Leitao
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 03/15] x86/ioapic: Cleanup structs Thomas Gleixner
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 04/15] x86/ioapic: Use guard() for locking where applicable Thomas Gleixner
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 05/15] x86/apic: Provide apic_printk() helpers Thomas Gleixner
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 06/15] x86/apic: Cleanup apic_printk()s Thomas Gleixner
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 07/15] x86/ioapic: " Thomas Gleixner
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 08/15] x86/ioapic: Cleanup guarded debug printk()s Thomas Gleixner
2024-08-04 14:34 ` Qiuxu Zhuo
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 09/15] x86/mpparse: Cleanup apic_printk()s Thomas Gleixner
2024-08-04 14:45 ` Qiuxu Zhuo
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 10/15] iommu/vt-d: Cleanup apic_printk() Thomas Gleixner
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 11/15] x86/ioapic: Move replace_pin_at_irq_node() to the call site Thomas Gleixner
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 12/15] x86/ioapic: Cleanup comments Thomas Gleixner
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 13/15] x86/ioapic: Cleanup bracket usage Thomas Gleixner
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` [patch 14/15] x86/ioapic: Cleanup line breaks Thomas Gleixner
2024-08-07 16:25 ` [tip: x86/apic] " tip-bot2 for Thomas Gleixner
2024-08-02 16:15 ` Thomas Gleixner [this message]
2024-08-07 16:25 ` [tip: x86/apic] x86/ioapic: Cleanup remaining coding style issues tip-bot2 for Thomas Gleixner
2024-08-04 15:06 ` [patch 00/15] x86/ioapic: Robustness fix and cleanup Qiuxu Zhuo
2024-08-05 13:00 ` Breno Leitao
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=20240802155441.158662179@linutronix.de \
--to=tglx@linutronix.de \
--cc=linux-kernel@vger.kernel.org \
--cc=x86@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