* [PATCH 1/1 RESEND] drivers/pnp/resource.c: remove positive test on unsigned values
@ 2014-05-10 10:47 Fabian Frederick
2014-05-10 12:35 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Fabian Frederick @ 2014-05-10 10:47 UTC (permalink / raw)
To: linux-kernel; +Cc: akpm, Rafael J. Wysocki
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>
---
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 */
--
1.8.4.5
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH 1/1 RESEND] drivers/pnp/resource.c: remove positive test on unsigned values
2014-05-10 10:47 [PATCH 1/1 RESEND] drivers/pnp/resource.c: remove positive test on unsigned values Fabian Frederick
@ 2014-05-10 12:35 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2014-05-10 12:35 UTC (permalink / raw)
To: Fabian Frederick; +Cc: linux-kernel, akpm, Rafael J. Wysocki
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-05-10 12:18 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-05-10 10:47 [PATCH 1/1 RESEND] drivers/pnp/resource.c: remove positive test on unsigned values Fabian Frederick
2014-05-10 12:35 ` Rafael J. Wysocki
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®