Devicetree
 help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: Linus Walleij <linusw@kernel.org>
Cc: Woojung Huh <woojung.huh@microchip.com>,
	UNGLinuxDriver@microchip.com, Andrew Lunn <andrew@lunn.ch>,
	Vladimir Oltean <olteanv@gmail.com>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Marek Vasut <marex@denx.de>,
	Simon Horman <horms@kernel.org>,
	Russell King <linux@armlinux.org.uk>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH net-next v7 4/5] net: dsa: microchip: Support Microchip KSZ8995XA / KS8995XA
Date: Mon, 20 Jul 2026 17:22:23 -0700	[thread overview]
Message-ID: <20260720172223.7492e28a@kernel.org> (raw)
In-Reply-To: <20260704-ks8995-to-ksz8-v7-4-2af0eaa545a8@kernel.org>

On Sat, 04 Jul 2026 21:39:36 +0200 Linus Walleij wrote:
> This adds support for the Microchip KSZ8995XA also known as the
> Micrel KS8995XA switch to the KSZ driver.
> 
> Notice: there are also KSZ8995E and KSZ8995MA. These are BOTH
> different from the KSZ8995XA.
> 
> The helper macros are named ksz_is_ksz8995xa() to make it
> possible to add E and MA support in the future.

Clang says:

../drivers/net/dsa/microchip/ksz8.c:263:13: warning: variable 'reg_4q' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
  263 |         } else if (ksz_is_ksz8995xa(dev)) {
      |                    ^~~~~~~~~~~~~~~~~~~~~
../drivers/net/dsa/microchip/ksz8.c:288:29: note: uninitialized use occurs here
  288 |         ret = ksz_prmw8(dev, port, reg_4q, mask_4q, data_4q);
      |                                    ^~~~~~
../drivers/net/dsa/microchip/ksz8.c:263:9: note: remove the 'if' if its condition is always false
  263 |         } else if (ksz_is_ksz8995xa(dev)) {
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  264 |                 /* This switch has no 4way split support */
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  265 |                 mask_2q = KSZ8795_PORT_2QUEUE_SPLIT_EN;
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  266 |                 reg_2q = REG_PORT_CTRL_0;
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~
  267 |         } else {
      |         ~~~~~~
../drivers/net/dsa/microchip/ksz8.c:237:11: note: initialize the variable 'reg_4q' to silence this warning
  237 |         u8 reg_4q, reg_2q;
      |                  ^
      |                   = '\0'
../drivers/net/dsa/microchip/ksz8.c:263:13: warning: variable 'mask_4q' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
  263 |         } else if (ksz_is_ksz8995xa(dev)) {
      |                    ^~~~~~~~~~~~~~~~~~~~~
../drivers/net/dsa/microchip/ksz8.c:288:37: note: uninitialized use occurs here
  288 |         ret = ksz_prmw8(dev, port, reg_4q, mask_4q, data_4q);
      |                                            ^~~~~~~
../drivers/net/dsa/microchip/ksz8.c:263:9: note: remove the 'if' if its condition is always false
  263 |         } else if (ksz_is_ksz8995xa(dev)) {
      |                ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
  264 |                 /* This switch has no 4way split support */
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  265 |                 mask_2q = KSZ8795_PORT_2QUEUE_SPLIT_EN;
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  266 |                 reg_2q = REG_PORT_CTRL_0;
      |                 ~~~~~~~~~~~~~~~~~~~~~~~~~
  267 |         } else {
      |         ~~~~~~
../drivers/net/dsa/microchip/ksz8.c:236:12: note: initialize the variable 'mask_4q' to silence this warning
  236 |         u8 mask_4q, mask_2q;
      |                   ^
      |                    = '\0'

  parent reply	other threads:[~2026-07-21  0:22 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-04 19:39 [PATCH net-next v7 0/5] net: dsa: microchip: Add support for KSZ8995XA/KS8995XA Linus Walleij
2026-07-04 19:39 ` [PATCH net-next v7 1/5] net: dsa: microchip: Add fallback Micrel compatibles Linus Walleij
2026-07-05 19:40   ` sashiko-bot
2026-07-04 19:39 ` [PATCH net-next v7 2/5] dt-bindings: net: dsa: microchip: Add KSZ8995XA Linus Walleij
2026-07-04 19:39 ` [PATCH net-next v7 3/5] net: dsa: tag_ks8995: Add the KS8995 tag handling Linus Walleij
2026-07-05 19:40   ` sashiko-bot
2026-07-04 19:39 ` [PATCH net-next v7 4/5] net: dsa: microchip: Support Microchip KSZ8995XA / KS8995XA Linus Walleij
2026-07-05 19:40   ` sashiko-bot
2026-07-21  0:22   ` Jakub Kicinski [this message]
2026-07-04 19:39 ` [PATCH net-next v7 5/5] net: dsa: ks8995: Delete surplus driver Linus Walleij
2026-07-05 19:40   ` sashiko-bot

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=20260720172223.7492e28a@kernel.org \
    --to=kuba@kernel.org \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=horms@kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linusw@kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=marex@denx.de \
    --cc=netdev@vger.kernel.org \
    --cc=olteanv@gmail.com \
    --cc=pabeni@redhat.com \
    --cc=robh@kernel.org \
    --cc=woojung.huh@microchip.com \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox