Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 8 Apr 2024 06:49:15 GMT
From:      Vladimir Kondratyev <wulf@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: e0eeeca8b83a - main - LinuxKPI: Add PTR_IF macro
Message-ID:  <202404080649.4386nFg0032925@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by wulf:

URL: https://cgit.FreeBSD.org/src/commit/?id=e0eeeca8b83a17aeebc4da525e813699bf3fabc2

commit e0eeeca8b83a17aeebc4da525e813699bf3fabc2
Author:     Vladimir Kondratyev <wulf@FreeBSD.org>
AuthorDate: 2024-04-08 06:47:42 +0000
Commit:     Vladimir Kondratyev <wulf@FreeBSD.org>
CommitDate: 2024-04-08 06:47:42 +0000

    LinuxKPI: Add PTR_IF macro
    
    Sponsored by:   Serenity Cyber Security, LLC
    Reviewed by:    emaste
    MFC after:      1 week
---
 sys/compat/linuxkpi/common/include/linux/kernel.h | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/compat/linuxkpi/common/include/linux/kernel.h b/sys/compat/linuxkpi/common/include/linux/kernel.h
index 16499ef96a50..ed4320e80fa7 100644
--- a/sys/compat/linuxkpi/common/include/linux/kernel.h
+++ b/sys/compat/linuxkpi/common/include/linux/kernel.h
@@ -132,6 +132,8 @@ extern int linuxkpi_warn_dump_stack;
 #define	printk(...)		printf(__VA_ARGS__)
 #define	vprintk(f, a)		vprintf(f, a)
 
+#define PTR_IF(x, p)		((x) ? (p) : NULL)
+
 #define	asm			__asm
 
 extern void linux_dump_stack(void);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202404080649.4386nFg0032925>