net: bcm4358: fix not to check same value in macro
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 17 Jan 2017 04:22:22 +0000 (13:22 +0900)
committerJaechul Lee <jcsing.lee@samsung.com>
Tue, 14 Feb 2017 04:26:24 +0000 (13:26 +0900)
When BCMBUSTYPE is not defined, then BUSTYPE(bustype) is just
bustype. So comparing bustype and BUSTYPE(bustype) is not necessary.

This patch removes following build warning with gcc 6.
   drivers/net/wireless/bcmdhd4358/siutils.c: In function 'si_doattach':
   drivers/net/wireless/bcmdhd4358/siutils.c:512:14: warning: self-comparison always evaluates to false [-Wtautological-compare]
     if (bustype != BUSTYPE(bustype)) {
                 ^~

Change-Id: I1cac3dd31bcb86983469830013a1093ed9ceaa89
Signed-off-by: Seung-Woo Kim <sw0312.kim@samsung.com>
drivers/net/wireless/bcmdhd/siutils.c

index c19169d..8f79372 100644 (file)
@@ -624,11 +624,13 @@ si_doattach(si_info_t *sii, uint devid, osl_t *osh, volatile void *regs,
        }
 
        sih->bustype = bustype;
+#ifdef BCMBUSTYPE
        if (bustype != BUSTYPE(bustype)) {
                SI_ERROR(("si_doattach: bus type %d does not match configured bus type %d\n",
                        bustype, BUSTYPE(bustype)));
                return NULL;
        }
+#endif
 
        /* bus/core/clk setup for register access */
        if (!si_buscore_prep(sii, bustype, devid, sdh)) {