* [PATCH] compat: add IS_ERR_OR_NULL()
@ 2011-09-28 18:43 Hauke Mehrtens
2011-09-28 20:41 ` Luis R. Rodriguez
0 siblings, 1 reply; 2+ messages in thread
From: Hauke Mehrtens @ 2011-09-28 18:43 UTC (permalink / raw)
To: mcgrof, mcgrof; +Cc: linux-wireless, Hauke Mehrtens
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
---
include/linux/compat-2.6.33.h | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/include/linux/compat-2.6.33.h b/include/linux/compat-2.6.33.h
index 43f1989..386ee4c 100644
--- a/include/linux/compat-2.6.33.h
+++ b/include/linux/compat-2.6.33.h
@@ -144,6 +144,11 @@ static inline bool pci_is_pcie(struct pci_dev *dev)
#define __always_unused /* unimplemented */
#endif
+static inline long __must_check IS_ERR_OR_NULL(const void *ptr)
+{
+ return !ptr || IS_ERR_VALUE((unsigned long)ptr);
+}
+
#endif /* (LINUX_VERSION_CODE < KERNEL_VERSION(2,6,33)) */
#endif /* LINUX_26_33_COMPAT_H */
--
1.7.4.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] compat: add IS_ERR_OR_NULL()
2011-09-28 18:43 [PATCH] compat: add IS_ERR_OR_NULL() Hauke Mehrtens
@ 2011-09-28 20:41 ` Luis R. Rodriguez
0 siblings, 0 replies; 2+ messages in thread
From: Luis R. Rodriguez @ 2011-09-28 20:41 UTC (permalink / raw)
To: Hauke Mehrtens; +Cc: linux-wireless
On Wed, Sep 28, 2011 at 11:43 AM, Hauke Mehrtens <hauke@hauke-m.de> wrote:
>
> Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
Thanks, applied and pushed both patches out!
Luis
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-09-28 20:42 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-09-28 18:43 [PATCH] compat: add IS_ERR_OR_NULL() Hauke Mehrtens
2011-09-28 20:41 ` Luis R. Rodriguez
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.