Coverity Warnings and RDMA logging

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



12 of the Coverity warnings against cifs.ko are related to RDMA
logging, and are harmless, but would be nice to remove.  "log_rdma" is
called from "log_rdma_mr" with level set to ERR (ie zero).   So it
confuses coverity who sees an always true statement not realizing that
it could be a little cleaner to call it this way than to remove the
error by calling "cifs_dbg(VFS, ....)" directly (which would remove
the warning.   Perhaps better would be to create a log_rdma_mr_err
which calls cifs_dbg correctly without the if statement.


#define log_rdma(level, class, fmt, args...)                            \
do {                                                                    \
        if (level <= smbd_logging_level || class & smbd_logging_class)  \
                cifs_dbg(VFS, "%s:%d " fmt, __func__, __LINE__, ##args);\
} while (0)

Thoughts?   This is not a bug but 12 coverity warnings are noisy
-- 
Thanks,

Steve



[Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux