All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH V1 resend] err.h: add (missing) unlikely() to IS_ERR_OR_NULL()
@ 2015-10-13  8:27 Viresh Kumar
  2015-10-29  2:27 ` Viresh Kumar
  0 siblings, 1 reply; 4+ messages in thread
From: Viresh Kumar @ 2015-10-13  8:27 UTC (permalink / raw)
  To: trivial; +Cc: linaro-kernel, linux-kernel, akpm, Viresh Kumar

IS_ERR_VALUE() already contains it and so we need to add this only to
the !ptr check. That will allow users of IS_ERR_OR_NULL(), to not add
this compiler flag.

Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
---
@Jiri: You have applied all other patches, but this one. Can you please
apply this one as well, as all others were applied based on the
assumption that this one is applied. :)

 include/linux/err.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/linux/err.h b/include/linux/err.h
index a729120644d5..56762ab41713 100644
--- a/include/linux/err.h
+++ b/include/linux/err.h
@@ -37,7 +37,7 @@ static inline bool __must_check IS_ERR(__force const void *ptr)
 
 static inline bool __must_check IS_ERR_OR_NULL(__force const void *ptr)
 {
-	return !ptr || IS_ERR_VALUE((unsigned long)ptr);
+	return unlikely(!ptr) || IS_ERR_VALUE((unsigned long)ptr);
 }
 
 /**
-- 
2.4.0


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

end of thread, other threads:[~2015-11-30  6:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-13  8:27 [PATCH V1 resend] err.h: add (missing) unlikely() to IS_ERR_OR_NULL() Viresh Kumar
2015-10-29  2:27 ` Viresh Kumar
2015-11-13  8:23   ` Viresh Kumar
2015-11-30  6:23     ` Viresh Kumar

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.