From patchwork Thu Apr 30 23:09:17 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Iyappan Subramanian X-Patchwork-Id: 6307601 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 0A97B9F32B for ; Thu, 30 Apr 2015 23:07:19 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3654C201CD for ; Thu, 30 Apr 2015 23:07:18 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 48D5520160 for ; Thu, 30 Apr 2015 23:07:17 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YnxUo-0003lO-8X; Thu, 30 Apr 2015 23:03:54 +0000 Received: from exprod5og113.obsmtp.com ([64.18.0.26] helo=mail-pd0-f177.google.com) by bombadil.infradead.org with smtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1YnxUh-0003c3-EN for linux-arm-kernel@lists.infradead.org; Thu, 30 Apr 2015 23:03:48 +0000 Received: from mail-pd0-f177.google.com ([209.85.192.177]) (using TLSv1) by exprod5ob113.postini.com ([64.18.4.12]) with SMTP ID DSNKVUK0vDr7r3YvLKV8UytGk0rpUMRhc+z9@postini.com; Thu, 30 Apr 2015 16:03:47 PDT Received: by pdbnk13 with SMTP id nk13so74822373pdb.0 for ; Thu, 30 Apr 2015 16:03:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=cq7Nf/JZDalMHp1nVxTgw7COVZfYr0f7ouCF9iT87lU=; b=bWOMK9s7LOYo2F21IwaIuQos2FI+KOeosrqFZ+D4IZZFFgnZQBYXLR5w/Gi6F9aDLi ZF/Uk10CJSjtRIrQSne3BLim39cmUmUxcer5WarNXjN4jI3okVfzo7yoWW4ztD6sSLRR WFffrWHY+xeorBLOp7ezESEF5KlGBdYeUHnx+kB0UQkwRz2jfZRk7TKevEH0MLSumWw9 jl8ouKgx15yYdzKYUlKnks86TB4ZDHtB/zSgiJCOTeqaCNKYzsR1W0RmXWU6Q+RdEA/J mt4VhrAxpnhAr8cqpdRMIMbW5dob1DyjhRBQCqO35ipHDMA7gxG8d92gYbPm/iH3iBE4 56JA== X-Gm-Message-State: ALoCoQkoBWrd236LU/tr15Sw3rMNcwL3VEw7mO0aK9HeiqPUPOB3YjmVleWuo1+lOK39hlrSG9wgFSdPqOMCtu4jhWFiiqyc/VEsmhieUj4miQue43ZCX0LKVAigEP/Mee7kxpQjA369G1p3nRhef4UF54mp3DaXVXwY7oZPxfz7JJHJXI3qv40= X-Received: by 10.70.35.36 with SMTP id e4mr12684177pdj.56.1430435004204; Thu, 30 Apr 2015 16:03:24 -0700 (PDT) X-Received: by 10.70.35.36 with SMTP id e4mr12684167pdj.56.1430435004114; Thu, 30 Apr 2015 16:03:24 -0700 (PDT) Received: from svdclab-13-11.amcc.com (67-207-112-226.static.wiline.com. [67.207.112.226]) by mx.google.com with ESMTPSA id qz3sm3170187pab.19.2015.04.30.16.03.22 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 30 Apr 2015 16:03:23 -0700 (PDT) From: Iyappan Subramanian To: davem@davemloft.net, netdev@vger.kernel.org Subject: [PATCH net-next 1/1] drivers: net: xgene: fix kbuild warnings Date: Thu, 30 Apr 2015 16:09:17 -0700 Message-Id: <1430435357-20679-1-git-send-email-isubramanian@apm.com> X-Mailer: git-send-email 1.9.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150430_160347_546194_5EE67D6E X-CRM114-Status: UNSURE ( 9.59 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -2.3 (--) Cc: patches@apm.com, linux-arm-kernel@lists.infradead.org, Iyappan Subramanian , fengguang.wu@intel.com, kchudgar@apm.com, dan.carpenter@oracle.com X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fixed the following kbuild warnings: 1. unused variable 'of_id' 2. buffer overflow 'ring_cfg' 5 <= 5 Signed-off-by: Iyappan Subramanian --- drivers/net/ethernet/apm/xgene/xgene_enet_main.c | 2 ++ drivers/net/ethernet/apm/xgene/xgene_enet_main.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c index 735d7c6..1bb3175 100644 --- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.c +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.c @@ -1173,7 +1173,9 @@ static int xgene_enet_probe(struct platform_device *pdev) struct xgene_enet_pdata *pdata; struct device *dev = &pdev->dev; struct xgene_mac_ops *mac_ops; +#ifdef CONFIG_OF const struct of_device_id *of_id; +#endif int ret; ndev = alloc_etherdev(sizeof(struct xgene_enet_pdata)); diff --git a/drivers/net/ethernet/apm/xgene/xgene_enet_main.h b/drivers/net/ethernet/apm/xgene/xgene_enet_main.h index 19a0427..1c85fc8 100644 --- a/drivers/net/ethernet/apm/xgene/xgene_enet_main.h +++ b/drivers/net/ethernet/apm/xgene/xgene_enet_main.h @@ -83,7 +83,7 @@ struct xgene_enet_desc_ring { u16 irq; char irq_name[IRQ_ID_SIZE]; u32 size; - u32 state[NUM_RING_CONFIG]; + u32 state[X2_NUM_RING_CONFIG]; void __iomem *cmd_base; void __iomem *cmd; dma_addr_t dma;