kernel-janitors.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [patch] hotplug/shpchp_hpc: add parenthesis in SLOT_REG_RSVDZ_MASK
@ 2010-05-26 10:46 Dan Carpenter
  2010-05-26 11:29 ` Kenji Kaneshige
  0 siblings, 1 reply; 2+ messages in thread
From: Dan Carpenter @ 2010-05-26 10:46 UTC (permalink / raw)
  To: kernel-janitors

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.

Signed-off-by: Dan Carpenter <error27@gmail.com>

diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c
index 5f5e8d2..d3985e7 100644
--- a/drivers/pci/hotplug/shpchp_hpc.c
+++ b/drivers/pci/hotplug/shpchp_hpc.c
@@ -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

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

* Re: [patch] hotplug/shpchp_hpc: add parenthesis in SLOT_REG_RSVDZ_MASK
  2010-05-26 10:46 [patch] hotplug/shpchp_hpc: add parenthesis in SLOT_REG_RSVDZ_MASK Dan Carpenter
@ 2010-05-26 11:29 ` Kenji Kaneshige
  0 siblings, 0 replies; 2+ messages in thread
From: Kenji Kaneshige @ 2010-05-26 11:29 UTC (permalink / raw)
  To: kernel-janitors

Good catch.
Reviewed-by: Kenji Kaneshige <kaneshige.kenji@jp.fujitsu.com>

(2010/05/26 19:46), Dan Carpenter 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.
> 
> Signed-off-by: Dan Carpenter<error27@gmail.com>
> 
> diff --git a/drivers/pci/hotplug/shpchp_hpc.c b/drivers/pci/hotplug/shpchp_hpc.c
> index 5f5e8d2..d3985e7 100644
> --- a/drivers/pci/hotplug/shpchp_hpc.c
> +++ b/drivers/pci/hotplug/shpchp_hpc.c
> @@ -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
> --
> To unsubscribe from this list: send the line "unsubscribe linux-pci" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html
> 
> 



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

end of thread, other threads:[~2010-05-26 11:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-05-26 10:46 [patch] hotplug/shpchp_hpc: add parenthesis in SLOT_REG_RSVDZ_MASK Dan Carpenter
2010-05-26 11:29 ` Kenji Kaneshige

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).