Received: by 10.213.65.68 with SMTP id h4csp15101imn; Mon, 19 Mar 2018 17:58:24 -0700 (PDT) X-Google-Smtp-Source: AG47ELsXsS17OH0zt9wtxmoek2GsgCyT1ZtOX4fDhoDWSJ2KmhoXcFHrzraLP514ggVq1Gpac76l X-Received: by 10.98.12.82 with SMTP id u79mr11964598pfi.192.1521507504006; Mon, 19 Mar 2018 17:58:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521507503; cv=none; d=google.com; s=arc-20160816; b=RiNtg2BBZcdT6eGd1XnfPs0F4mBndDrc/uYp5p6chN0+aEB5A1dHSSk3u68Dn9JOqn 7YGMjvFFtouHLke42qOaRLkggmcYfM6YTyQg22xJSVtXwqOJRAAroc8my4JYL3io7BTp xgEkwHM/i08os9dSpqAvSO9dntKJZ8jxMAuC+yNFNMCH6z5z936gYhyvxZL5F5DzBcyd 4dE+vq+W9aOyYb0vDxxOua8sOG6hQivUAzQwuf4tO9bZHJLN+3Cm/HkaIFyi1iD3Nc97 p+YDzLr1a+9lULZ1BSXfjke4w7C74bAS2JnquMc0wZ2swpUB2moAfF3rV4WCUJx00W4P slbg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :in-reply-to:message-id:date:subject:cc:to:from :arc-authentication-results; bh=oJ06lcK2LqtgETyDWEXEjCcNyfQHx3okydp3NtPSpe4=; b=d4OFrT5CCUFNawYjmCHmhPqWhRM5SuGVrNJb2e7C2jX1IFYtWDZKuQOzoEkXplBMrT DhX5YPZBmKJ4T/Zi57kgLWsxxaPKsDa19S7sivbrA57jaxgfqhpe48pyt8hdzaamfXlc x84FTRv98Ivi0XoATnff4CkKN0FxNqYjiLNvnSkm/p69h7y7RBZlTsbRpQEV5wCh1oEO dqB2IQxQtHOyNAra9XzhQCvB5J1FP7QtSQg2JYD+7zt/BWIa0noM2DuplvAAbXiEHJUi fdKaF1zv/WYnaSQr0UHBnp8+ktb3iY6AzbnrAYQsj0YNRi+Xa3Qatv49WBc3b7xMUMgx BKQg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z8-v6si440121plk.305.2018.03.19.17.58.10; Mon, 19 Mar 2018 17:58:23 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031692AbeCSS1k (ORCPT + 99 others); Mon, 19 Mar 2018 14:27:40 -0400 Received: from mail.linuxfoundation.org ([140.211.169.12]:51202 "EHLO mail.linuxfoundation.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S970020AbeCSS1Z (ORCPT ); Mon, 19 Mar 2018 14:27:25 -0400 Received: from localhost (LFbn-1-12247-202.w90-92.abo.wanadoo.fr [90.92.61.202]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id 4098411D5; Mon, 19 Mar 2018 18:27:24 +0000 (UTC) From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Salil Mehta , "David S. Miller" , Sasha Levin Subject: [PATCH 4.9 210/241] net: hns: Some checkpatch.pl script & warning fixes Date: Mon, 19 Mar 2018 19:07:55 +0100 Message-Id: <20180319180759.866979135@linuxfoundation.org> X-Mailer: git-send-email 2.16.2 In-Reply-To: <20180319180751.172155436@linuxfoundation.org> References: <20180319180751.172155436@linuxfoundation.org> User-Agent: quilt/0.65 X-stable: review MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 4.9-stable review patch. If anyone has any objections, please let me know. ------------------ From: Salil commit b4957ab0826f6f7efdfdc648521e1c4c3fc6ceda upstream. This patch fixes some checkpatch.pl script caught errors and warnings during the compilation time. [ backported to 4.9.y to fix build warnings caused by the backporting of 64ec10dc2ab8 ("net: hns: Correct HNS RSS key set function") by Sasha - gregkh] Signed-off-by: Salil Mehta Signed-off-by: David S. Miller Cc: Sasha Levin Signed-off-by: Greg Kroah-Hartman --- drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c | 11 +++++------ drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h | 2 +- drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c | 1 - drivers/net/ethernet/hisilicon/hns/hns_enet.c | 5 +++-- drivers/net/ethernet/hisilicon/hns/hns_ethtool.c | 1 - 5 files changed, 9 insertions(+), 11 deletions(-) --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_gmac.c @@ -86,12 +86,11 @@ static void hns_gmac_disable(void *mac_d dsaf_set_dev_bit(drv, GMAC_PORT_EN_REG, GMAC_PORT_RX_EN_B, 0); } -/** -*hns_gmac_get_en - get port enable -*@mac_drv:mac device -*@rx:rx enable -*@tx:tx enable -*/ +/* hns_gmac_get_en - get port enable + * @mac_drv:mac device + * @rx:rx enable + * @tx:tx enable + */ static void hns_gmac_get_en(void *mac_drv, u32 *rx, u32 *tx) { struct mac_driver *drv = (struct mac_driver *)mac_drv; --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.h @@ -70,7 +70,7 @@ enum dsaf_roce_qos_sl { }; #define DSAF_STATS_READ(p, offset) (*((u64 *)((u8 *)(p) + (offset)))) -#define HNS_DSAF_IS_DEBUG(dev) (dev->dsaf_mode == DSAF_MODE_DISABLE_SP) +#define HNS_DSAF_IS_DEBUG(dev) ((dev)->dsaf_mode == DSAF_MODE_DISABLE_SP) enum hal_dsaf_mode { HRD_DSAF_NO_DSAF_MODE = 0x0, --- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_rcb.c @@ -430,7 +430,6 @@ static void hns_rcb_ring_pair_get_cfg(st static int hns_rcb_get_port_in_comm( struct rcb_common_cb *rcb_common, int ring_idx) { - return ring_idx / (rcb_common->max_q_per_vf * rcb_common->max_vfn); } --- a/drivers/net/ethernet/hisilicon/hns/hns_enet.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_enet.c @@ -511,7 +511,8 @@ static void hns_nic_reuse_page(struct sk int last_offset; bool twobufs; - twobufs = ((PAGE_SIZE < 8192) && hnae_buf_size(ring) == HNS_BUFFER_SIZE_2048); + twobufs = ((PAGE_SIZE < 8192) && + hnae_buf_size(ring) == HNS_BUFFER_SIZE_2048); desc = &ring->desc[ring->next_to_clean]; size = le16_to_cpu(desc->rx.size); @@ -1700,7 +1701,7 @@ static void hns_nic_reset_subtask(struct static void hns_nic_service_event_complete(struct hns_nic_priv *priv) { WARN_ON(!test_bit(NIC_STATE_SERVICE_SCHED, &priv->state)); - + /* make sure to commit the things */ smp_mb__before_atomic(); clear_bit(NIC_STATE_SERVICE_SCHED, &priv->state); } --- a/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c +++ b/drivers/net/ethernet/hisilicon/hns/hns_ethtool.c @@ -1243,7 +1243,6 @@ hns_set_rss(struct net_device *netdev, c { struct hns_nic_priv *priv = netdev_priv(netdev); struct hnae_ae_ops *ops; - int ret; if (AE_IS_VER1(priv->enet_ver)) { netdev_err(netdev,