Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1414572

Re: [PATCH 1/1] net: ethernet: Add TSE PCS support to dwmac-socfpga

From David Miller <davem@davemloft.net>
Newsgroups linux.kernel
Subject Re: [PATCH 1/1] net: ethernet: Add TSE PCS support to dwmac-socfpga
Date 2016-06-06 05:20 +0200
Message-ID <rGTf3-7rN-3@gated-at.bofh.it> (permalink)
References <rGTf3-7rN-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


From: <thloh@altera.com>
Date: Fri, 3 Jun 2016 02:07:15 -0700

> From: Tien Hock Loh <thloh@altera.com>
> 
> This adds support for TSE PCS that uses SGMII adapter when the phy-mode of
> the dwmac is set to sgmii
> 
> Signed-off-by: Tien Hock Loh <thloh@altera.com>

Please at least make an effort to use consistent coding style.

You rework this function to do this:

> -	if (!splitter_base)
> -		return;
> +	if (splitter_base) {

And then you add something like this:

> +	if ((tse_pcs_base) && (sgmii_adapter_base)) {
> +		tse_pcs_fix_mac_speed(&dwmac->pcs, phy_dev, speed);
> +	}

Excessive parenthesis in the if() condition, and single statement
basic blocks do not get curly braces.

Back to linux.kernel | Previous | Next | Find similar | Unroll thread


Thread

Re: [PATCH 1/1] net: ethernet: Add TSE PCS support to dwmac-socfpga David Miller <davem@davemloft.net> - 2016-06-06 05:20 +0200

csiph-web