lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <e817c154-efbb-466b-82ec-46eb18711daf@lunn.ch>
Date: Mon, 30 Sep 2024 14:05:28 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Daniel Golle <daniel@...rotopia.org>
Cc: Xu Liang <lxu@...linear.com>, Heiner Kallweit <hkallweit1@...il.com>,
	Russell King <linux@...linux.org.uk>,
	"David S. Miller" <davem@...emloft.net>,
	Eric Dumazet <edumazet@...gle.com>,
	Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
	David Bauer <mail@...id-bauer.net>,
	Christian Marangi <ansuelsmth@...il.com>,
	John Crispin <john@...ozen.org>, netdev@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH RFC net-next] net: phy: mxl-gpy: add basic LED support

> +static int gpy_led_hw_control_set(struct phy_device *phydev, u8 index,
> +				  unsigned long rules)
> +{
> +	int ret;
> +	u16 val = 0;

These two should be the other way around.

> +static int gpy_led_polarity_set(struct phy_device *phydev, int index,
> +				unsigned long modes)
> +{
> +	bool active_low = false;
> +	u32 mode;
> +
> +	if (index >= GPY_MAX_LEDS)
> +		return -EINVAL;
> +
> +	for_each_set_bit(mode, &modes, __PHY_LED_MODES_NUM) {
> +		switch (mode) {
> +		case PHY_LED_ACTIVE_LOW:
> +			active_low = true;
> +			break;
> +		default:
> +		return -EINVAL;
> +		}
> +	}

The return should be indented one more tab.

    Andrew

---
pw-bot: cr

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ