aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc
diff options
context:
space:
mode:
authorHimangi Saraogi <himangi774@gmail.com>2014-07-19 17:49:59 -0400
committerScott Wood <scottwood@freescale.com>2014-07-29 20:26:31 -0400
commit3894817fb1df6261bbfff7d2d540510372883543 (patch)
tree6a05787668c8976abb617faad5aed19d008d25a4 /arch/powerpc
parent983e2444100667b4b35c9d56c9a1fec1e817143c (diff)
powerpc/fsl-pci: Correct use of ! and &
In commit ae91d60ba88ef0bdb1b5e9b2363bd52fc45d2af7, a bug was fixed that involved converting !x & y to !(x & y). The code below shows the same pattern, and thus should perhaps be fixed in the same way. This is not tested and clearly changes the semantics, so it is only something to consider. The Coccinelle semantic patch that makes this change is as follows: // <smpl> @@ expression E1,E2; @@ ( !E1 & !E2 | - !E1 & E2 + !(E1 & E2) ) // </smpl> Signed-off-by: Himangi Saraogi <himangi774@gmail.com> Signed-off-by: Scott Wood <scottwood@freescale.com>
Diffstat (limited to 'arch/powerpc')
-rw-r--r--arch/powerpc/sysdev/fsl_pci.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/powerpc/sysdev/fsl_pci.c b/arch/powerpc/sysdev/fsl_pci.c
index 4bd091a05583..c5077673bd94 100644
--- a/arch/powerpc/sysdev/fsl_pci.c
+++ b/arch/powerpc/sysdev/fsl_pci.c
@@ -853,8 +853,8 @@ u64 fsl_pci_immrbar_base(struct pci_controller *hose)
853 in = pcie->cfg_type0 + PEX_RC_INWIN_BASE; 853 in = pcie->cfg_type0 + PEX_RC_INWIN_BASE;
854 for (i = 0; i < 4; i++) { 854 for (i = 0; i < 4; i++) {
855 /* not enabled, skip */ 855 /* not enabled, skip */
856 if (!in_le32(&in[i].ar) & PEX_RCIWARn_EN) 856 if (!(in_le32(&in[i].ar) & PEX_RCIWARn_EN))
857 continue; 857 continue;
858 858
859 if (get_immrbase() == in_le32(&in[i].tar)) 859 if (get_immrbase() == in_le32(&in[i].tar))
860 return (u64)in_le32(&in[i].barh) << 32 | 860 return (u64)in_le32(&in[i].barh) << 32 |