From nobody Sat Feb 7 21:48:01 2026 Received: from mail-pl1-f177.google.com (mail-pl1-f177.google.com [209.85.214.177]) (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 779B221FF30 for ; Sun, 18 Jan 2026 17:13:54 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.177 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768756435; cv=none; b=mK9gk9nuaega9q61i1arrpsZmDWxRT/V0qa8IUXNo4J2LzncqXaqudSecg6chjn0NnzY3Wyrj+rNx2O9/42TYXegZVvk5I59xUZnJ5rOin6e+hC0AAJQVqnBQ13hfJWAPj3ebifpZuQXOvZRM9xOyvmcshpoA9kaaImY9sqW8VI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768756435; c=relaxed/simple; bh=NYv4wXfCJsteCh/IKKa+p26JSCus6vhr1+RsekjO2WM=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=R+nKgwLhfhCK2/+VmX8IN595FbKY7EgcG7vwDrQ4Sg8NyKGjtrWHqjxNZ/cfHr0lB6EYLjPAC6QUHQUB4/oxKWqrObkLFQw64TDU8XnMm3lVs44S02obaqZHtcIaKA5PRQRVwMgNur0/7Dz1dQ+lcdwa3dfyQKR5ygmdnp8idzs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=mREYvi1L; arc=none smtp.client-ip=209.85.214.177 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="mREYvi1L" Received: by mail-pl1-f177.google.com with SMTP id d9443c01a7336-2a081c163b0so19416185ad.0 for ; Sun, 18 Jan 2026 09:13:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1768756434; x=1769361234; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=X+kJzV16mDttQz/c0iPQYgG9KI/jQGHFGLrakgQpWTY=; b=mREYvi1LivRvl+cRHhR7FmDh7oizf9mvMgjcQFzTfzaTk5My2GFoHq38hF+CWWssJ/ i0Ue9OdL3i9/oJaEJjpdLw0mWeB24FAJsztnSUZnYKc/EQHWEWXUhhnQC37MiKrJHx/w 7ltC2FD28hXSmQuHp5GWwA9VgW5ug9IVgBukJkMP7Grh1XlJVfwmnOvr+LJWmadKqOMO kL0qTTtc9JnF1F1btf7gM3Lp/Tin+43yNIK8BYrzRyP/so9DLb7jqkVAChqdAKGtfa7E nQQHVW9LThu5gsyP7PV9Es940/cILBI2IY5L+prrakA6VA8ES75gUkG78co4dz9HVHHV xkEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768756434; x=1769361234; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=X+kJzV16mDttQz/c0iPQYgG9KI/jQGHFGLrakgQpWTY=; b=ZwovPf7fXFVsrefagnlC8i5hQYhSoWVdggRk1oTYFHnPDN7NXPNW5lpmVbv54b/zL7 pE1jKoeLFu0uDAzXKR2YK/+9JxAs6vBBXXjn0zyTzZJl7bNv9sOrXVnSSEzCqbLAuPOS hcgBOgdro50CXM20tm2OZMl2fsFojfR1qv2s+e2jf6ta8G/NXvGEJkL7xdmjzPe/xIJ2 6V39e4XMM1OD2p9Ava5liAz3V4gfmXabdy6NUOqKweWJIPQqa33mpASNY+fhP2mXGxUy ojVPKqAAZ9jrt5F24ZtTn54KXVPy6rBl+4bvX3p46i6owDttiRUffvAbsjVL7b/8mBVU fwkQ== X-Forwarded-Encrypted: i=1; AJvYcCWcN5bn52hnM6Xw27GY3v8g6BuPpqZSC/iV9QEvnFuQ+ZaXp0bRr2ARQqe94TKXTot1eJzaQ6B17BhV074=@vger.kernel.org X-Gm-Message-State: AOJu0YxJHSY5zeEhReyB25p/hMJk31U8BDa3+f9k0+0fTTYpUBRXNsWD VuHF9iuiECcYH+vsPOwTQlHKmIp/VF9fuWa+MbiyTmUuPoWZVtF6usb8 X-Gm-Gg: AY/fxX5d57lsUYAoS3k3zx7nkTcm1had2Wcb9v6mBnUVCef4Tu+4KMVOGLloBOJkZGy 2WLrM2ZS4ImQKahpZGBPXkLcnQ4m/HChQVRAa6h2kO3kXIdFt+9ADEY8uTkTW7yawU8Zm3vKe5W pjdIsu0k+GYpkRpXJlD9+78xCsYKsAuIpxqNyFAhwbU6ji0X8m2gjQQ0h6ZCIWaeELucqo2URof KLM/0FlRcl4aja2yZnQ2uylNTR/cJ6amPa+F1iXT3cOsf6c+eD40Y1tFYkyQi2XGDmygdyKcDa8 RYwyQUYyvfDXRUEiHsre8uXlPHQYBXMBHElRE4+UBlP00vR4Y/Mxgdo+Rmf0aqaGmX69qNv4mM0 3Z/DTRXyM4yrqDEzmId8J04OkkMllMxZkARExTaD1jKZ9DpqcwR8gAu6QTp0yfY1asDcLqdXtiU hMZ+UB1RciU+C9i1dNX4kgfRo+XH8rkg== X-Received: by 2002:a17:903:2f8a:b0:2a2:f0cb:dfa2 with SMTP id d9443c01a7336-2a71754509fmr83815545ad.13.1768756433757; Sun, 18 Jan 2026 09:13:53 -0800 (PST) Received: from localhost.localdomain ([103.215.237.163]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-2a71941c088sm71370285ad.91.2026.01.18.09.13.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 18 Jan 2026 09:13:53 -0800 (PST) From: Karthikey Kadati To: gregkh@linuxfoundation.org Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org, karthikey3608@gmail.com Subject: [PATCH v6] staging: octeon: Remove port status typedefs Date: Sun, 18 Jan 2026 22:43:48 +0530 Message-ID: <20260118171348.54963-1-karthikey3608@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Remove cvmx_pip_port_status_t and cvmx_pko_port_status_t typedefs and replace them with struct cvmx_pip_port_status and struct cvmx_pko_port_status to match Linux kernel coding style. This also updates the MIPS architecture headers to name the structs so they can be referenced by the staging driver. The anonymous struct definitions in the headers caused compilation errors when referenced directly, so they are now named structs. Signed-off-by: Karthikey Kadati --- Changes in v6: - Actually removed the 'typedef' keyword from cvmx-pip.h (Greg KH). - Moved changelog history below the --- line (Greg KH). - Removed misleading Reported-by tag. Changes in v5: - Removed misleading Reported-by tag. Changes in v4: - Completely removed typedefs (Greg KH). Now uses struct directly. - Clarified commit message. Changes in v3: - Fix build error caused by anonymous structs. Changes in v2: - Fix invalid Signed-off-by name. v1: - Initial submission. arch/mips/include/asm/octeon/cvmx-pip.h | 4 ++-- arch/mips/include/asm/octeon/cvmx-pko.h | 6 +++--- drivers/staging/octeon/ethernet.c | 4 ++-- drivers/staging/octeon/octeon-stubs.h | 12 ++++++------ 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/arch/mips/include/asm/octeon/cvmx-pip.h b/arch/mips/include/as= m/octeon/cvmx-pip.h index 01ca7267a2ba..1e107a9aa650 100644 --- a/arch/mips/include/asm/octeon/cvmx-pip.h +++ b/arch/mips/include/asm/octeon/cvmx-pip.h @@ -236,7 +236,7 @@ typedef struct { uint64_t inb_octets; /* Number of packets with GMX/SPX/PCI errors received by PIP */ uint16_t inb_errors; -} cvmx_pip_port_status_t; +}; =20 /** * Definition of the PIP custom header that can be prepended @@ -365,7 +365,7 @@ static inline void cvmx_pip_config_diffserv_qos(uint64_= t diffserv, uint64_t qos) * @status: Where to put the results. */ static inline void cvmx_pip_get_port_status(uint64_t port_num, uint64_t cl= ear, - cvmx_pip_port_status_t *status) + struct cvmx_pip_port_status *status) { union cvmx_pip_stat_ctl pip_stat_ctl; union cvmx_pip_stat0_prtx stat0; diff --git a/arch/mips/include/asm/octeon/cvmx-pko.h b/arch/mips/include/as= m/octeon/cvmx-pko.h index f18a7f24daf8..4b83b2171c12 100644 --- a/arch/mips/include/asm/octeon/cvmx-pko.h +++ b/arch/mips/include/asm/octeon/cvmx-pko.h @@ -114,11 +114,11 @@ typedef enum { CVMX_PKO_LOCK_CMD_QUEUE =3D 2, } cvmx_pko_lock_t; =20 -typedef struct { +struct cvmx_pko_port_status { uint32_t packets; uint64_t octets; uint64_t doorbell; -} cvmx_pko_port_status_t; +}; =20 /** * This structure defines the address to use on a packet enqueue @@ -574,7 +574,7 @@ static inline int cvmx_pko_get_num_queues(int port) * @status: Where to put the results. */ static inline void cvmx_pko_get_port_status(uint64_t port_num, uint64_t cl= ear, - cvmx_pko_port_status_t *status) + struct cvmx_pko_port_status *status) { union cvmx_pko_reg_read_idx pko_reg_read_idx; union cvmx_pko_mem_count0 pko_mem_count0; diff --git a/drivers/staging/octeon/ethernet.c b/drivers/staging/octeon/eth= ernet.c index eadb74fc14c8..6d03d23461e4 100644 --- a/drivers/staging/octeon/ethernet.c +++ b/drivers/staging/octeon/ethernet.c @@ -201,8 +201,8 @@ EXPORT_SYMBOL(cvm_oct_free_work); */ static struct net_device_stats *cvm_oct_common_get_stats(struct net_device= *dev) { - cvmx_pip_port_status_t rx_status; - cvmx_pko_port_status_t tx_status; + struct cvmx_pip_port_status rx_status; + struct cvmx_pko_port_status tx_status; struct octeon_ethernet *priv =3D netdev_priv(dev); =20 if (priv->port < CVMX_PIP_NUM_INPUT_PORTS) { diff --git a/drivers/staging/octeon/octeon-stubs.h b/drivers/staging/octeon= /octeon-stubs.h index 35b5078ba51e..f6d502193789 100644 --- a/drivers/staging/octeon/octeon-stubs.h +++ b/drivers/staging/octeon/octeon-stubs.h @@ -386,7 +386,7 @@ union cvmx_ipd_sub_port_qos_cnt { } s; }; =20 -typedef struct { +struct cvmx_pip_port_status { uint32_t dropped_octets; uint32_t dropped_packets; uint32_t pci_raw_packets; @@ -409,13 +409,13 @@ typedef struct { uint32_t inb_packets; uint64_t inb_octets; uint16_t inb_errors; -} cvmx_pip_port_status_t; +}; =20 -typedef struct { +struct cvmx_pko_port_status { uint32_t packets; uint64_t octets; uint64_t doorbell; -} cvmx_pko_port_status_t; +}; =20 union cvmx_pip_frm_len_chkx { uint64_t u64; @@ -1260,11 +1260,11 @@ static inline int octeon_is_simulation(void) } =20 static inline void cvmx_pip_get_port_status(uint64_t port_num, uint64_t cl= ear, - cvmx_pip_port_status_t *status) + struct cvmx_pip_port_status *status) { } =20 static inline void cvmx_pko_get_port_status(uint64_t port_num, uint64_t cl= ear, - cvmx_pko_port_status_t *status) + struct cvmx_pko_port_status *status) { } =20 static inline cvmx_helper_interface_mode_t cvmx_helper_interface_get_mode(= int --=20 2.43.0