svn commit: r278865 - head/sys/ofed/include/linux
Hans Petter Selasky
hselasky at FreeBSD.org
Mon Feb 16 21:22:57 UTC 2015
Author: hselasky
Date: Mon Feb 16 21:22:56 2015
New Revision: 278865
URL: https://svnweb.freebsd.org/changeset/base/278865
Log:
The kasprintf() function cannot be inlined due to using a variable
number of arguments. Move it to a C-file in the linuxapi module to
make the function usable.
Sponsored by: Mellanox Technologies
MFC after: 3 days
Modified:
head/sys/ofed/include/linux/device.h
head/sys/ofed/include/linux/linux_compat.c
Modified: head/sys/ofed/include/linux/device.h
==============================================================================
--- head/sys/ofed/include/linux/device.h Mon Feb 16 21:01:31 2015 (r278864)
+++ head/sys/ofed/include/linux/device.h Mon Feb 16 21:22:56 2015 (r278865)
@@ -431,17 +431,6 @@ static inline char *kvasprintf(gfp_t gfp
return p;
}
-static inline char *kasprintf(gfp_t gfp, const char *fmt, ...)
-{
- va_list ap;
- char *p;
-
- va_start(ap, fmt);
- p = kvasprintf(gfp, fmt, ap);
- va_end(ap);
-
- return p;
-}
-
+char *kasprintf(gfp_t, const char *, ...);
#endif /* _LINUX_DEVICE_H_ */
Modified: head/sys/ofed/include/linux/linux_compat.c
==============================================================================
--- head/sys/ofed/include/linux/linux_compat.c Mon Feb 16 21:01:31 2015 (r278864)
+++ head/sys/ofed/include/linux/linux_compat.c Mon Feb 16 21:22:56 2015 (r278865)
@@ -712,6 +712,20 @@ vunmap(void *addr)
kfree(vmmap);
}
+
+char *
+kasprintf(gfp_t gfp, const char *fmt, ...)
+{
+ va_list ap;
+ char *p;
+
+ va_start(ap, fmt);
+ p = kvasprintf(gfp, fmt, ap);
+ va_end(ap);
+
+ return p;
+}
+
static void
linux_compat_init(void)
{
More information about the svn-src-head
mailing list