πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.netdev
Article #1789

Re: [PATCH net-next v9 04/11] net: ethernet: oa_tc6: Move constant definitions to header file

#1789
From: netdev-bot+sashiko
Date: Sat, 10 Oct 2026 19:40
86 lines
8527 bytes
Thank you for your contribution! Sashiko AI review found more severe
issue(s) in other patches of this series. This mail is only an FYI, in case
you want to address the nit picks below when you respin.

Low priority / nit picks for your consideration:

- [Low] The new private header
  drivers/net/ethernet/oa_tc6/oa_tc6_std_def.h doesn't compile on its…

--

net: ethernet: oa_tc6: Move constant definitions to header file

This patch moves the control/data header definitions, size constants,
enums and struct oa_tc6 out of oa_tc6.c into a new private header,
drivers/net/ethernet/oa_tc6/oa_tc6_std_def.h. Other source files in the
OA TC6 framework can then share them.

> diff --git a/drivers/net/ethernet/oa_tc6/oa_tc6_std_def.h b/drivers/net/ethernet/oa_tc6/oa_tc6_std_def.h
> new file mode 100644
> index 0000000000000..403a9c22b5f14
> --- /dev/null
> +++ b/drivers/net/ethernet/oa_tc6/oa_tc6_std_def.h
> @@ -0,0 +1,125 @@

[ ... ]

> +#ifndef OA_TC6_STD_DEF_H
> +#define OA_TC6_STD_DEF_H
> +
> +#include <linux/ptp_clock_kernel.h>
> +#include <linux/net_tstamp.h>
> +#include <linux/netdevice.h>
> +#include <linux/spi/spi.h>
> +#include <linux/skbuff.h>
> +#include <linux/sched.h>
> +#include <linux/wait.h>
> +#include <linux/phy.h>

[ ... ]

> +/* Internal structure for MAC-PHY drivers */
> +struct oa_tc6 {

[ ... ]

> +	bool prot_ctrl;
> +	enum oa_tc6_quirk_flag quirk_flags;
> +	struct gpio_desc *reset_gpio;
> +};

[Severity: Low]
This isn't a bug, but is this header meant to be self-contained?

struct oa_tc6 has quirk_flags as a by-value member of type
enum oa_tc6_quirk_flag. That enum is defined only in
include/linux/oa_tc6.h:

include/linux/oa_tc6.h:
enum oa_tc6_quirk_flag {
	OA_TC6_BROKEN_PHY = BIT(0),
};

oa_tc6_std_def.h doesn't include <linux/oa_tc6.h>. It compiles today
only because oa_tc6.c includes <linux/oa_tc6.h> right before it:

#include <linux/oa_tc6.h>

#include "oa_tc6_std_def.h"

Any new file that includes "oa_tc6_std_def.h" first would fail to build.

At this commit include/linux/oa_tc6.h has no include guard, so adding
the include here would also need a guard there. The later patch "net:
ethernet: oa_tc6: Support for hardware timestamp" adds _LINUX_OA_TC6_H.
Could this patch add the guard and include <linux/oa_tc6.h> directly
from oa_tc6_std_def.h?

A smaller point: nothing in this patch seems to use
<linux/ptp_clock_kernel.h>, <linux/net_tstamp.h>, <linux/sched.h> or
<linux/wait.h>. They look like they are first needed by the later
hardware timestamp patch.

-- 
Sashiko AI review Β· https://netdev-ai.bots.linux.dev/sashiko/#/patchset/20261009-s2500-mac-phy-support-v9-0-dcefe1d0bf0d%40onsemi.com
Technical Details
Message-ID: <179166121360.434549.13863914493616373656@kernel.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-344312-linux-kernel-netdev=dewy.ru
References: <20261009-s2500-mac-phy-support-v9-4-dcefe1d0bf0d@onsemi.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-344312-linux-kernel-netdev=dewy.ru
From: netdev-bot+sashiko@kernel.org
Newsgroups: linux.kernel.netdev
Subject: Re: [PATCH net-next v9 04/11] net: ethernet: oa_tc6: Move constant
 definitions to header file
Date: Sat, 10 Oct 2026 19:40:13 +0000
Organization: Usenet Network
Message-ID: <179166121360.434549.13863914493616373656@kernel.org>
References: <20261009-s2500-mac-phy-support-v9-4-dcefe1d0bf0d@onsemi.com>
MIME-Version: 1.0
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit
Injection-Info: usenet.network;
	logging-data="1397386"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:dSch6I80J6EGSrFtDBP4UOBt6ws= sha256:9saKIGdOi5HqSmsRZQNBwP6zHGxoeuoCPiqVALuVVQ0=
	sha1:LLXkMz4lOEuQzf7zaHOojXIaXL8= sha256:f33tbl+pfWSIwMs2PLeeM2XToNtNlX1sGoEYfmJxB3g=
List-ID: <netdev.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id D187710F810; Sat, 10 Oct 2026 22:42:03 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.34
X-Spam-Status: No, score=-1.34 tagged_above=-9999 required=6.31
	tests=[DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.241, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
	MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
	URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key)
	header.d=kernel.org
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id RjaTV2VLeTyb;
	Sat, 10 Oct 2026 22:42:00 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-344312-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id 2ED5B10F941; Sat, 10 Oct 2026 22:41:57 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1])
	by sea.lore.kernel.org (Postfix) with ESMTP id A2D09262BB; Sat, 10 Oct 2026 19:40:51 +0000 (UTC)
X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id 9ABF84BE422;
	Sat, 10 Oct 2026 19:40:20 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="bHaQGXSu"
X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18])
	(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 3D01037269C;
	Sat, 10 Oct 2026 19:40:15 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18
X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116;
	t=1791661220; cv=none; b=gccYP4ewdM72tslMhhWDC645z0jHR6vMZW4QQJvFtys279vMMOqtpHS7ezglZ5F0yJ8a8YdwKGyozPAWpjzAC0yhy6MTiQsXC9PPFii3zltacNsw1ckxViXqtP+Tl7Bw+xYXXrIsq4gnjarc1kxGMtN95XxVwNxL0CxH5nBlZO0=
X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org;
	s=arc-20240116; t=1791661220; c=relaxed/simple;
	bh=O+Bu2puz/WXmvltTHOg86j1NW45KGnY8AMtphOlhmbg=;
	h=Subject:From:To:Cc:Date:Message-ID:In-Reply-To:References:
	 Content-Type:MIME-Version; b=iPZgl0DxW9aOam51/SDOfBdMJPjkkID+JTUeEmNrQesQjgS59kZlylVMsXAYsy9JcDJA35BqyghYpxvEzRAahePP/6oso2xXHbbT0HhsllaZqBGr444ZHhn8STyrgfgwyMlEXDYhEUxYyM0WNdNAuarWyQbh22UzH+rlEnP1Oss=
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=bHaQGXSu; arc=none smtp.client-ip=100.103.45.18
X-Received: by smtp.kernel.org (Postfix) with ESMTPSA id 1EE0D1F00898;
	Sat, 10 Oct 2026 19:40:14 +0000 (UTC)
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org;
	s=k20260515; t=1791661215;
	bh=O7jPgtWlaLzpLbIefWvv1Ic2MxSd+b3STMx1pkYwTcs=;
	h=Subject:From:To:Cc:Date:In-Reply-To:References;
	b=bHaQGXSuNa8ix8e37gIYES6Z+L4AaINIbyeLe7JOc5gS7r8irL5BRV5XsRgNHBwBw
	 eVeSLkDcDqtB1mD++XoK/ApLtfaHVPObcOELR8SSpvNvvsXJALqK9lTMfql/ALlh8S
	 I9TbPfTUtMJus0UB9jreV9omm8vnSEbMRp89MalBodgLkRPLZk6bkUFlTjPIDWojdv
	 tkefxoIChIP0DmwRbCaYlMqN6tEPBQNc8oNfd38DnGq10WHIEcHHX4CY1SgV3NHeQc
	 U/0BN7XBcXPbijavkkyAnuaQdLHHFQ8P2NWJ+Fd67a1tMeHLez8LdAfVUq7vpJrFhB
	 F7BjaSZM1NumA==
X-Cc: andrew+netdev@lunn.ch, davem@davemloft.net, kuba@kernel.org,
 pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
 parthiban.veerasooran@microchip.com, horms@kernel.org, corbet@lwn.net,
 skhan@linuxfoundation.org, rdunlap@infradead.org, richardcochran@gmail.com,
 andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk,
 edumazet@kernel.org, piergiorgio.beruto@gmail.com, netdev@vger.kernel.org,
 devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
 linux-doc@vger.kernel.org, jerry.ray@microchip.com, ciprian.regus@analog.com
X-In-Reply-To: <20261009-s2500-mac-phy-support-v9-4-dcefe1d0bf0d@onsemi.com>
X-sashiko-severity: Low
X-Precedence: bulk
X-Mailing-List: netdev@vger.kernel.org
X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org>