Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1599692 > unrolled thread

[PATCH v1] hpet: Make cmd parameter of hpet_ioctl_common() unsigned

Started byMatthias Kaehlcke <mka@chromium.org>
First post2017-03-13 20:00 +0100
Last post2017-03-24 19:20 +0100
Articles 5 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH v1] hpet: Make cmd parameter of hpet_ioctl_common() unsigned Matthias Kaehlcke <mka@chromium.org> - 2017-03-13 20:00 +0100
    Re: [PATCH v1] hpet: Make cmd parameter of hpet_ioctl_common()  unsigned Clemens Ladisch <clemens@ladisch.de> - 2017-03-14 09:10 +0100
      Re: [PATCH v1] hpet: Make cmd parameter of hpet_ioctl_common() unsigned Grant Grundler <grundler@chromium.org> - 2017-03-23 22:50 +0100
        Re: [PATCH v1] hpet: Make cmd parameter of hpet_ioctl_common()  unsigned Greg Kroah-Hartman <gregkh@linuxfoundation.org> - 2017-03-24 08:00 +0100
          Re: [PATCH v1] hpet: Make cmd parameter of hpet_ioctl_common() unsigned Grant Grundler <grundler@chromium.org> - 2017-03-24 19:20 +0100

#1599692 — [PATCH v1] hpet: Make cmd parameter of hpet_ioctl_common() unsigned

FromMatthias Kaehlcke <mka@chromium.org>
Date2017-03-13 20:00 +0100
Subject[PATCH v1] hpet: Make cmd parameter of hpet_ioctl_common() unsigned
Message-ID<tkDmi-4GD-11@gated-at.bofh.it>
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) | \

Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
---
 drivers/char/hpet.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
index 20b32bb8c2af..0d633b76c29e 100644
--- a/drivers/char/hpet.c
+++ b/drivers/char/hpet.c
@@ -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;
-- 
2.12.0.246.ga2ecc84866-goog

[toc] | [next] | [standalone]


#1600095 — Re: [PATCH v1] hpet: Make cmd parameter of hpet_ioctl_common() unsigned

FromClemens Ladisch <clemens@ladisch.de>
Date2017-03-14 09:10 +0100
SubjectRe: [PATCH v1] hpet: Make cmd parameter of hpet_ioctl_common() unsigned
Message-ID<tkPGO-5DN-9@gated-at.bofh.it>
In reply to#1599692
Matthias Kaehlcke wrote:
> The value passed by the two callers of the function is unsigned anyway.

Indeed; and those are just simple wrappers.

> 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) | \
>
> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>

Acked-by: Clemens Ladisch <clemens@ladisch.de>

> ---
>  drivers/char/hpet.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
> index 20b32bb8c2af..0d633b76c29e 100644
> --- a/drivers/char/hpet.c
> +++ b/drivers/char/hpet.c
> @@ -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;

[toc] | [prev] | [next] | [standalone]


#1607957

FromGrant Grundler <grundler@chromium.org>
Date2017-03-23 22:50 +0100
Message-ID<toiMi-8kl-21@gated-at.bofh.it>
In reply to#1600095
On Tue, Mar 14, 2017 at 12:56 AM, Clemens Ladisch <clemens@ladisch.de> wrote:
> Matthias Kaehlcke wrote:
>> The value passed by the two callers of the function is unsigned anyway.
>
> Indeed; and those are just simple wrappers.
>
>> 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) | \
>>
>> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
>
> Acked-by: Clemens Ladisch <clemens@ladisch.de>

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

>
>> ---
>>  drivers/char/hpet.c | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/char/hpet.c b/drivers/char/hpet.c
>> index 20b32bb8c2af..0d633b76c29e 100644
>> --- a/drivers/char/hpet.c
>> +++ b/drivers/char/hpet.c
>> @@ -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;

[toc] | [prev] | [next] | [standalone]


#1608162 — Re: [PATCH v1] hpet: Make cmd parameter of hpet_ioctl_common() unsigned

FromGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Date2017-03-24 08:00 +0100
SubjectRe: [PATCH v1] hpet: Make cmd parameter of hpet_ioctl_common() unsigned
Message-ID<tormx-64z-1@gated-at.bofh.it>
In reply to#1607957
On Thu, Mar 23, 2017 at 02:47:39PM -0700, Grant Grundler wrote:
> On Tue, Mar 14, 2017 at 12:56 AM, Clemens Ladisch <clemens@ladisch.de> wrote:
> > Matthias Kaehlcke wrote:
> >> The value passed by the two callers of the function is unsigned anyway.
> >
> > Indeed; and those are just simple wrappers.
> >
> >> 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) | \
> >>
> >> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
> >
> > Acked-by: Clemens Ladisch <clemens@ladisch.de>
> 
> 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

[toc] | [prev] | [next] | [standalone]


#1608808

FromGrant Grundler <grundler@chromium.org>
Date2017-03-24 19:20 +0100
Message-ID<toBYE-5oX-51@gated-at.bofh.it>
In reply to#1608162
On Thu, Mar 23, 2017 at 11:54 PM, Greg Kroah-Hartman
<gregkh@linuxfoundation.org> wrote:
> On Thu, Mar 23, 2017 at 02:47:39PM -0700, Grant Grundler wrote:
>> On Tue, Mar 14, 2017 at 12:56 AM, Clemens Ladisch <clemens@ladisch.de> wrote:
>> > Matthias Kaehlcke wrote:
>> >> The value passed by the two callers of the function is unsigned anyway.
>> >
>> > Indeed; and those are just simple wrappers.
>> >
>> >> 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) | \
>> >>
>> >> Signed-off-by: Matthias Kaehlcke <mka@chromium.org>
>> >
>> > Acked-by: Clemens Ladisch <clemens@ladisch.de>
>>
>> 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

>
> thanks,
>
> greg k-h

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web