Re: [PATCH rdma-next] RDMA/mlx5: Fix static analyzer error

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

 



On Tue, 2019-02-19 at 17:47 +-0200, Moni Shoua wrote:
+AD4 +AD4 This kind of change makes the code confusing to human readers. Have you
+AD4 +AD4 considered to add a BUG+AF8-ON(+ACE-qp) or WARN+AF8-ON(+ACE-qp) with a comment that
+AD4 +AD4 refers to sparse instead?
+AD4 
+AD4 I'm not sure that this kind of fix will satisfy the static checker. It
+AD4 depends how it understand BUG+AF8-ON().

I think sparse recognizes code that has been marked with the GCC attribute
'noreturn'. From include/linux/kernel.h (BUG() calls panic()):

void panic(const char +ACo-fmt, ...) +AF8AXw-noreturn +AF8AXw-cold+ADs

Bart.



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux