Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=7e5829b56be5aeb931cf52d78c95285c2b8f50e3
Commit:     7e5829b56be5aeb931cf52d78c95285c2b8f50e3
Parent:     72db43be8bf610d50d86a9e683e0eff3c2cc5ba4
Author:     Yoann Padioleau <[EMAIL PROTECTED]>
AuthorDate: Fri Jul 27 11:45:00 2007 +0200
Committer:  Ralf Baechle <[EMAIL PROTECTED]>
CommitDate: Tue Jul 31 21:35:22 2007 +0100

    [MIPS] 0 -> NULL
    
    When comparing a pointer, it's clearer to compare it to NULL than to 0.
    
    Here is an excerpt of the semantic patch:
    
    @@
    expression *E;
    @@
    
      E ==
    - 0
    + NULL
    
    @@
    expression *E;
    @@
    
      E !=
    - 0
    + NULL
    
    Signed-off-by: Yoann Padioleau <[EMAIL PROTECTED]>
    Cc: [EMAIL PROTECTED]
    Cc: [EMAIL PROTECTED]
    Cc: [EMAIL PROTECTED]
    Signed-off-by: Ralf Baechle <[EMAIL PROTECTED]>
---
 arch/mips/pci/ops-emma2rh.c |    2 +-
 arch/mips/pci/ops-pnx8550.c |   12 ++++++------
 2 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/arch/mips/pci/ops-emma2rh.c b/arch/mips/pci/ops-emma2rh.c
index 38f1816..d31bfc6 100644
--- a/arch/mips/pci/ops-emma2rh.c
+++ b/arch/mips/pci/ops-emma2rh.c
@@ -45,7 +45,7 @@ static int check_args(struct pci_bus *bus, u32 devfn, u32 * 
bus_num)
        /* check if the bus is top-level */
        if (bus->parent != NULL) {
                *bus_num = bus->number;
-               db_assert(bus_num != 0);
+               db_assert(bus_num != NULL);
        } else
                *bus_num = 0;
 
diff --git a/arch/mips/pci/ops-pnx8550.c b/arch/mips/pci/ops-pnx8550.c
index f556b7a..d610646 100644
--- a/arch/mips/pci/ops-pnx8550.c
+++ b/arch/mips/pci/ops-pnx8550.c
@@ -117,7 +117,7 @@ read_config_byte(struct pci_bus *bus, unsigned int devfn, 
int where, u8 * val)
        unsigned int data = 0;
        int err;
 
-       if (bus == 0)
+       if (bus == NULL)
                return -1;
 
        err = config_access(PCI_CMD_CONFIG_READ, bus, devfn, where, ~(1 << 
(where & 3)), &data);
@@ -145,7 +145,7 @@ read_config_word(struct pci_bus *bus, unsigned int devfn, 
int where, u16 * val)
        unsigned int data = 0;
        int err;
 
-       if (bus == 0)
+       if (bus == NULL)
                return -1;
 
        if (where & 0x01)
@@ -168,7 +168,7 @@ static int
 read_config_dword(struct pci_bus *bus, unsigned int devfn, int where, u32 * 
val)
 {
        int err;
-       if (bus == 0)
+       if (bus == NULL)
                return -1;
 
        if (where & 0x03)
@@ -185,7 +185,7 @@ write_config_byte(struct pci_bus *bus, unsigned int devfn, 
int where, u8 val)
        unsigned int data = (unsigned int)val;
        int err;
 
-       if (bus == 0)
+       if (bus == NULL)
                return -1;
 
        switch (where & 0x03) {
@@ -213,7 +213,7 @@ write_config_word(struct pci_bus *bus, unsigned int devfn, 
int where, u16 val)
        unsigned int data = (unsigned int)val;
        int err;
 
-       if (bus == 0)
+       if (bus == NULL)
                return -1;
 
        if (where & 0x01)
@@ -235,7 +235,7 @@ static int
 write_config_dword(struct pci_bus *bus, unsigned int devfn, int where, u32 val)
 {
        int err;
-       if (bus == 0)
+       if (bus == NULL)
                return -1;
 
        if (where & 0x03)
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to