Date: Thu, 4 Sep 2025 14:33:14 GMT From: John Baldwin <jhb@FreeBSD.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: git: e2761a8567f3 - main - rtw89: Remove an unneeded __DECONST Message-ID: <202509041433.584EXEcD025270@gitrepo.freebsd.org>
next in thread | raw e-mail | index | archive | help
The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=e2761a8567f3bd93e4c363c2a1360eb89dd5f85b commit e2761a8567f3bd93e4c363c2a1360eb89dd5f85b Author: John Baldwin <jhb@FreeBSD.org> AuthorDate: 2025-09-04 14:25:46 +0000 Commit: John Baldwin <jhb@FreeBSD.org> CommitDate: 2025-09-04 14:30:15 +0000 rtw89: Remove an unneeded __DECONST Originally in e2340276fc73 the function argument was a "const void *data" which we changed to "const int" in FreeBSD. The Linux version simply cast the const void * to (enum rtw89_rf_path) both losing the const and changing the type. When later the function argument became a const union rtw89_fw_element_arg in 5b760eaecd6c3 it seems we tried to undo the older FreeBSD specific part and initially mismerged it leading to the const void *; but when fixing the type we did not undo the __DECONST but did a mechanical copy. Reviewed by: bz Co-authored-by: bz (commit message) Obtained from: CheriBSD Sponsored by: AFRL, DARPA Fixes: 6d67aabd6355 ("rtw89: update Realtek's rtw89 driver.") Differential Revision: https://reviews.freebsd.org/D52359 --- sys/contrib/dev/rtw89/fw.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/sys/contrib/dev/rtw89/fw.c b/sys/contrib/dev/rtw89/fw.c index e360f27c2ade..b4c0f864bc75 100644 --- a/sys/contrib/dev/rtw89/fw.c +++ b/sys/contrib/dev/rtw89/fw.c @@ -908,11 +908,7 @@ int rtw89_build_phy_tbl_from_elm(struct rtw89_dev *rtwdev, case RTW89_FW_ELEMENT_ID_RADIO_B: case RTW89_FW_ELEMENT_ID_RADIO_C: case RTW89_FW_ELEMENT_ID_RADIO_D: -#if defined(__linux__) rf_path = arg.rf_path; -#elif defined(__FreeBSD__) - rf_path = __DECONST(enum rtw89_rf_path, arg.rf_path); -#endif idx = elm->u.reg2.idx; elm_info->rf_radio[idx] = tbl;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202509041433.584EXEcD025270>