[PATCH v2 5/5] phy: apple: atc: Split generation-specific code
sashiko-bot at kernel.org
sashiko-bot at kernel.org
Sun Nov 22 04:35:20 PST 2026
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Medium] phy: apple: atc: missing linux/bitfield.h include for
FIELD_PREP()
--
commit e397fb823d5ae453512b167eed88b2e91bd53da3
Author: Sasha Finkelstein <k at chaosmail.tech>
phy: apple: atc: Split generation-specific code
This commit splits the T8103 and T8122 hardware generation-specific code
out of drivers/phy/apple/atc.c into atc-t8103.c, atc-t8122.c, and a shared
atc.h header.
> diff --git a/drivers/phy/apple/atc.h b/drivers/phy/apple/atc.h
> new file mode 100644
> index 0000000000000..d6a608c677696
> --- /dev/null
> +++ b/drivers/phy/apple/atc.h
> @@ -0,0 +1,806 @@
> +/* SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause */
> +
> +#include <linux/of_device.h>
> +#include <linux/platform_device.h>
> +#include <linux/reset-controller.h>
> +
> +#ifndef __ATC_H__
> +#define __ATC_H__
[Severity: Medium]
Should atc.h (or atc-t8103.c and atc-t8122.c) include <linux/bitfield.h>?
Both atc-t8103.c and atc-t8122.c call FIELD_PREP(), such as in
atcphy_configure_pipehandler_usb3_host_t8103() and
atcphy_configure_pipehandler_usb3_host_t8122(), which previously relied on
the <linux/bitfield.h> include in atc.c. On arm64, <asm/sysreg.h> pulls
in <linux/bitfield.h> transitively, but PHY_APPLE_ATC enables
CONFIG_COMPILE_TEST on other 64-bit architectures (such as x86_64) where
the build fails with an implicit declaration of FIELD_PREP().
Also, the #include directives at the top of atc.h sit outside the
__ATC_H__ include guard.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261122-t8122-phy-v2-0-8d5c8fdf31ba@chaosmail.tech?part=5
More information about the linux-phy
mailing list