hpet: Make cmd parameter of hpet_ioctl_common() unsigned
PATCH 1/1 hpet: Make cmd parameter of hpet_ioctl_common() unsigned
The value passed by the two callers of the function is unsigned anyway.
Making the parameter unsigned fixes the following warning when building with clang:
drivers/char/hpet.c:588:7: error: overflow converting case value to switch condition type (2149083139 to 18446744071563667459) [-Werror,-Wswitch]
case HPET_INFO:
^
include/uapi/linux/hpet.h:18:19: note: expanded from macro 'HPET_INFO'
^
include/uapi/asm-generic/ioctl.h:77:28: note: expanded from macro '_IOR'
^
include/uapi/asm-generic/ioctl.h:66:2: note: expanded from macro '_IOC'
(((dir) << _IOC_DIRSHIFT) | \--- drivers/char/hpet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/char/hpet.c +1 -1
@@ -574,7 +574,7 @@ static inline unsigned long hpet_time_div(struct hpets *hpets, }static int -hpet_ioctl_common (struct hpet_dev *devp,int cmd,unsigned long arg, +hpet_ioctl_common (struct hpet_dev *devp,unsigned int cmd,unsigned long arg,struct hpet_info *info) {struct hpet_timer __iomem *timer;
Signature · 1 line
2.12.0.246.ga2ecc84866-goog
Quoted 1 line · Matthias Kaehlcke
The value passed by the two callers of the function is unsigned anyway.
Indeed; and those are just simple wrappers.
Quoted 13 lines
Making the parameter unsigned fixes the following warning when building with clang:
drivers/char/hpet.c:588:7: error: overflow converting case value to switch condition type (2149083139 to 18446744071563667459) [-Werror,-Wswitch]case HPET_INFO: ^ include/uapi/linux/hpet.h:18:19: note: expanded from macro 'HPET_INFO' ^ include/uapi/asm-generic/ioctl.h:77:28: note: expanded from macro '_IOR' ^ include/uapi/asm-generic/ioctl.h:66:2: note: expanded from macro '_IOC' (((dir) << _IOC_DIRSHIFT) | \
Quoted 1 line
Signed-off-by Matthias Kaehlcke <[email protected]>
Quoted 17 lines
--- drivers/char/hpet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/char/hpet.c +1
-1@@ -574,7 +574,7 @@ static inline unsigned long hpet_time_div(struct hpets *hpets, }static int -hpet_ioctl_common (struct hpet_dev *devp,int cmd,unsigned long arg, +hpet_ioctl_common (struct hpet_dev *devp,unsigned int cmd,unsigned long arg,struct hpet_info *info) {struct hpet_timer __iomem *timer;
Quoted 18 lines · Clemens Ladisch
Quoted 1 line · Matthias Kaehlcke
The value passed by the two callers of the function is unsigned anyway.
Indeed; and those are just simple wrappers.
Quoted 13 lines
Making the parameter unsigned fixes the following warning when building with clang:
drivers/char/hpet.c:588:7: error: overflow converting case value to switch condition type (2149083139 to 18446744071563667459) [-Werror,-Wswitch]case HPET_INFO: ^ include/uapi/linux/hpet.h:18:19: note: expanded from macro 'HPET_INFO' ^ include/uapi/asm-generic/ioctl.h:77:28: note: expanded from macro '_IOR' ^ include/uapi/asm-generic/ioctl.h:66:2: note: expanded from macro '_IOC' (((dir) << _IOC_DIRSHIFT) | \
Quoted 3 lines
Quoted 1 line
Signed-off-by Matthias Kaehlcke <[email protected]>Acked-by Clemens Ladisch <[email protected]>
Any other feedback on this patch?
Or has this already been added to someone's "for-linus" branch?
just looking for update on patch status.
cheers,
grant
Quoted 18 lines
Quoted 18 lines
--- drivers/char/hpet.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)drivers/char/hpet.c +1
-1@@ -574,7 +574,7 @@ static inline unsigned long hpet_time_div(struct hpets *hpets, }static int -hpet_ioctl_common (struct hpet_dev *devp,int cmd,unsigned long arg, +hpet_ioctl_common (struct hpet_dev *devp,unsigned int cmd,unsigned long arg,struct hpet_info *info) {struct hpet_timer __iomem *timer;
Greg Kroah-Hartman
maintainerQuoted 19 lines · Grant Grundler
Quoted 18 lines · Clemens Ladisch
Quoted 1 line · Matthias Kaehlcke
The value passed by the two callers of the function is unsigned anyway.
Indeed; and those are just simple wrappers.
Quoted 13 lines
Making the parameter unsigned fixes the following warning when building with clang:
drivers/char/hpet.c:588:7: error: overflow converting case value to switch condition type (2149083139 to 18446744071563667459) [-Werror,-Wswitch]case HPET_INFO: ^ include/uapi/linux/hpet.h:18:19: note: expanded from macro 'HPET_INFO' ^ include/uapi/asm-generic/ioctl.h:77:28: note: expanded from macro '_IOR' ^ include/uapi/asm-generic/ioctl.h:66:2: note: expanded from macro '_IOC' (((dir) << _IOC_DIRSHIFT) | \
Quoted 8 lines
Quoted 3 lines
Quoted 1 line
Signed-off-by Matthias Kaehlcke <[email protected]>Acked-by Clemens Ladisch <[email protected]>Any other feedback on this patch?
Or has this already been added to someone's "for-linus" branch?just looking for update on patch status.
This is already in my -next branch, to go into 4.12-rc1. Should it get into 4.11-final instead?
thanks,
greg k-h
Quoted 24 lines · Greg Kroah-Hartman
Quoted 23 lines · Grant Grundler
Quoted 21 lines · Clemens Ladisch
Quoted 1 line · Matthias Kaehlcke
The value passed by the two callers of the function is unsigned anyway.
Indeed; and those are just simple wrappers.
Quoted 13 lines
Making the parameter unsigned fixes the following warning when building with clang:
drivers/char/hpet.c:588:7: error: overflow converting case value to switch condition type (2149083139 to 18446744071563667459) [-Werror,-Wswitch]case HPET_INFO: ^ include/uapi/linux/hpet.h:18:19: note: expanded from macro 'HPET_INFO' ^ include/uapi/asm-generic/ioctl.h:77:28: note: expanded from macro '_IOR' ^ include/uapi/asm-generic/ioctl.h:66:2: note: expanded from macro '_IOC' (((dir) << _IOC_DIRSHIFT) | \Quoted 1 line
Signed-off-by Matthias Kaehlcke <[email protected]>Acked-by Clemens Ladisch <[email protected]>
Quoted 7 lines
Quoted 4 lines
Any other feedback on this patch?
Or has this already been added to someone's "for-linus" branch?just looking for update on patch status.
This is already in my -next branch, to go into 4.12-rc1. Should it get into 4.11-final instead?
I would say "no" since 4.12-rc1 is good enough for me. Thanks! :)
cheers,
grant
Quoted 4 lines
thanks,
greg k-h