KVM: x86: Fix error & warning in i8254.h
A message that is not in the archive (sent off-list or not yet received): [email protected]
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
Signed-off-by Jie Shi <[email protected]>
--- arch/x86/kvm/i8254.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/x86/kvm/i8254.h +2 -2
@@ -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 0x3struct kvm_pit *kvm_create_pit (struct kvm *kvm,u32 flags);
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 parenthesesSigned-off-by Jie Shi <[email protected]>--- 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);