Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c720dada authored by Guido Martínez's avatar Guido Martínez Committed by Greg Kroah-Hartman
Browse files

staging: vt6655: fix DBG_PRT and PRINT_K macros



Wrap both macros inside a 'do { ... } while(0)' to prevent breakage if
used within another 'if'. Also fix a usage of DBG_PRT with a missing
semicolon.

Signed-off-by: default avatarGuido Martínez <guido@vanguardiasur.com.ar>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent f2ca407b
Loading
Loading
Loading
Loading
+11 −2
Original line number Diff line number Diff line
@@ -148,8 +148,17 @@

/*---------------------  Export Types  ------------------------------*/

#define DBG_PRT(l, p, args...) { if (l <= msglevel) printk(p, ##args); }
#define PRINT_K(p, args...) { if (PRIVATE_Message) printk(p, ##args); }
#define DBG_PRT(l, p, args...)		\
do {					\
	if (l <= msglevel)		\
		printk(p, ##args);	\
} while (0)

#define PRINT_K(p, args...)		\
do {					\
	if (PRIVATE_Message)		\
		printk(p, ##args);	\
} while (0)

//0:11A 1:11B 2:11G
typedef enum _VIA_BB_TYPE
+1 −1
Original line number Diff line number Diff line
@@ -680,7 +680,7 @@ static int wpa_get_scan(PSDevice pDevice,
		ret = -EFAULT;
	}
	param->u.scan_results.scan_count = count;
	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " param->u.scan_results.scan_count = %d\n", count)
	DBG_PRT(MSG_LEVEL_DEBUG, KERN_INFO " param->u.scan_results.scan_count = %d\n", count);

		kfree(pBuf);
	return ret;