From: "Rafael J. Wysocki" <rjw@rjwysocki.net>
To: Fabian Frederick <fabf@skynet.be>
Cc: linux-kernel <linux-kernel@vger.kernel.org>,
akpm <akpm@linux-foundation.org>,
"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
Subject: Re: [PATCH 1/1 RESEND] drivers/pnp/resource.c: remove positive test on unsigned values
Date: Sat, 10 May 2014 14:35:38 +0200 [thread overview]
Message-ID: <9287733.QVZt9YArIy@vostro.rjw.lan> (raw)
In-Reply-To: <20140510124715.e3b574aae4c8dafb0c9aefdd@skynet.be>
On Saturday, May 10, 2014 12:47:15 PM Fabian Frederick wrote:
> irq and dma are both resource_size_t (derived from phys_addr_t <-> unsigned)
>
> Cc: "Rafael J. Wysocki" <rafael.j.wysocki@intel.com>
> Cc: Andrew Morton <akpm@linux-foundation.org>
> Signed-off-by: Fabian Frederick <fabf@skynet.be>
Queued up for 3.16, thanks!
> ---
> drivers/pnp/resource.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/pnp/resource.c b/drivers/pnp/resource.c
> index 01712cb..782e822 100644
> --- a/drivers/pnp/resource.c
> +++ b/drivers/pnp/resource.c
> @@ -360,7 +360,7 @@ int pnp_check_irq(struct pnp_dev *dev, struct resource *res)
> return 1;
>
> /* check if the resource is valid */
> - if (*irq < 0 || *irq > 15)
> + if (*irq > 15)
> return 0;
>
> /* check if the resource is reserved */
> @@ -424,7 +424,7 @@ int pnp_check_dma(struct pnp_dev *dev, struct resource *res)
> return 1;
>
> /* check if the resource is valid */
> - if (*dma < 0 || *dma == 4 || *dma > 7)
> + if (*dma == 4 || *dma > 7)
> return 0;
>
> /* check if the resource is reserved */
>
--
I speak only for myself.
Rafael J. Wysocki, Intel Open Source Technology Center.
prev parent reply other threads:[~2014-05-10 12:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-10 10:47 Fabian Frederick
2014-05-10 12:35 ` Rafael J. Wysocki [this message]
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=9287733.QVZt9YArIy@vostro.rjw.lan \
--to=rjw@rjwysocki.net \
--cc=akpm@linux-foundation.org \
--cc=fabf@skynet.be \
--cc=linux-kernel@vger.kernel.org \
--cc=rafael.j.wysocki@intel.com \
/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®