diff mbox series

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

Message ID f1a0806ffdb74240f9bfbba9f4ece732@208suo.com (mailing list archive)
State New, archived
Headers show
Series KVM: x86: Fix error & warning in i8254.h | expand

Commit Message

shijie001@208suo.com July 12, 2023, 6:02 a.m. UTC
The following checkpatch error & warning are removed:
WARNING: please, no space before tabs
ERROR: Macros with complex values should be enclosed in parentheses

Signed-off-by: Jie Shi <shijie001@208suo.com>
---
  arch/x86/kvm/i8254.h | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Philippe Mathieu-Daudé July 18, 2023, 6:48 a.m. UTC | #1
On 12/7/23 08:02, shijie001@208suo.com wrote:
> The following checkpatch error & warning are removed:
> WARNING: please, no space before tabs
> ERROR: Macros with complex values should be enclosed in parentheses
> 
> Signed-off-by: Jie Shi <shijie001@208suo.com>
> ---
>   arch/x86/kvm/i8254.h | 4 ++--
>   1 file changed, 2 insertions(+), 2 deletions(-)


>       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)

This looks like dead code, maybe better just remove?

>   #define KVM_PIT_CHANNEL_MASK        0x3
> 
>   struct kvm_pit *kvm_create_pit(struct kvm *kvm, u32 flags);
diff mbox series

Patch

diff --git a/arch/x86/kvm/i8254.h b/arch/x86/kvm/i8254.h
index a768212ba821..89eab61cfc51 100644
--- a/arch/x86/kvm/i8254.h
+++ b/arch/x86/kvm/i8254.h
@@ -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);