All of lore.kernel.org
 help / color / mirror / Atom feed
* How to fix CHECK warning: testing a 'safe expression'
@ 2014-12-16 18:23 Murali Karicheri
  2014-12-17 16:18 ` How to fix CHECK warning: testing a 'safe expression' ? Murali Karicheri
  2015-01-02 14:51 ` How to fix CHECK warning: testing a 'safe expression' Murali Karicheri
  0 siblings, 2 replies; 9+ messages in thread
From: Murali Karicheri @ 2014-12-16 18:23 UTC (permalink / raw)
  To: netdev

netdev maintainers,

I got a comment to address CHECK warning and wondering how to address 
'warning: testing a 'safe expression' which appears when using
IS_ERR_OR_NULL(foo)

where foo is defined as

struct foo_type *foo;

The foo get assigned only NULL or ERR_PTR(error code). So I believe the 
usage is correct. But then how do I make the CHECK happy of its usage?

I have tried doing a grep on the current usage of IS_ERR_OR_NULL() and 
found 276 of them causes this warning in the v3.18 version of the kernel 
that I am using

$ grep -r "warning: testing a 'safe expression" * | wc -l
276

1) Can someone explain what this warning means?

2) Is it acceptable to post patches to netdev list with this warning?

3) if not, how this is expected to be fixed? Any example usage to fix 
this warning will be helpful.

Thanks in advance for
-- 
Murali Karicheri
Linux Kernel, Texas Instruments

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-01-02 22:20 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-12-16 18:23 How to fix CHECK warning: testing a 'safe expression' Murali Karicheri
2014-12-17 16:18 ` How to fix CHECK warning: testing a 'safe expression' ? Murali Karicheri
2014-12-17 18:49   ` Bjorn Helgaas
2014-12-17 22:35     ` Murali Karicheri
2014-12-17 22:37       ` Murali Karicheri
2014-12-18  2:39         ` Christopher Li
2014-12-18 17:45           ` Murali Karicheri
2015-01-02 14:51 ` How to fix CHECK warning: testing a 'safe expression' Murali Karicheri
2015-01-02 22:20   ` Josh Triplett

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.