| #
f26cb475
|
| 03-Mar-2026 |
Siva Mahadevan <siva@FreeBSD.org> |
LinuxKPI: avoid -Werror=unused-value in sort() from BUILD_BUG_ON_ZERO()
The BUILD_BUG_ON_ZERO() macro returns an (int)0 if it does not fail at build time. LinuxKPI sort() has it as a guard for an un
LinuxKPI: avoid -Werror=unused-value in sort() from BUILD_BUG_ON_ZERO()
The BUILD_BUG_ON_ZERO() macro returns an (int)0 if it does not fail at build time. LinuxKPI sort() has it as a guard for an unsupported argument but ignores the return value.
This leads to gcc complaining:
/usr/src/sys/compat/linuxkpi/common/include/linux/build_bug.h:60:33: error: statement with no effect [-Werror=unused-value] 60 | #define BUILD_BUG_ON_ZERO(x) ((int)sizeof(struct { int:-((x) != 0); })) | ^ /usr/src/sys/compat/linuxkpi/common/include/linux/sort.h:37:9: note: in expansion of macro 'BUILD_BUG_ON_ZERO' 37 | BUILD_BUG_ON_ZERO(swap); \ | ^~~~~~~~~~~~~~~~~ /usr/src/sys/contrib/dev/rtw89/core.c:2575:9: note: in expansion of macro 'sort' 2575 | sort(drift, RTW89_BCN_TRACK_STAT_NR, sizeof(*drift), cmp_u16, NULL);
Change to BUILD_BUG_ON() for the statement version.
Reported by: CI Co-authored-by: bz Approved by: emaste (mentor) MFC after: 3 days Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D55634
show more ...
|
| #
4d846d26
|
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
| #
7356f661
|
| 25-Dec-2021 |
Vladimir Kondratyev <wulf@FreeBSD.org> |
LinuxKPI: Add sort() wrapper.
swap parameter is not supported as it is rarely used in Linux kernel and its implementation will add some preprocessor spaghetti to qsort.
Required by drm-kmod.
MFC a
LinuxKPI: Add sort() wrapper.
swap parameter is not supported as it is rarely used in Linux kernel and its implementation will add some preprocessor spaghetti to qsort.
Required by drm-kmod.
MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33675
show more ...
|
| #
4d846d26
|
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
| #
7356f661
|
| 25-Dec-2021 |
Vladimir Kondratyev <wulf@FreeBSD.org> |
LinuxKPI: Add sort() wrapper.
swap parameter is not supported as it is rarely used in Linux kernel and its implementation will add some preprocessor spaghetti to qsort.
Required by drm-kmod.
MFC a
LinuxKPI: Add sort() wrapper.
swap parameter is not supported as it is rarely used in Linux kernel and its implementation will add some preprocessor spaghetti to qsort.
Required by drm-kmod.
MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33675
show more ...
|
| #
4d846d26
|
| 10-May-2023 |
Warner Losh <imp@FreeBSD.org> |
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of
spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSD
The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause.
Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
show more ...
|
| #
7356f661
|
| 25-Dec-2021 |
Vladimir Kondratyev <wulf@FreeBSD.org> |
LinuxKPI: Add sort() wrapper.
swap parameter is not supported as it is rarely used in Linux kernel and its implementation will add some preprocessor spaghetti to qsort.
Required by drm-kmod.
MFC a
LinuxKPI: Add sort() wrapper.
swap parameter is not supported as it is rarely used in Linux kernel and its implementation will add some preprocessor spaghetti to qsort.
Required by drm-kmod.
MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D33675
show more ...
|