* [PATCH] KVM: x86: Fix errors & warnings in irq_comm.c
[not found] <tencent_63276CF92B7FBBDB6AACD9CB27A3C9B0ED07@qq.com>
@ 2023-07-12 6:21 ` shijie001
2023-07-18 6:46 ` Philippe Mathieu-Daudé
0 siblings, 1 reply; 2+ messages in thread
From: shijie001 @ 2023-07-12 6:21 UTC (permalink / raw)
To: tglx, mingo, bp, dave.hansen, x86; +Cc: hpa, kvm, linux-kernel
The following checkpatch errors & warnings are removed:
WARNING: Missing a blank line after declarations
WARNING: Prefer 'unsigned int' to bare use of 'unsigned'
ERROR: Macros with complex values should be enclosed in parentheses
Signed-off-by: Jie Shi <shijie001@208suo.com>
---
arch/x86/kvm/irq_comm.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/arch/x86/kvm/irq_comm.c b/arch/x86/kvm/irq_comm.c
index 16d076a1b91a..38a759606bef 100644
--- a/arch/x86/kvm/irq_comm.c
+++ b/arch/x86/kvm/irq_comm.c
@@ -32,6 +32,7 @@ static int kvm_set_pic_irq(struct
kvm_kernel_irq_routing_entry *e,
bool line_status)
{
struct kvm_pic *pic = kvm->arch.vpic;
+
return kvm_pic_set_irq(pic, e->irqchip.pin, irq_source_id, level);
}
@@ -40,6 +41,7 @@ static int kvm_set_ioapic_irq(struct
kvm_kernel_irq_routing_entry *e,
bool line_status)
{
struct kvm_ioapic *ioapic = kvm->arch.vioapic;
+
return kvm_ioapic_set_irq(ioapic, e->irqchip.pin, irq_source_id,
level,
line_status);
}
@@ -253,7 +255,7 @@ void kvm_unregister_irq_mask_notifier(struct kvm
*kvm, int irq,
synchronize_srcu(&kvm->irq_srcu);
}
-void kvm_fire_mask_notifiers(struct kvm *kvm, unsigned irqchip,
unsigned pin,
+void kvm_fire_mask_notifiers(struct kvm *kvm, unsigned int irqchip,
unsigned int pin,
bool mask)
{
struct kvm_irq_mask_notifier *kimn;
@@ -365,7 +367,7 @@ EXPORT_SYMBOL_GPL(kvm_intr_is_single_vcpu);
#define PIC_ROUTING_ENTRY(irq) \
{ .gsi = irq, .type = KVM_IRQ_ROUTING_IRQCHIP, \
- .u.irqchip = { .irqchip = SELECT_PIC(irq), .pin = (irq) % 8 } }
+ .u.irqchip = { .irqchip = SELECT_PIC(irq), .pin = ((irq) % 8) } }
#define ROUTING_ENTRY2(irq) \
IOAPIC_ROUTING_ENTRY(irq), PIC_ROUTING_ENTRY(irq)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] KVM: x86: Fix errors & warnings in irq_comm.c
2023-07-12 6:21 ` [PATCH] KVM: x86: Fix errors & warnings in irq_comm.c shijie001
@ 2023-07-18 6:46 ` Philippe Mathieu-Daudé
0 siblings, 0 replies; 2+ messages in thread
From: Philippe Mathieu-Daudé @ 2023-07-18 6:46 UTC (permalink / raw)
To: shijie001, tglx, mingo, bp, dave.hansen, x86; +Cc: hpa, kvm, linux-kernel
On 12/7/23 08:21, shijie001@208suo.com wrote:
> ERROR: Macros with complex values should be enclosed in parentheses
>
> Signed-off-by: Jie Shi <shijie001@208suo.com>
> ---
> arch/x86/kvm/irq_comm.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
> @@ -365,7 +367,7 @@ EXPORT_SYMBOL_GPL(kvm_intr_is_single_vcpu);
>
> #define PIC_ROUTING_ENTRY(irq) \
> { .gsi = irq, .type = KVM_IRQ_ROUTING_IRQCHIP, \
> - .u.irqchip = { .irqchip = SELECT_PIC(irq), .pin = (irq) % 8 } }
The value is already enclosed in parentheses... False positive?
> + .u.irqchip = { .irqchip = SELECT_PIC(irq), .pin = ((irq) % 8) } }
> #define ROUTING_ENTRY2(irq) \
> IOAPIC_ROUTING_ENTRY(irq), PIC_ROUTING_ENTRY(irq)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-07-18 6:46 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <tencent_63276CF92B7FBBDB6AACD9CB27A3C9B0ED07@qq.com>
2023-07-12 6:21 ` [PATCH] KVM: x86: Fix errors & warnings in irq_comm.c shijie001
2023-07-18 6:46 ` Philippe Mathieu-Daudé
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®