From patchwork Tue Dec 19 23:53:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Corbet X-Patchwork-Id: 181344 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:24d3:b0:fb:cd0c:d3e with SMTP id r19csp2309834dyi; Tue, 19 Dec 2023 15:54:08 -0800 (PST) X-Google-Smtp-Source: AGHT+IFi3G8/xggh4yo6NBADZsaU+PWqNZDNmviPGeipSrHsO5bFq3qvlinYmMBkWwErWvTP5ZIc X-Received: by 2002:a05:6214:1d05:b0:67f:63a5:b39c with SMTP id e5-20020a0562141d0500b0067f63a5b39cmr2647094qvd.11.1703030048019; Tue, 19 Dec 2023 15:54:08 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1703030048; cv=none; d=google.com; s=arc-20160816; b=rL4mXbntdtoSC7GtaNetzWoB6ysW3zw/r29qmQPy5KqPJVO/ahn8cdtLSPLtjM3KGr R2R1Bo2F7sE24dhgZIXVfJFtWaa3yFF55xgZqFu8aUH9ERl0Oa5rHA/t0JX5UpXxy3gf 9aQT/dMO3vzUqoU2XqH6tLTAOFn2A3J3wg3st1NdndRCqInDpNaDLOTYoMN+eVIuTRou dgGeQn3KotW2XH7cCv+yNKHtLWH3yc9tF2H5CQKk7fDe/u91FCutJMVV5a/1dvdipSNa xTu1I2aCMquKAZ3tN7cH5j2VQSR0/Hd8wkM6isUVdgzYOpZPx61+qo7RxlENl1w45IlE nzlw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :message-id:date:subject:cc:to:from:dkim-signature:dkim-filter; bh=4bxsCb3d4Rri3k4ZP1joC3ve9NadD0wIAlYgvDY2Je0=; fh=FZqYaj/9bGBJr1VMWHgPVu0sJiDazCD7Ew2m51HG0vM=; b=lH5cPSEwSTQyPo4MUU5goExe4yitSIE0aLtQqGgVvrl0elnDSb7XlFu4/+LM5J5FRL mEEY2jYQYGZgOdsml4FgzL6a7EjGj97fGnvypWK11/9aCBe24W3qeCIrZJEAs9llZWAz v8JbDdK3dw+gP2NN44bjSR0kGGqMMya33HJKJmmOym8T2lCXjz3tyY935Unw8iYcUiLw Ga6fT2Yd/f0cQEvIM9YqrelXQAcUY7Vj+EV+VpMTDdZyVPRtkwlSWggxWOjGjpt2+76G unfSGfMNOduyxISMZj/7UTAKtN/ORUBpXttEYVD+UX765SLjAO9QYZjMptol5Zy1RRbo 1gYw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=HiAhe10Q; spf=pass (google.com: domain of linux-kernel+bounces-6115-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6115-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lwn.net Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id t24-20020a0cb398000000b0067f5276bd62si3849343qve.309.2023.12.19.15.54.07 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Dec 2023 15:54:08 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-6115-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@lwn.net header.s=20201203 header.b=HiAhe10Q; spf=pass (google.com: domain of linux-kernel+bounces-6115-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-6115-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=lwn.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id CC4CF1C2518F for ; Tue, 19 Dec 2023 23:54:07 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id D5A0F405DA; Tue, 19 Dec 2023 23:53:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lwn.net header.i=@lwn.net header.b="HiAhe10Q" X-Original-To: linux-kernel@vger.kernel.org Received: from ms.lwn.net (ms.lwn.net [45.79.88.28]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B6DF940BE4; Tue, 19 Dec 2023 23:53:47 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=lwn.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=lwn.net Received: from localhost (unknown [IPv6:2601:280:5e00:7e19::646]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ms.lwn.net (Postfix) with ESMTPSA id EF12D2AE; Tue, 19 Dec 2023 23:53:46 +0000 (UTC) DKIM-Filter: OpenDKIM Filter v2.11.0 ms.lwn.net EF12D2AE DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lwn.net; s=20201203; t=1703030027; bh=4bxsCb3d4Rri3k4ZP1joC3ve9NadD0wIAlYgvDY2Je0=; h=From:To:Cc:Subject:Date:From; b=HiAhe10QsiNMZLZJVA12+4ieEF5GUsBkHF1JGXD+GKZtyczR7R7ml4WzsqnmzEhcu 3dZi+eKXzUXYjxsmFSNxUbnaPvsmOglnAmMmdGMEs6mz9aTzi7dEjDvAK3hS8C0ucR tfV/Y7mi7I+Gh93dCGEEg7cqt6MolzwKTOWrGzShqH/JTeEw3aTtCYfb5eUETc5M1k QafxaRgaoBfma7HUOcNNcv46P/WkyD60if+zV8VCdnrbQzOZecAtWJzWUa7vM8ckNd HDisbqlLW6qkfjfiaZ9QsauiE0IcAqrA/lV9GEU1Bam9WOYV9Q7o88TBRvgzY8nbyp IfX0Q52P44Y3Q== From: Jonathan Corbet To: netdev@vger.kernel.org Cc: "David S. Miller" , linux-kernel@vger.kernel.org Subject: [PATCH net] ethtool: reformat kerneldoc for struct ethtool_link_settings Date: Tue, 19 Dec 2023 16:53:46 -0700 Message-ID: <87zfy5g35h.fsf@meer.lwn.net> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785756435718136326 X-GMAIL-MSGID: 1785756435718136326 The kernel doc comments for struct ethtool_link_settings includes documentation for three fields that were never present there, leading to these docs-build warnings: ./include/uapi/linux/ethtool.h:2207: warning: Excess struct member 'supported' description in 'ethtool_link_settings' ./include/uapi/linux/ethtool.h:2207: warning: Excess struct member 'advertising' description in 'ethtool_link_settings' ./include/uapi/linux/ethtool.h:2207: warning: Excess struct member 'lp_advertising' description in 'ethtool_link_settings' Remove the entries to make the warnings go away. There was some information there on how data in >link_mode_masks is formatted; move that to the body of the comment to preserve it. Signed-off-by: Jonathan Corbet Reviewed-by: Randy Dunlap --- include/uapi/linux/ethtool.h | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h index f7fba0dc87e5..50253287c321 100644 --- a/include/uapi/linux/ethtool.h +++ b/include/uapi/linux/ethtool.h @@ -2128,18 +2128,6 @@ enum ethtool_reset_flags { * refused. For drivers: ignore this field (use kernel's * __ETHTOOL_LINK_MODE_MASK_NBITS instead), any change to it will * be overwritten by kernel. - * @supported: Bitmap with each bit meaning given by - * %ethtool_link_mode_bit_indices for the link modes, physical - * connectors and other link features for which the interface - * supports autonegotiation or auto-detection. Read-only. - * @advertising: Bitmap with each bit meaning given by - * %ethtool_link_mode_bit_indices for the link modes, physical - * connectors and other link features that are advertised through - * autonegotiation or enabled for auto-detection. - * @lp_advertising: Bitmap with each bit meaning given by - * %ethtool_link_mode_bit_indices for the link modes, and other - * link features that the link partner advertised through - * autonegotiation; 0 if unknown or not applicable. Read-only. * @transceiver: Used to distinguish different possible PHY types, * reported consistently by PHYLIB. Read-only. * @master_slave_cfg: Master/slave port mode. @@ -2181,6 +2169,21 @@ enum ethtool_reset_flags { * %set_link_ksettings() should validate all fields other than @cmd * and @link_mode_masks_nwords that are not described as read-only or * deprecated, and must ignore all fields described as read-only. + * + * @link_mode_masks is divided into three bitfields, each of length + * @link_mode_masks_nwords: + * - supported: Bitmap with each bit meaning given by + * %ethtool_link_mode_bit_indices for the link modes, physical + * connectors and other link features for which the interface + * supports autonegotiation or auto-detection. Read-only. + * - advertising: Bitmap with each bit meaning given by + * %ethtool_link_mode_bit_indices for the link modes, physical + * connectors and other link features that are advertised through + * autonegotiation or enabled for auto-detection. + * - lp_advertising: Bitmap with each bit meaning given by + * %ethtool_link_mode_bit_indices for the link modes, and other + * link features that the link partner advertised through + * autonegotiation; 0 if unknown or not applicable. Read-only. */ struct ethtool_link_settings { __u32 cmd;