From nobody Mon Apr 6 09:12:08 2026 Received: from mail-pj1-f74.google.com (mail-pj1-f74.google.com [209.85.216.74]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB52F3783A7 for ; Fri, 20 Mar 2026 08:55:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.216.74 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773996926; cv=none; b=VfdUeG+IQ1w+UdtZbRIdG6gdHem0w6uUcY+oXx+59YuKTlj8fEoGvkl/Wof7bzqBVSRVVyoL29ZLWXq4MKIt++6xb6Yo8C/Vv47/1eqwj/07AQ24/DtVr4vkjxc6pNBM1/PHM3mtBMI/5bVrhyGCqY2k5SXRdSv/kypRdTo+/+w= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773996926; c=relaxed/simple; bh=r5JeqbpaQSgzfD5nVZ2+4ZgQVe4wxzOwvDAuDGO/s2g=; h=Date:In-Reply-To:Mime-Version:References:Message-ID:Subject:From: To:Cc:Content-Type; b=JiN+UsyCpYOaUFrqERTnoIPxfV0f2Egi4kz9E8qBBS4Y5Y1ovomWFjI4AkQh4Y3tO7n16ij2klCOxd4JGaNYle/Y1rrFmIhKO9EHa7pm6yUmAO2RCqSFWKQ0lYKx9onvq7UU4mjgLBoHmd3Zv6Lsw6+mcXznbgoIiEoUT7Xi7HY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com; spf=pass smtp.mailfrom=flex--khtsai.bounces.google.com; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b=fMCDp536; arc=none smtp.client-ip=209.85.216.74 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=google.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=flex--khtsai.bounces.google.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=google.com header.i=@google.com header.b="fMCDp536" Received: by mail-pj1-f74.google.com with SMTP id 98e67ed59e1d1-35b94e2caf9so2476244a91.0 for ; Fri, 20 Mar 2026 01:55:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20251104; t=1773996923; x=1774601723; darn=vger.kernel.org; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:from:to:cc:subject:date:message-id:reply-to; bh=1dWn+d5N9BmZH7+uNOdi4sUe7sM9CUAvkoQg+RhZqyg=; b=fMCDp536uKLz+Qau+iE4aKGJzuJDU+WabL3QVGmjUvZHcTP2bHIZbKSsWK8/QTGi/+ MVvmz3D/ZPYOMMaB+wkBDDCS22U9HkXiV350DAC7+UwevyYz5fUe3+Ats0esD6AxFnrU Xfs4EafJ02JZZfydBCMGR9VbqQoDtMgYYosPSuLdUbv4Ck7bvJmc3VA2V1gIivutY3WN X8R9hA0fBycopE/mtdlos3gW1t0g3T3b62M7G+wYqaquXwYIDgTI1LdKNPaJNwLxknir pPUb432GjYnqDVYDEwyevXlLTVVKMxp0Cv4S6crNI+KkOr1HThXtdwXXk4qKyvmnqc1o Uo8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773996923; x=1774601723; h=cc:to:from:subject:message-id:references:mime-version:in-reply-to :date:x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=1dWn+d5N9BmZH7+uNOdi4sUe7sM9CUAvkoQg+RhZqyg=; b=s5sad7p48dJMJNeJ6ReTxQVaHwKCVu9w15meCU/xF/bBZZYY3mGAou1Aqos7XztJ/V pyXc84B6HefSZsw6DkQyFMLWfYF9vh20cOtJpw3h5lwIz/xHWog5Akb8cwnjCdJ/GRY/ i0+L+sWy2wlUb4e9t1IAOl9JB3zJnkILxkYEbOAEnq59AiEgqDha6GJlSlHH3wrP3Hnp Z+LTgscVN+tqsgj64aeYrIzK+KVJags5j39p1i7VFtCMMLhOvCaIXUquDNNuKQIy/AN9 hAREjzId5dgZ9gBmkjgHhfY0/0SyvlO70XcQ80QZLSyyi4Ls4kH4GcqdsHLAwin2VbE5 SvQQ== X-Forwarded-Encrypted: i=1; AJvYcCWVDTYUXsMZJ3NKpVZOtg2l5ODTJGntNqEUqJuMavRitwRLTId+tKtI7A7TvR2M6HD4LfUIeLClcQMvS7s=@vger.kernel.org X-Gm-Message-State: AOJu0Yw1XiQsxZwL5sPbBwYE8m2zurMsw2BeSB+XOMKOmu5EF4P7LFT5 wpTAsudzyrzYnRZvi4WAye+G8e7DoUu+V3FLedUKd6hOHfmqFF5mdseD9+pGm/bgY2o1UdJXoEe jfUzklw== X-Received: from pjbei15.prod.google.com ([2002:a17:90a:e54f:b0:359:bc4:636]) (user=khtsai job=prod-delivery.src-stubby-dispatcher) by 2002:a17:90b:554e:b0:35b:9ab6:1d65 with SMTP id 98e67ed59e1d1-35bd2d52dc5mr1663642a91.25.1773996923152; Fri, 20 Mar 2026 01:55:23 -0700 (PDT) Date: Fri, 20 Mar 2026 16:54:46 +0800 In-Reply-To: <20260320-usb-net-lifecycle-v1-0-4886b578161b@google.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 References: <20260320-usb-net-lifecycle-v1-0-4886b578161b@google.com> X-Developer-Key: i=khtsai@google.com; a=ed25519; pk=abA4Pw6dY2ZufSbSXW9mtp7xiv1AVPtgRhCFWJSEqLE= X-Developer-Signature: v=1; a=ed25519-sha256; t=1773996915; l=1808; i=khtsai@google.com; s=20250916; h=from:subject:message-id; bh=r5JeqbpaQSgzfD5nVZ2+4ZgQVe4wxzOwvDAuDGO/s2g=; b=zvaz6HcwncN9XVtstgwC9aPtuRPoIf8obg4Gc/e+qJ+iyNk+ZMbETqriLLPo7gpzCHMvHvtdP nvSn224/OS2D+4wn+wViROkQiOArwYnBk4OQhn9dJmG8/0i0B350BWG X-Mailer: b4 0.14.3 Message-ID: <20260320-usb-net-lifecycle-v1-3-4886b578161b@google.com> Subject: [PATCH 3/7] usb: gadget: u_ncm: Add kernel-doc comments for struct f_ncm_opts From: Kuen-Han Tsai To: Greg Kroah-Hartman , Kyungmin Park , Felipe Balbi , David Lechner Cc: linux-usb@vger.kernel.org, linux-kernel@vger.kernel.org, Kuen-Han Tsai Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Provide kernel-doc descriptions for the fields in struct f_ncm_opts to improve code readability and maintainability. Signed-off-by: Kuen-Han Tsai --- drivers/usb/gadget/function/u_ncm.h | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/drivers/usb/gadget/function/u_ncm.h b/drivers/usb/gadget/funct= ion/u_ncm.h index b1f3db8b68c1..ce2f6358688a 100644 --- a/drivers/usb/gadget/function/u_ncm.h +++ b/drivers/usb/gadget/function/u_ncm.h @@ -15,6 +15,20 @@ =20 #include =20 +/** + * struct f_ncm_opts - NCM function options + * @func_inst: USB function instance. + * @net: The net_device associated with the NCM function. + * @bind_count: Tracks the number of configurations the NCM function is + * bound to, preventing double-registration of the @net devic= e. + * @ncm_interf_group: ConfigFS group for NCM interface. + * @ncm_os_desc: USB OS descriptor for NCM. + * @ncm_ext_compat_id: Extended compatibility ID. + * @lock: Protects the data from concurrent access by configfs read/write + * and create symlink/remove symlink operations. + * @refcnt: Reference counter for the function instance. + * @max_segment_size: Maximum segment size. + */ struct f_ncm_opts { struct usb_function_instance func_inst; struct net_device *net; @@ -23,12 +37,7 @@ struct f_ncm_opts { struct config_group *ncm_interf_group; struct usb_os_desc ncm_os_desc; char ncm_ext_compat_id[16]; - /* - * Read/write access to configfs attributes is handled by configfs. - * - * This is to protect the data from concurrent access by read/write - * and create symlink/remove symlink. - */ + struct mutex lock; int refcnt; =20 --=20 2.53.0.959.g497ff81fa9-goog