Skip to contentSkip to conversation

KVM: x86: Fix error & warning in i8254.h

PATCH In review [email protected] 2 participants 2 messages Jul 12, 2023 – Jul 18, 2023 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

PATCH 1/1 KVM: x86: Fix error & warning in i8254.h

The following checkpatch error & warning are removed:
WARNING: please, no space before tabs
ERROR: Macros with complex values should be enclosed in parentheses

---
 arch/x86/kvm/i8254.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/kvm/i8254.h +2 -2
index a768212ba821..89eab61cfc51 100644
@@ -27,7 +27,7 @@ struct kvm_kpit_state {
     struct kvm_kpit_channel_state channels[3];
     u32 flags;
     bool is_periodic;
-    s64 period;                 /* unit: ns */
+    s64 period;                /* unit: ns */
     struct hrtimer timer;
 
     struct mutex lock;
@@ -52,7 +52,7 @@ struct kvm_pit {
 #define KVM_SPEAKER_BASE_ADDRESS    0x61
 #define KVM_PIT_MEM_LENGTH        4
 #define KVM_PIT_FREQ            1193181
-#define KVM_MAX_PIT_INTR_INTERVAL   HZ / 100
+#define KVM_MAX_PIT_INTR_INTERVAL   (HZ / 100)
 #define KVM_PIT_CHANNEL_MASK        0x3
 
 struct kvm_pit *kvm_create_pit(struct kvm *kvm, u32 flags);
#2 lore raw
Quoted 12 lines · On 12/7/23 08:02, [email protected] wrote:

The following checkpatch error & warning are removed:
WARNING: please, no space before tabs
ERROR: Macros with complex values should be enclosed in parentheses

---
  arch/x86/kvm/i8254.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

     struct mutex lock;

arch/x86/kvm/i8254.h struct kvm_pit { · line 55

Quoted 5 lines
arch/x86/kvm/i8254.h +1 -1
@@ -52,7 +52,7 @@ struct kvm_pit {
  #define KVM_SPEAKER_BASE_ADDRESS    0x61
  #define KVM_PIT_MEM_LENGTH        4
  #define KVM_PIT_FREQ            1193181
-#define KVM_MAX_PIT_INTR_INTERVAL   HZ / 100
+#define KVM_MAX_PIT_INTR_INTERVAL   (HZ / 100)

This looks like dead code, maybe better just remove?

Quoted 3 lines
arch/x86/kvm/i8254.h +0 -0
  #define KVM_PIT_CHANNEL_MASK        0x3
 
  struct kvm_pit *kvm_create_pit(struct kvm *kvm, u32 flags);