From patchwork Sun Sep 14 05:02:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heinrich Schuchardt X-Patchwork-Id: 389006 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 0712F1400D5 for ; Sun, 14 Sep 2014 15:03:34 +1000 (EST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752360AbaINFCz (ORCPT ); Sun, 14 Sep 2014 01:02:55 -0400 Received: from mout.gmx.net ([212.227.15.19]:61345 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752283AbaINFCy (ORCPT ); Sun, 14 Sep 2014 01:02:54 -0400 Received: from ubnt.fritz.box ([88.152.150.53]) by mail.gmx.com (mrgmx002) with ESMTPSA (Nemesis) id 0MV5tl-1Xpuv61pVt-00YQq1; Sun, 14 Sep 2014 07:02:41 +0200 From: Heinrich Schuchardt To: David Daney Cc: "David S. Miller" , Luka Perkov , Willem de Bruijn , Russell King , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Heinrich Schuchardt , Joe Perches Subject: [PATCH 1/1 v2] netdev: octeon_mgmt: ISO C90 forbids mixed declarations and code Date: Sun, 14 Sep 2014 07:02:14 +0200 Message-Id: <1410670935-904-1-git-send-email-xypron.glpk@gmx.de> X-Mailer: git-send-email 2.1.0 X-Provags-ID: V03:K0:8enetx2LAq1/sM9bilqvAGxe5Jae6UJSvdMjp225uQLeX449rac TQ9i7SysLu4wLzRNSxCQHB7IyQ5AOCHDtp4AiU50pcN5TH2kzDcYr75G/6h30kbG3tYiCYC qU9r1+t8xXUsgLFhOvUJruOKj2hDPfoejOBm+df6w4OjqzUcvyI3YBzutQFTp2Z/Iu+/jDL QYntRV0vgZxzQ4ZcDRIWw== X-UI-Out-Filterresults: notjunk:1; Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Revised patch takes into account comments by Joe and David. Compiling with OCTEON_MGMT_ETHERNET gives a warning drivers/net/ethernet/octeon/octeon_mgmt.c:295:4: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] The patch cleans up the code. Signed-off-by: Heinrich Schuchardt CC: Joe Perches CC: David S. Miller --- drivers/net/ethernet/octeon/octeon_mgmt.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/octeon/octeon_mgmt.c b/drivers/net/ethernet/octeon/octeon_mgmt.c index 979c698..6cc68b1 100644 --- a/drivers/net/ethernet/octeon/octeon_mgmt.c +++ b/drivers/net/ethernet/octeon/octeon_mgmt.c @@ -290,9 +290,10 @@ static void octeon_mgmt_clean_tx_buffers(struct octeon_mgmt *p) /* Read the hardware TX timestamp if one was recorded */ if (unlikely(re.s.tstamp)) { struct skb_shared_hwtstamps ts; + u64 ns; memset(&ts, 0, sizeof(ts)); /* Read the timestamp */ - u64 ns = cvmx_read_csr(CVMX_MIXX_TSTAMP(p->port)); + ns = cvmx_read_csr(CVMX_MIXX_TSTAMP(p->port)); /* Remove the timestamp from the FIFO */ cvmx_write_csr(CVMX_MIXX_TSCTL(p->port), 0); /* Tell the kernel about the timestamp */