public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH][RESEND] i7core_edac: fix misuse of logical operation in place of bitop
@ 2011-02-21 14:41 David Sterba
  2011-02-24 14:05 ` Borislav Petkov
  0 siblings, 1 reply; 4+ messages in thread
From: David Sterba @ 2011-02-21 14:41 UTC (permalink / raw)
  To: mchehab; +Cc: linux-edac, linux-kernel, David Sterba, Borislav Petkov


CC: Mauro Carvalho Chehab <mchehab@redhat.com>
Signed-off-by: David Sterba <dsterba@suse.cz>
---

Hi Mauro, this fix has not been applied yet, can you please pick it up?

Thanks,
dave

 drivers/edac/i7core_edac.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/edac/i7core_edac.c b/drivers/edac/i7core_edac.c
index 362861c..f41a34e 100644
--- a/drivers/edac/i7core_edac.c
+++ b/drivers/edac/i7core_edac.c
@@ -731,7 +731,7 @@ static int get_dimm_config(const struct mem_ctl_info *mci)
 			debugf1("\t\t%#x\t%#x\t%#x\n",
 				(value[j] >> 27) & 0x1,
 				(value[j] >> 24) & 0x7,
-				(value[j] && ((1 << 24) - 1)));
+				(value[j] & ((1 << 24) - 1)));
 	}
 
 	return 0;
@@ -1670,7 +1670,7 @@ static void i7core_mce_output_error(struct mem_ctl_info *mci,
 	char *type, *optype, *err, *msg;
 	unsigned long error = m->status & 0x1ff0000l;
 	u32 optypenum = (m->status >> 4) & 0x07;
-	u32 core_err_cnt = (m->status >> 38) && 0x7fff;
+	u32 core_err_cnt = (m->status >> 38) & 0x7fff;
 	u32 dimm = (m->misc >> 16) & 0x3;
 	u32 channel = (m->misc >> 18) & 0x3;
 	u32 syndrome = m->misc >> 32;
-- 
1.7.3.4.578.g6068a


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

* Re: [PATCH][RESEND] i7core_edac: fix misuse of logical operation in place of bitop
  2011-02-21 14:41 [PATCH][RESEND] i7core_edac: fix misuse of logical operation in place of bitop David Sterba
@ 2011-02-24 14:05 ` Borislav Petkov
  2011-02-24 14:09   ` Mauro Carvalho Chehab
  2011-02-24 17:04   ` David Sterba
  0 siblings, 2 replies; 4+ messages in thread
From: Borislav Petkov @ 2011-02-24 14:05 UTC (permalink / raw)
  To: David Sterba
  Cc: mchehab@redhat.com, linux-edac@vger.kernel.org,
	linux-kernel@vger.kernel.org

On Mon, Feb 21, 2011 at 09:41:46AM -0500, David Sterba wrote:
> 
> CC: Mauro Carvalho Chehab <mchehab@redhat.com>
> Signed-off-by: David Sterba <dsterba@suse.cz>
> ---
> 
> Hi Mauro, this fix has not been applied yet, can you please pick it up?

Yeah, this looks wrong. Is this tested? Is it something you hit when
running the driver or you've caught it with some tool/by code staring?

If it is a real problem for you, I could make an exception and send it
to Linus next week if Mauro doesn't do it before that.

Ok?

-- 
Regards/Gruss,
Boris.

Advanced Micro Devices GmbH
Einsteinring 24, 85609 Dornach
General Managers: Alberto Bozzo, Andrew Bowd
Registration: Dornach, Gemeinde Aschheim, Landkreis Muenchen
Registergericht Muenchen, HRB Nr. 43632

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

* Re: [PATCH][RESEND] i7core_edac: fix misuse of logical operation in place of bitop
  2011-02-24 14:05 ` Borislav Petkov
@ 2011-02-24 14:09   ` Mauro Carvalho Chehab
  2011-02-24 17:04   ` David Sterba
  1 sibling, 0 replies; 4+ messages in thread
From: Mauro Carvalho Chehab @ 2011-02-24 14:09 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: David Sterba, linux-edac@vger.kernel.org,
	linux-kernel@vger.kernel.org

Em 24-02-2011 11:05, Borislav Petkov escreveu:
> On Mon, Feb 21, 2011 at 09:41:46AM -0500, David Sterba wrote:
>>
>> CC: Mauro Carvalho Chehab <mchehab@redhat.com>
>> Signed-off-by: David Sterba <dsterba@suse.cz>
>> ---
>>
>> Hi Mauro, this fix has not been applied yet, can you please pick it up?
> 
> Yeah, this looks wrong. Is this tested? Is it something you hit when
> running the driver or you've caught it with some tool/by code staring?
> 
> If it is a real problem for you, I could make an exception and send it
> to Linus next week if Mauro doesn't do it before that.

I'm a little busy those days, but I'm expecting to have some time likely
on Monday to test this patch.

Cheers,
Mauro

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

* Re: [PATCH][RESEND] i7core_edac: fix misuse of logical operation in place of bitop
  2011-02-24 14:05 ` Borislav Petkov
  2011-02-24 14:09   ` Mauro Carvalho Chehab
@ 2011-02-24 17:04   ` David Sterba
  1 sibling, 0 replies; 4+ messages in thread
From: David Sterba @ 2011-02-24 17:04 UTC (permalink / raw)
  To: Borislav Petkov
  Cc: David Sterba, mchehab@redhat.com, linux-edac@vger.kernel.org,
	linux-kernel@vger.kernel.org

On Thu, Feb 24, 2011 at 03:05:41PM +0100, Borislav Petkov wrote:
> Yeah, this looks wrong. Is this tested?

Compile tested, I don't have the hw at hand.

> Is it something you hit when running the driver or you've caught it
> with some tool/by code staring?

It was found by clang compiler.

> If it is a real problem for you, I could make an exception and send it
> to Linus next week if Mauro doesn't do it before that.

Not a problem for me, I just don't want let the patch fall on the floor.

Thanks,
dave

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

end of thread, other threads:[~2011-02-24 17:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-21 14:41 [PATCH][RESEND] i7core_edac: fix misuse of logical operation in place of bitop David Sterba
2011-02-24 14:05 ` Borislav Petkov
2011-02-24 14:09   ` Mauro Carvalho Chehab
2011-02-24 17:04   ` David Sterba

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox