mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [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

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®