mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH] EDAC, AMD64_EDAC: Remove superfluous condition check.
@ 2013-09-11 15:55 Aravind Gopalakrishnan
  2013-09-19  9:12 ` Borislav Petkov
  0 siblings, 1 reply; 2+ messages in thread
From: Aravind Gopalakrishnan @ 2013-09-11 15:55 UTC (permalink / raw)
  To: dougthompson, bp, davej, linux-edac, linux-kernel; +Cc: Aravind Gopalakrishnan

The condition check 'channel < 0' is needless since channel is unsigned.

Reported by Dave Jones here:
http://marc.info/?l=linux-kernel&m=137839225430844&w=2

Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>
---
 drivers/edac/amd64_edac.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/edac/amd64_edac.c b/drivers/edac/amd64_edac.c
index 3c9e4e9..bbd1913 100644
--- a/drivers/edac/amd64_edac.c
+++ b/drivers/edac/amd64_edac.c
@@ -1576,7 +1576,7 @@ static int f15_m30h_match_to_this_node(struct amd64_pvt *pvt, unsigned range,
 					     num_dcts_intlv, dct_sel);
 
 	/* Verify we stay within the MAX number of channels allowed */
-	if (channel > 4 || channel < 0)
+	if (channel > 4)
 		return -EINVAL;
 
 	leg_mmio_hole = (u8) (dct_cont_base_reg >> 1 & BIT(0));
-- 
1.7.10.4



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PATCH] EDAC, AMD64_EDAC: Remove superfluous condition check.
  2013-09-11 15:55 [PATCH] EDAC, AMD64_EDAC: Remove superfluous condition check Aravind Gopalakrishnan
@ 2013-09-19  9:12 ` Borislav Petkov
  0 siblings, 0 replies; 2+ messages in thread
From: Borislav Petkov @ 2013-09-19  9:12 UTC (permalink / raw)
  To: Aravind Gopalakrishnan; +Cc: dougthompson, davej, linux-edac, linux-kernel

On Wed, Sep 11, 2013 at 10:55:58AM -0500, Aravind Gopalakrishnan wrote:
> The condition check 'channel < 0' is needless since channel is unsigned.
> 
> Reported by Dave Jones here:
> http://marc.info/?l=linux-kernel&m=137839225430844&w=2
> 
> Signed-off-by: Aravind Gopalakrishnan <Aravind.Gopalakrishnan@amd.com>

Applied, thanks.

-- 
Regards/Gruss,
    Boris.

Sent from a fat crate under my desk. Formatting is fine.
--

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-09-19  9:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-09-11 15:55 [PATCH] EDAC, AMD64_EDAC: Remove superfluous condition check Aravind Gopalakrishnan
2013-09-19  9:12 ` Borislav Petkov

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®