mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Clemens Ladisch <clemens@ladisch.de>
To: Matthias Kaehlcke <mka@chromium.org>,
	Arnd Bergmann <arnd@arndb.de>,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: linux-kernel@vger.kernel.org,
	Grant Grundler <grundler@chromium.org>,
	Andrew Morton <akpm@linux-foundation.org>
Subject: Re: [PATCH v1] hpet: Make cmd parameter of hpet_ioctl_common() unsigned
Date: Tue, 14 Mar 2017 08:56:17 +0100	[thread overview]
Message-ID: <1b8d62d2-9c3a-eb18-9b4b-21d2a80cebfa@ladisch.de> (raw)
In-Reply-To: <20170313185725.144873-1-mka@chromium.org>

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;

  reply	other threads:[~2017-03-14  8:04 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-03-13 18:57 Matthias Kaehlcke
2017-03-14  7:56 ` Clemens Ladisch [this message]
2017-03-23 21:47   ` Grant Grundler
2017-03-24  6:54     ` Greg Kroah-Hartman
2017-03-24 18:17       ` Grant Grundler

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1b8d62d2-9c3a-eb18-9b4b-21d2a80cebfa@ladisch.de \
    --to=clemens@ladisch.de \
    --cc=akpm@linux-foundation.org \
    --cc=arnd@arndb.de \
    --cc=gregkh@linuxfoundation.org \
    --cc=grundler@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mka@chromium.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®