Skip to contentSkip to conversation

Staging: mei: fix debug code

PATCH In review Dan Carpenter 2 participants 2 messages Jun 9, 2011

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Staging: mei: fix debug code

! has higher precedence than !=. H_RDY is 8 and since neither 0 nor 1 are equal to 8 the original condition was always true.

drivers/staging/mei/init.c +2 -2
index 2818851..d1ffa32 100644
@@ -205,10 +205,10 @@ int mei_hw_init(struct mei_device *dev)
 			"host_hw_state = 0x%08x, me_hw_state = 0x%08x.\n",
 			dev->host_hw_state, dev->me_hw_state);
 
-		if (!(dev->host_hw_state & H_RDY) != H_RDY)
+		if (!(dev->host_hw_state & H_RDY))
 			dev_dbg(&dev->pdev->dev, "host turn off H_RDY.\n");
 
-		if (!(dev->me_hw_state & ME_RDY_HRA) != ME_RDY_HRA)
+		if (!(dev->me_hw_state & ME_RDY_HRA))
 			dev_dbg(&dev->pdev->dev, "ME turn off ME_RDY.\n");
 
 		printk(KERN_ERR "mei: link layer initialization failed.\n");
Acked-by on v1 1/1
#1 lore raw
Quoted 11 lines

-----Original Message-----
From: Dan Carpenter [mailto:[email protected]]
Sent: Thursday, June 09, 2011 10:18 AM
To: Greg Kroah-Hartman
Cc: Winkler, Tomas; Weil, Oren jer; Tzeel-Krupp, Itzhak; open list:STAGING SUBSYSTEM; [email protected]
Subject: [patch] Staging: mei: fix debug code

Quoted 4 lines

! has higher precedence than !=. H_RDY is 8 and since neither 0 nor 1 are equal to 8 the original condition was always true.

Quoted 19 lines
drivers/staging/mei/init.c index renamed from drivers/staging/mei/init.c +0 -0

2818851..d1ffa32 100644

drivers/staging/mei/init.c +2 -2
@@ -205,10 +205,10 @@ int mei_hw_init(struct mei_device *dev)
 			"host_hw_state = 0x%08x, me_hw_state > 0x%08x.\n",
 			dev->host_hw_state, dev->me_hw_state);
 
-		if (!(dev->host_hw_state & H_RDY) != H_RDY)
+		if (!(dev->host_hw_state & H_RDY))
 			dev_dbg(&dev->pdev->dev, "host turn off
 H_RDY.\n");
 
-		if (!(dev->me_hw_state & ME_RDY_HRA) != ME_RDY_HRA)
+		if (!(dev->me_hw_state & ME_RDY_HRA))
 			dev_dbg(&dev->pdev->dev, "ME turn off
 ME_RDY.\n");
Quoted 1 line

printk(KERN_ERR "mei: link layer initialization failed.\n");

---------------------------------------------------------------------
Intel Israel (74) Limited

This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). Any review or distribution by others is strictly prohibited. If you are not the intended recipient, please contact the sender and delete all copies.