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: <1387346873.13593.12.camel@joe-AO722>
Date:	Tue, 17 Dec 2013 22:07:53 -0800
From:	Joe Perches <joe@...ches.com>
To:	Florian Fainelli <f.fainelli@...il.com>
Cc:	davem@...emloft.net, netdev@...r.kernel.org
Subject: Re: [PATCH net-next 8/9] net: phy: fix checkpatch errors

On Tue, 2013-12-17 at 21:38 -0800, Florian Fainelli wrote:
> checkpatch spotted a few checkpatch errors such as whitespace damages
> and switch/case labels not being on the same column, fix them.

trivia:

> diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
[]
> @@ -714,16 +714,16 @@ void phy_start(struct phy_device *phydev)
>  	mutex_lock(&phydev->lock);
>  
>  	switch (phydev->state) {
> -		case PHY_STARTING:
> -			phydev->state = PHY_PENDING;
> -			break;
> -		case PHY_READY:
> -			phydev->state = PHY_UP;
> -			break;
> -		case PHY_HALTED:
> -			phydev->state = PHY_RESUMING;
> -		default:
> -			break;
> +	case PHY_STARTING:
> +		phydev->state = PHY_PENDING;
> +		break;
> +	case PHY_READY:
> +		phydev->state = PHY_UP;
> +		break;
> +	case PHY_HALTED:
> +		phydev->state = PHY_RESUMING;

This should have a break here and not
rely on the fallthrough.

> +	default:
> +		break;
>  	}
>  	mutex_unlock(&phydev->lock);
>  }


--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ