git: 08e90940e777 - stable/12 - MFC r368182: Use function macro for sema_init() in the LinuxKPI to limit macro expansion scope.

Hans Petter Selasky hselasky at FreeBSD.org
Mon Dec 28 13:23:53 UTC 2020


The branch stable/12 has been updated by hselasky:

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

commit 08e90940e7774937164f47632a1a736505bc92b5
Author:     Hans Petter Selasky <hselasky at FreeBSD.org>
AuthorDate: 2020-11-30 09:47:53 +0000
Commit:     Hans Petter Selasky <hselasky at FreeBSD.org>
CommitDate: 2020-12-28 13:23:13 +0000

    MFC r368182:
    Use function macro for sema_init() in the LinuxKPI to limit macro expansion scope.
    
    Sponsored by:   Mellanox Technologies // NVIDIA Networking
---
 sys/compat/linuxkpi/common/include/linux/semaphore.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sys/compat/linuxkpi/common/include/linux/semaphore.h b/sys/compat/linuxkpi/common/include/linux/semaphore.h
index 59a35311a5cc..e4a72fd9b47a 100644
--- a/sys/compat/linuxkpi/common/include/linux/semaphore.h
+++ b/sys/compat/linuxkpi/common/include/linux/semaphore.h
@@ -65,6 +65,6 @@ init_MUTEX(struct semaphore *sem)
 	sema_init(&sem->sema, 1, "lnxsema");
 }
 
-#define	sema_init	linux_sema_init
+#define	sema_init(...)	linux_sema_init(__VA_ARGS__)
 
 #endif /* _LINUX_SEMAPHORE_H_ */


More information about the dev-commits-src-all mailing list