Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dm: enclose complex macros into parentheses where possible

Signed-off-by: Heinz Mauelshagen <heinzm@redhat.com>
Signed-off-by: Mike Snitzer <snitzer@kernel.org>

authored by

Heinz Mauelshagen and committed by
Mike Snitzer
44bc08ed d715fa23

+5 -4
+4 -2
drivers/md/dm-log.c
··· 773 773 } 774 774 775 775 #define DMEMIT_SYNC \ 776 - if (lc->sync != DEFAULTSYNC) \ 777 - DMEMIT("%ssync ", lc->sync == NOSYNC ? "no" : "") 776 + do { \ 777 + if (lc->sync != DEFAULTSYNC) \ 778 + DMEMIT("%ssync ", lc->sync == NOSYNC ? "no" : ""); \ 779 + } while (0); 778 780 779 781 static int core_status(struct dm_dirty_log *log, status_type_t status, 780 782 char *result, unsigned int maxlen)
+1 -2
include/linux/device-mapper.h
··· 613 613 #define DMDEBUG(fmt, ...) pr_debug(DM_FMT(fmt), ##__VA_ARGS__) 614 614 #define DMDEBUG_LIMIT(fmt, ...) pr_debug_ratelimited(DM_FMT(fmt), ##__VA_ARGS__) 615 615 616 - #define DMEMIT(x...) sz += ((sz >= maxlen) ? \ 617 - 0 : scnprintf(result + sz, maxlen - sz, x)) 616 + #define DMEMIT(x...) (sz += ((sz >= maxlen) ? 0 : scnprintf(result + sz, maxlen - sz, x))) 618 617 619 618 #define DMEMIT_TARGET_NAME_VERSION(y) \ 620 619 DMEMIT("target_name=%s,target_version=%u.%u.%u", \