Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 08 Dec 2025 15:44:25 +0000
From:      Bjoern A. Zeeb <bz@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: c22fa080c766 - stable/15 - mt76: util.h: extend worker name
Message-ID:  <6936f259.38b98.2631103d@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help

The branch stable/15 has been updated by bz:

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

commit c22fa080c7661903094c9baeb99f9318bc5a1aef
Author:     Bjoern A. Zeeb <bz@FreeBSD.org>
AuthorDate: 2025-12-03 01:01:28 +0000
Commit:     Bjoern A. Zeeb <bz@FreeBSD.org>
CommitDate: 2025-12-08 15:43:54 +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.
    
    (cherry picked from commit 9492230fd3d1e58696e9fd99cb9680b27bf1d424)
---
 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 <bz@FreeBSD.org>
- *
- * 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 <bz@FreeBSD.org>
  *
- * 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6936f259.38b98.2631103d>