From patchwork Wed Jul 4 21:52:48 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kamal Heib X-Patchwork-Id: 10507703 X-Patchwork-Delegate: jgg@ziepe.ca Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id D5417603D7 for ; Wed, 4 Jul 2018 21:53:12 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CCD0A28D83 for ; Wed, 4 Jul 2018 21:53:12 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C093028DAA; Wed, 4 Jul 2018 21:53:12 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.8 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4472E28D83 for ; Wed, 4 Jul 2018 21:53:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752942AbeGDVxI (ORCPT ); Wed, 4 Jul 2018 17:53:08 -0400 Received: from mail-wr1-f67.google.com ([209.85.221.67]:34997 "EHLO mail-wr1-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752888AbeGDVxH (ORCPT ); Wed, 4 Jul 2018 17:53:07 -0400 Received: by mail-wr1-f67.google.com with SMTP id h40-v6so47506wrh.2 for ; Wed, 04 Jul 2018 14:53:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=Jb60KJJbvwy75wQOFHzipTNGBaxRuxfjxnQzVw+gsRA=; b=a00NOGf+MobXFHWtaRMVYL40SrJvo131xxOX4SfSFUi0FefS6FjRAbr2/FswTG7TxZ 1hL7S2rr6TlrSfywVH6UJGoJtrxmxFXNzdmIfjCkDEcTnTa6yM6KWateWWySfmPWvw2N ltXsFlUjCZhpAyzc2CFreY8jeI3dv/ZP63r19xPDz1/4oInW11xi+Q5uUDXMELhuRiiu 1ZkZg9BCk49dMUTCFVcxvFNkxDQWgFd6qGxLJo61Eh4thyRpZp/Whd3ux3MVxlT7tsRy rIudxdGm8vV8vRhvg3m3ezbVuuE52zZ0Egd8oHnxetquVTpKdHik75jmbx4mvNadP/76 1WaQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=Jb60KJJbvwy75wQOFHzipTNGBaxRuxfjxnQzVw+gsRA=; b=QHqNFJ/3UH6+nT5boUea+by8SE0R2WDgzgkuV/NmOSiX8i3GVbckYNFdQgSaC9+/rr PC6KOrKWaxtFP7RD2Fi64Wzq6yWAIN1dMum5fRCaGahupcdJREA2Cl26kFiqLRVA3azY 7LcKo5NmwSJmsrnTH3kB+CXAvBMGE2LB08dYJDVxzkjB7rpoN/eU6u0uf3hZGSqKWZAO v9KXmBQ20q1bX34gVKS99+X4Pce5eWGAAwcw0i9XqczZtubONNXKRk/P8J8n8ymAbw+w gRezeKrHmlakcNmP9dy6GC2RRiJ922aHoylbq+Fa5JYY3x2qbB+m6PtdDlyUfQgaCz1Y Ls+A== X-Gm-Message-State: APt69E3demJyI4waH+YS3gI1wDu9aCAE/PotT3vZi2lXoR/YhEJgbq+c lMkiN7jzkp1Idx59p5gOVWo= X-Google-Smtp-Source: AAOMgpc4m/V0vJwPQQmcGo6ADbkZOc77dfYdFKYLH/cW+Id9HFgixbL7DUX/2RwA+0ZqnLeZrV5pUg== X-Received: by 2002:adf:f485:: with SMTP id l5-v6mr2799755wro.259.1530741186176; Wed, 04 Jul 2018 14:53:06 -0700 (PDT) Received: from localhost.localdomain (bzq-79-179-11-238.red.bezeqint.net. [79.179.11.238]) by smtp.gmail.com with ESMTPSA id d102-v6sm9005353wma.10.2018.07.04.14.53.05 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Wed, 04 Jul 2018 14:53:05 -0700 (PDT) From: Kamal Heib To: Doug Ledford , Jason Gunthorpe , Leon Romanovsky Cc: linux-rdma@vger.kernel.org, Kamal Heib Subject: [PATCH rdma-next V2 2/5] RDMA/ipoib: Prefer unsigned int to bare use of unsigned Date: Thu, 5 Jul 2018 00:52:48 +0300 Message-Id: <20180704215251.10698-3-kamalheib1@gmail.com> X-Mailer: git-send-email 2.14.4 In-Reply-To: <20180704215251.10698-1-kamalheib1@gmail.com> References: <20180704215251.10698-1-kamalheib1@gmail.com> Sender: linux-rdma-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-rdma@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This commit replaces all the unsigned definitions in favour of 'unsigned int' which is preferred. Signed-off-by: Kamal Heib Reviewed-by: Leon Romanovsky --- drivers/infiniband/ulp/ipoib/ipoib.h | 14 +++++++------- drivers/infiniband/ulp/ipoib/ipoib_cm.c | 10 +++++----- drivers/infiniband/ulp/ipoib/ipoib_ib.c | 2 +- drivers/infiniband/ulp/ipoib/ipoib_main.c | 4 +++- 4 files changed, 16 insertions(+), 14 deletions(-) diff --git a/drivers/infiniband/ulp/ipoib/ipoib.h b/drivers/infiniband/ulp/ipoib/ipoib.h index a50b062ed13e..3dd130afb571 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib.h +++ b/drivers/infiniband/ulp/ipoib/ipoib.h @@ -252,11 +252,11 @@ struct ipoib_cm_tx { struct ipoib_neigh *neigh; struct ipoib_path *path; struct ipoib_tx_buf *tx_ring; - unsigned tx_head; - unsigned tx_tail; + unsigned int tx_head; + unsigned int tx_tail; unsigned long flags; u32 mtu; - unsigned max_send_sge; + unsigned int max_send_sge; }; struct ipoib_cm_rx_buf { @@ -373,8 +373,8 @@ struct ipoib_dev_priv { struct ipoib_rx_buf *rx_ring; struct ipoib_tx_buf *tx_ring; - unsigned tx_head; - unsigned tx_tail; + unsigned int tx_head; + unsigned int tx_tail; struct ib_sge tx_sge[MAX_SKB_FRAGS + 1]; struct ib_ud_wr tx_wr; struct ib_wc send_wc[MAX_SEND_CQE]; @@ -404,7 +404,7 @@ struct ipoib_dev_priv { #endif u64 hca_caps; struct ipoib_ethtool_st ethtool; - unsigned max_send_sge; + unsigned int max_send_sge; bool sm_fullmember_sendonly_support; const struct net_device_ops *rn_ops; }; @@ -414,7 +414,7 @@ struct ipoib_ah { struct ib_ah *ah; struct list_head list; struct kref ref; - unsigned last_send; + unsigned int last_send; int valid; }; diff --git a/drivers/infiniband/ulp/ipoib/ipoib_cm.c b/drivers/infiniband/ulp/ipoib/ipoib_cm.c index 9c7226b45766..7eb38775f948 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_cm.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_cm.c @@ -275,7 +275,7 @@ static struct ib_qp *ipoib_cm_create_rx_qp(struct net_device *dev, static int ipoib_cm_modify_rx_qp(struct net_device *dev, struct ib_cm_id *cm_id, struct ib_qp *qp, - unsigned psn) + unsigned int psn) { struct ipoib_dev_priv *priv = ipoib_priv(dev); struct ib_qp_attr qp_attr; @@ -422,7 +422,7 @@ static int ipoib_cm_nonsrq_init_rx(struct net_device *dev, struct ib_cm_id *cm_i static int ipoib_cm_send_rep(struct net_device *dev, struct ib_cm_id *cm_id, struct ib_qp *qp, struct ib_cm_req_event_param *req, - unsigned psn) + unsigned int psn) { struct ipoib_dev_priv *priv = ipoib_priv(dev); struct ipoib_cm_data data = {}; @@ -446,7 +446,7 @@ static int ipoib_cm_req_handler(struct ib_cm_id *cm_id, struct ib_cm_event *even struct net_device *dev = cm_id->context; struct ipoib_dev_priv *priv = ipoib_priv(dev); struct ipoib_cm_rx *p; - unsigned psn; + unsigned int psn; int ret; ipoib_dbg(priv, "REQ arrived\n"); @@ -712,7 +712,7 @@ void ipoib_cm_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_cm_ struct ipoib_dev_priv *priv = ipoib_priv(dev); struct ipoib_tx_buf *tx_req; int rc; - unsigned usable_sge = tx->max_send_sge - !!skb_headlen(skb); + unsigned int usable_sge = tx->max_send_sge - !!skb_headlen(skb); if (unlikely(skb->len > tx->mtu)) { ipoib_warn(priv, "packet len %d (> %d) too long to send, dropping\n", @@ -1428,7 +1428,7 @@ static void ipoib_cm_skb_reap(struct work_struct *work) struct net_device *dev = priv->dev; struct sk_buff *skb; unsigned long flags; - unsigned mtu = priv->mcast_mtu; + unsigned int mtu = priv->mcast_mtu; netif_tx_lock_bh(dev); spin_lock_irqsave(&priv->lock, flags); diff --git a/drivers/infiniband/ulp/ipoib/ipoib_ib.c b/drivers/infiniband/ulp/ipoib/ipoib_ib.c index fb3728bf7e40..f782f4b02569 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_ib.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_ib.c @@ -569,7 +569,7 @@ int ipoib_send(struct net_device *dev, struct sk_buff *skb, struct ipoib_tx_buf *tx_req; int hlen, rc; void *phead; - unsigned usable_sge = priv->max_send_sge - !!skb_headlen(skb); + unsigned int usable_sge = priv->max_send_sge - !!skb_headlen(skb); if (skb_is_gso(skb)) { hlen = skb_transport_offset(skb) + tcp_hdrlen(skb); diff --git a/drivers/infiniband/ulp/ipoib/ipoib_main.c b/drivers/infiniband/ulp/ipoib/ipoib_main.c index 983e52b871f3..15344f91d96b 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_main.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_main.c @@ -1201,7 +1201,9 @@ static void ipoib_timeout(struct net_device *dev) static int ipoib_hard_header(struct sk_buff *skb, struct net_device *dev, unsigned short type, - const void *daddr, const void *saddr, unsigned len) + const void *daddr, + const void *saddr, + unsigned int len) { struct ipoib_header *header;