Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1259234 > unrolled thread

[PATCH] net: rds: chnaging the return type from int to void

Started bySaurabh Sengar <saurabh.truth@gmail.com>
First post2015-10-30 07:30 +0100
Last post2015-10-30 15:10 +0100
Articles 2 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCH] net: rds: chnaging the return type from int to void Saurabh Sengar <saurabh.truth@gmail.com> - 2015-10-30 07:30 +0100
    Re: [PATCH] net: rds: chnaging the return type from int to void Sergei Shtylyov <sergei.shtylyov@cogentembedded.com> - 2015-10-30 15:10 +0100

#1259234 — [PATCH] net: rds: chnaging the return type from int to void

FromSaurabh Sengar <saurabh.truth@gmail.com>
Date2015-10-30 07:30 +0100
Subject[PATCH] net: rds: chnaging the return type from int to void
Message-ID<qpbmh-2ij-7@gated-at.bofh.it>
as return type of function rds_iw_flush_mr_pool no where checked, chnaging its return type from int to void.
also removing the unused variable rc as there is nothing to return.

Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>
---
 net/rds/iw_rdma.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/net/rds/iw_rdma.c b/net/rds/iw_rdma.c
index 6a8fbd6..d3d4454f 100644
--- a/net/rds/iw_rdma.c
+++ b/net/rds/iw_rdma.c
@@ -75,7 +75,7 @@ struct rds_iw_mr_pool {
 	int			max_pages;
 };
 
-static int rds_iw_flush_mr_pool(struct rds_iw_mr_pool *pool, int free_all);
+static void rds_iw_flush_mr_pool(struct rds_iw_mr_pool *pool, int free_all);
 static void rds_iw_mr_pool_flush_worker(struct work_struct *work);
 static int rds_iw_init_fastreg(struct rds_iw_mr_pool *pool, struct rds_iw_mr *ibmr);
 static int rds_iw_map_fastreg(struct rds_iw_mr_pool *pool,
@@ -479,14 +479,13 @@ void rds_iw_sync_mr(void *trans_private, int direction)
  * If the number of MRs allocated exceeds the limit, we also try
  * to free as many MRs as needed to get back to this limit.
  */
-static int rds_iw_flush_mr_pool(struct rds_iw_mr_pool *pool, int free_all)
+static void rds_iw_flush_mr_pool(struct rds_iw_mr_pool *pool, int free_all)
 {
 	struct rds_iw_mr *ibmr, *next;
 	LIST_HEAD(unmap_list);
 	LIST_HEAD(kill_list);
 	unsigned long flags;
 	unsigned int nfreed = 0, ncleaned = 0, unpinned = 0;
-	int ret = 0;
 
 	rds_iw_stats_inc(s_iw_rdma_mr_pool_flush);
 
@@ -538,7 +537,6 @@ static int rds_iw_flush_mr_pool(struct rds_iw_mr_pool *pool, int free_all)
 	atomic_sub(nfreed, &pool->item_count);
 
 	mutex_unlock(&pool->flush_lock);
-	return ret;
 }
 
 static void rds_iw_mr_pool_flush_worker(struct work_struct *work)
-- 
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [next] | [standalone]


#1259513

FromSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Date2015-10-30 15:10 +0100
Message-ID<qpixr-6LW-13@gated-at.bofh.it>
In reply to#1259234
Hello.

On 10/30/2015 9:19 AM, Saurabh Sengar wrote:

> as return type

    Result.

> of function rds_iw_flush_mr_pool no where checked,

    Nowhere.

> chnaging its return type from int to void.

    s/chnaging/changing/ both here and in the subject.

> also removing the unused variable rc as there is nothing to return.
>
> Signed-off-by: Saurabh Sengar <saurabh.truth@gmail.com>

[...]

MBR, Sergei

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web