net: bcm4358: fix not to check same value in macro 51/110551/3
authorSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 17 Jan 2017 04:22:22 +0000 (13:22 +0900)
committerSeung-Woo Kim <sw0312.kim@samsung.com>
Tue, 17 Jan 2017 06:09:52 +0000 (22:09 -0800)
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/bcmdhd4358/siutils.c

index dc265f2fa1ea71231659dbe5b3516910ec85ea50..1e8172ab22218c11d3bea382875b18e2abd234c1 100644 (file)
@@ -509,11 +509,13 @@ si_doattach(si_info_t *sii, uint devid, osl_t *osh, 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)) {