Skip to contentSkip to conversation

hotplug/shpchp_hpc: add parenthesis in

PATCH Jesse Barnes 1 participant 1 message May 28, 2010 Kernel janitors

lore
Share & tools
lore

Jesse Barnes

author Applied
#0 lore raw
Quoted 12 lines · On Wed, 26 May 2010 12:46:39 +0200 Dan Carpenter <[email protected]> wrote:

The SLOT_REG_RSVDZ_MASK macro is normally used like this:

	slot_reg &= ~SLOT_REG_RSVDZ_MASK;

The ~ operator has higher precedence than the | operator from inside the macro, so it needs parenthesis.

drivers/pci/hotplug/shpchp_hpc.c +0 -0
index 5f5e8d2..d3985e7 100644

drivers/pci/hotplug/shpchp_hpc.c line 119

Quoted 8 lines
drivers/pci/hotplug/shpchp_hpc.c +1 -1
@@ -113,7 +113,7 @@
 #define CON_PFAULT_INTR_MASK	(1 << 28)
 #define MRL_CHANGE_SERR_MASK	(1 << 29)
 #define CON_PFAULT_SERR_MASK	(1 << 30)
-#define SLOT_REG_RSVDZ_MASK	(1 << 15) | (7 << 21)
+#define SLOT_REG_RSVDZ_MASK	((1 << 15) | (7 << 21))
 
 /*
  * SHPC Command Code definitnions

Applied to my for-linus branch, thanks.

Signature · 1 line
Jesse Barnes, Intel Open Source Technology Center