]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
dtrace: IO provider unused variables when DTrace is disabled
authorNicolas Droux <nicolas.droux@oracle.com>
Tue, 8 Aug 2017 22:54:48 +0000 (16:54 -0600)
committerTomas Jedlicka <tomas.jedlicka@oracle.com>
Thu, 14 Sep 2017 09:12:00 +0000 (11:12 +0200)
Fix unused variables warnings caused by IO provider probes when
CONFIG_DTRACE is not set.

Orabug: 26570995

Signed-off-by: Nicolas Droux <nicolas.droux@oracle.com>
Acked-by: Nick Alcock <nick.alcock@oracle.com>
Reviewed-by: Alan Maguire <alan.maguire@oracle.com>
fs/nfs/internal.h
fs/xfs/xfs_buf.c

index 12efee9cdeded52892b85a159ef001c12eecefde..7740e81c5c0530a9ce3ba9896001ad250fe35150 100644 (file)
@@ -685,7 +685,7 @@ static inline u32 nfs_fhandle_hash(const struct nfs_fh *fh)
 
 #define        DTRACE_IO_NFS(name, rw, size, inode)                    \
        if (DTRACE_IO_ENABLED(name)) {                          \
-               struct bio bio = {                              \
+               struct bio bio __maybe_unused = {               \
                        .bi_rw = rw,                            \
                        .bi_flags = (1 << BIO_USER_MAPPED),     \
                        .bi_iter.bi_size = size,                \
index bb92da29b2c3e2e3c3504691774e188b5e2a06f6..13b71f2d2c5de695b2f4f8e41dd59491e8a831ec 100644 (file)
@@ -59,7 +59,7 @@ static kmem_zone_t *xfs_buf_zone;
 
 #define        DTRACE_IO_XFS_WAIT(name, bp)                                    \
        if (DTRACE_IO_ENABLED(name)) {                                  \
-               struct bio bio = {                                      \
+               struct bio bio __maybe_unused = {                       \
                        .bi_iter.bi_sector = (bp)->b_bn,                \
                        .bi_iter.bi_size = (bp)->b_length,              \
                        .bi_rw = ((bp)->b_flags & XBF_WRITE) != 0,      \