The branch main has been updated by bz: URL: https://cgit.FreeBSD.org/src/commit/?id=9492230fd3d1e58696e9fd99cb9680b27bf1d424
commit 9492230fd3d1e58696e9fd99cb9680b27bf1d424 Author: Bjoern A. Zeeb <[email protected]> AuthorDate: 2025-12-03 01:01:28 +0000 Commit: Bjoern A. Zeeb <[email protected]> CommitDate: 2025-12-03 19:54:44 +0000 mt76: util.h: extend worker name In mt76_worker_setup() add the "name" argument to the description for the worker thread. That way we have a chance to keep them apart. While here, rename a variable and shorten the the (c)/SPDX section according to new style. MFC after: 3 days --- sys/contrib/dev/mediatek/mt76/util.h | 39 ++++++++---------------------------- 1 file changed, 8 insertions(+), 31 deletions(-) diff --git a/sys/contrib/dev/mediatek/mt76/util.h b/sys/contrib/dev/mediatek/mt76/util.h index f6c0ecaf33e6..73a784fe2707 100644 --- a/sys/contrib/dev/mediatek/mt76/util.h +++ b/sys/contrib/dev/mediatek/mt76/util.h @@ -1,30 +1,7 @@ -/*- - * SPDX-License-Identifier: BSD-2-Clause - * - * Copyright (c) 2020,2022-2023 Bjoern A. Zeeb <[email protected]> - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. +/* + * Copyright (c) 2020-2025 Bjoern A. Zeeb <[email protected]> * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ + * SPDX-License-Identifier: BSD-2-Clause */ #ifndef _MT76_UTIL_H @@ -69,23 +46,23 @@ mt76_wcid_mask_clear(u32 *mask, u16 bit) /* See, e.g., __mt76_worker_fn for some details. */ static inline int -mt76_worker_setup(struct ieee80211_hw *hw, struct mt76_worker *w, +mt76_worker_setup(struct ieee80211_hw *hw __unused, struct mt76_worker *w, void (*wfunc)(struct mt76_worker *), const char *name) { - int rc; + int error; if (wfunc) w->fn = wfunc; w->task = kthread_run(__mt76_worker_fn, w, - "mt76-worker"); + "mt76-%s", name); if (!IS_ERR(w->task)) return (0); - rc = PTR_ERR(w->task); + error = PTR_ERR(w->task); w->task = NULL; - return (rc); + return (error); } static inline void
