Skip to content

Commit 33ee434

Browse files
committed
drivers: hv: dxgkrnl: Add body to macro to silence warnings
If `DXG_TRACE` is configured to be empty and is used from a conditional like if (foo) DXG_TRACE("message"); Having no body in the macro causes the if statement to have no body, which raises a warning. Silence this warning by providing `DXG_TRACE` with a no-op body under the appropriate configuration. Signed-off-by: Mitchell Levy <levymitchell0@gmail.com>
1 parent c37d181 commit 33ee434

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

drivers/hv/dxgkrnl/dxgkrnl.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1028,7 +1028,7 @@ void dxgk_validate_ioctls(void);
10281028

10291029
#else
10301030

1031-
#define DXG_TRACE(...)
1031+
#define DXG_TRACE(...) do { } while (0)
10321032
#define DXG_ERR(fmt, ...) do { \
10331033
dev_err(DXGDEV, "%s: " fmt, __func__, ##__VA_ARGS__); \
10341034
} while (0)

0 commit comments

Comments
 (0)