From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752243AbcF3MfH (ORCPT ); Thu, 30 Jun 2016 08:35:07 -0400 Received: from shards.monkeyblade.net ([149.20.54.216]:55377 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751885AbcF3MfE (ORCPT ); Thu, 30 Jun 2016 08:35:04 -0400 Date: Thu, 30 Jun 2016 08:34:33 -0400 (EDT) Message-Id: <20160630.083433.705935493078392286.davem@davemloft.net> To: thloh@altera.com Cc: robh+dt@kernel.org, mark.rutland@arm.com, peppe.cavallaro@st.com, alexandre.torgue@st.com, preid@electromag.com.au, dinguyen@opensource.altera.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, thloh85@gmail.com, cnphoon@altera.com Subject: Re: [PATCH V6 1/1] net: ethernet: Add TSE PCS support to dwmac-socfpga From: David Miller In-Reply-To: <1467191413-16715-1-git-send-email-thloh@altera.com> References: <1467191413-16715-1-git-send-email-thloh@altera.com> X-Mailer: Mew version 6.7 on Emacs 24.5 / Mule 6.0 (HANACHIRUSATO) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.5.12 (shards.monkeyblade.net [149.20.54.216]); Thu, 30 Jun 2016 05:35:03 -0700 (PDT) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Date: Wed, 29 Jun 2016 02:10:13 -0700 > +static void auto_nego_timer_callback(unsigned long data) > +{ > + u16 val = 0; > + u16 speed = 0; > + u16 duplex = 0; > + > + struct tse_pcs *pcs = (struct tse_pcs *)data; > + void __iomem *tse_pcs_base = pcs->tse_pcs_base; > + void __iomem *sgmii_adapter_base = pcs->sgmii_adapter_base; Please do not break up a set of local variable declarations with an empty line. > + if ((tse_pcs_base) && (sgmii_adapter_base)) Unnecessary parenthesis. > + if ((tse_pcs_base) && (sgmii_adapter_base)) Likewise. > @@ -88,9 +104,13 @@ static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device * > struct device_node *np = dev->of_node; > struct regmap *sys_mgr_base_addr; > u32 reg_offset, reg_shift; > - int ret; > - struct device_node *np_splitter; > + int ret, index; > + struct device_node *np_splitter = NULL; > + struct device_node *np_sgmii_adapter = NULL; > + > struct resource res_splitter; > + struct resource res_tse_pcs; > + struct resource res_sgmii_adapter; Again, do not break up local variable declarations with an empty line like this.