From: Simon Horman <horms@kernel.org>
To: Eric Woudstra <ericwouds@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>, Andrew Lunn <andrew@lunn.ch>,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
Matthias Brugger <matthias.bgg@gmail.com>,
AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
Frank Wunderlich <frank-w@public-files.de>,
Daniel Golle <daniel@makrotopia.org>,
Lucien Jheng <lucien.jheng@airoha.com>,
Zhi-Jun You <hujy652@protonmail.com>,
netdev@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 net-next 2/2] net: phy: air_en8811h: Add the Airoha EN8811H PHY driver
Date: Mon, 4 Mar 2024 18:05:23 +0000 [thread overview]
Message-ID: <20240304180523.GR403078@kernel.org> (raw)
In-Reply-To: <20240302183835.136036-3-ericwouds@gmail.com>
On Sat, Mar 02, 2024 at 07:38:35PM +0100, Eric Woudstra wrote:
...
> +static int air_led_init(struct phy_device *phydev, u8 index, u8 state, u8 pol)
> +{
> + int val;
> + int err;
> +
> + if (index >= EN8811H_LED_COUNT)
> + return -EINVAL;
Hi Eric,
I think val needs to be initialised before it is used below.
Flagged by clang-17 W=1 build.
> +
> + if (state == AIR_LED_ENABLE)
> + val |= AIR_PHY_LED_ON_ENABLE;
> + else
> + val &= ~AIR_PHY_LED_ON_ENABLE;
> +
> + if (pol == AIR_ACTIVE_HIGH)
> + val |= AIR_PHY_LED_ON_POLARITY;
> + else
> + val &= ~AIR_PHY_LED_ON_POLARITY;
> +
> + err = phy_modify_mmd(phydev, MDIO_MMD_VEND2, AIR_PHY_LED_ON(index),
> + AIR_PHY_LED_ON_ENABLE |
> + AIR_PHY_LED_ON_POLARITY, val);
> +
> + if (err < 0)
> + return err;
> +
> + return 0;
> +}
...
next prev parent reply other threads:[~2024-03-04 18:05 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-02 18:38 [PATCH v2 net-next 0/2] Add en8811h phy driver and devicetree binding doc Eric Woudstra
2024-03-02 18:38 ` [PATCH v2 net-next 1/2] dt-bindings: net: airoha,en8811h: Add en8811h Eric Woudstra
2024-03-04 8:09 ` Krzysztof Kozlowski
2024-03-02 18:38 ` [PATCH v2 net-next 2/2] net: phy: air_en8811h: Add the Airoha EN8811H PHY driver Eric Woudstra
2024-03-03 2:37 ` Daniel Golle
2024-03-03 14:22 ` Eric Woudstra
2024-03-03 16:47 ` Andrew Lunn
2024-03-03 17:03 ` Daniel Golle
2024-03-03 17:08 ` Andrew Lunn
2024-03-05 8:24 ` Eric Woudstra
2024-03-03 7:57 ` kernel test robot
2024-03-03 17:29 ` Andrew Lunn
2024-03-05 8:13 ` Eric Woudstra
2024-03-05 13:54 ` Andrew Lunn
2024-03-07 16:48 ` Eric Woudstra
2024-03-07 17:40 ` Daniel Golle
2024-03-07 18:47 ` Andrew Lunn
2024-03-03 17:51 ` Andrew Lunn
2024-03-05 8:19 ` Eric Woudstra
2024-03-05 9:03 ` Russell King (Oracle)
2024-03-05 14:06 ` Andrew Lunn
2024-03-05 14:24 ` Russell King (Oracle)
2024-03-05 15:59 ` Andrew Lunn
2024-03-07 16:50 ` Eric Woudstra
2024-03-04 18:05 ` Simon Horman [this message]
2024-03-05 8:39 ` Eric Woudstra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20240304180523.GR403078@kernel.org \
--to=horms@kernel.org \
--cc=andrew@lunn.ch \
--cc=angelogioacchino.delregno@collabora.com \
--cc=conor+dt@kernel.org \
--cc=daniel@makrotopia.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=ericwouds@gmail.com \
--cc=frank-w@public-files.de \
--cc=hkallweit1@gmail.com \
--cc=hujy652@protonmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux@armlinux.org.uk \
--cc=lucien.jheng@airoha.com \
--cc=matthias.bgg@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.