Commit:     c91ef5986185c044a853d990670e3f7ce22f2991
Parent:     087d7ecd5273b480d13f4309a159842700afe276
Author:     David Gibson <[EMAIL PROTECTED]>
AuthorDate: Thu Feb 15 14:38:04 2007 +1100
Committer:  Paul Mackerras <[EMAIL PROTECTED]>
CommitDate: Fri Feb 16 14:00:19 2007 +1100

    [POWERPC] More DCR native fixups
    Getting BenH's new EMAC driver working on 440GP, I found some more
    problems in the native mode paths of the new DCR code:
        - dcr_map() is supposed to return a dcr_host_t, but the native
    version is a macro that doesn't expand to an expression.  With native
    DCRs, dcr_host_t is an empty structure, so we just use a constructor
    expression instead.
        - dcr_unmap() uses {} instead of the safer do {} while (0)
    idiom to implement a no-op
    Here's a fix.
    Signed-off-by: David Gibson <[EMAIL PROTECTED]>
    Acked-by: Benjamin Herrenschmidt <[EMAIL PROTECTED]>
    Signed-off-by: Paul Mackerras <[EMAIL PROTECTED]>
 include/asm-powerpc/dcr-native.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/asm-powerpc/dcr-native.h b/include/asm-powerpc/dcr-native.h
index d7a1bc1..05af081 100644
--- a/include/asm-powerpc/dcr-native.h
+++ b/include/asm-powerpc/dcr-native.h
@@ -26,8 +26,8 @@ typedef struct {} dcr_host_t;
 #define DCR_MAP_OK(host)       (1)
-#define dcr_map(dev, dcr_n, dcr_c)     {}
-#define dcr_unmap(host, dcr_n, dcr_c)  {}
+#define dcr_map(dev, dcr_n, dcr_c)     ((dcr_host_t){})
+#define dcr_unmap(host, dcr_n, dcr_c)  do {} while (0)
 #define dcr_read(host, dcr_n)          mfdcr(dcr_n)
 #define dcr_write(host, dcr_n, value)  mtdcr(dcr_n, value)
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

Reply via email to