All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] sunrpc: the cache_detail in cache_is_valid is unused any more
@ 2013-03-28 13:53 chaoting fan
  2013-03-28 13:58 ` Myklebust, Trond
  0 siblings, 1 reply; 5+ messages in thread
From: chaoting fan @ 2013-03-28 13:53 UTC (permalink / raw)
  To: Trond.Myklebust; +Cc: linux-nfs

the cache_detail(*detail) in function cache_is_valid is unused any more,
mark it to be unused to avoid make warning.

Signed-off-by: fanchaoting <fanchaoting@cn.fujitsu.com>

---
 net/sunrpc/cache.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index 9afa439..efea2d9 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -201,7 +201,7 @@ static int cache_make_upcall(struct cache_detail
*cd, struct cache_head *h)
 	return cd->cache_upcall(cd, h);
 }

-static inline int cache_is_valid(struct cache_detail *detail, struct
cache_head *h)
+static inline int cache_is_valid(struct cache_detail *unused, struct
cache_head *h)
 {
 	if (!test_bit(CACHE_VALID, &h->flags))
 		return -EAGAIN;
-- 1.7.10.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] sunrpc: the cache_detail in cache_is_valid is unused any more
  2013-03-28 13:53 [PATCH] sunrpc: the cache_detail in cache_is_valid is unused any more chaoting fan
@ 2013-03-28 13:58 ` Myklebust, Trond
  2013-03-28 14:07   ` chaoting fan
  2013-03-28 14:19   ` chaoting fan
  0 siblings, 2 replies; 5+ messages in thread
From: Myklebust, Trond @ 2013-03-28 13:58 UTC (permalink / raw)
  To: chaoting fan; +Cc: linux-nfs@vger.kernel.org

On Thu, 2013-03-28 at 21:53 +0800, chaoting fan wrote:
> the cache_detail(*detail) in function cache_is_valid is unused any more,
> mark it to be unused to avoid make warning.
> 
> Signed-off-by: fanchaoting <fanchaoting@cn.fujitsu.com>
> 
> ---
>  net/sunrpc/cache.c |    2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
> index 9afa439..efea2d9 100644
> --- a/net/sunrpc/cache.c
> +++ b/net/sunrpc/cache.c
> @@ -201,7 +201,7 @@ static int cache_make_upcall(struct cache_detail
> *cd, struct cache_head *h)
>  	return cd->cache_upcall(cd, h);
>  }
> 
> -static inline int cache_is_valid(struct cache_detail *detail, struct
> cache_head *h)
> +static inline int cache_is_valid(struct cache_detail *unused, struct
> cache_head *h)
>  {
>  	if (!test_bit(CACHE_VALID, &h->flags))
>  		return -EAGAIN;
> -- 1.7.10.4

Why not just remove it altogether? There are only 3 callers.

-- 
Trond Myklebust
Linux NFS client maintainer

NetApp
Trond.Myklebust@netapp.com
www.netapp.com

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] sunrpc: the cache_detail in cache_is_valid is unused any more
  2013-03-28 13:58 ` Myklebust, Trond
@ 2013-03-28 14:07   ` chaoting fan
  2013-03-28 14:19   ` chaoting fan
  1 sibling, 0 replies; 5+ messages in thread
From: chaoting fan @ 2013-03-28 14:07 UTC (permalink / raw)
  To: Myklebust, Trond; +Cc: linux-nfs

the cache_detail(*detail) in function cache_is_valid is unused any more.

Signed-off-by: fanchaoting <fanchaoting@cn.fujitsu.com>

---
 net/sunrpc/cache.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index 9afa439..adbbc19 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -201,7 +201,7 @@ static int cache_make_upcall(struct cache_detail
*cd, struct cache_head *h)
 	return cd->cache_upcall(cd, h);
 }

-static inline int cache_is_valid(struct cache_detail *detail, struct
cache_head *h)
+static inline int cache_is_valid(struct cache_head *h)
 {
 	if (!test_bit(CACHE_VALID, &h->flags))
 		return -EAGAIN;
@@ -227,7 +227,7 @@ static int try_to_negate_entry(struct cache_detail
*detail, struct cache_head *h
 	int rv;

 	write_lock(&detail->hash_lock);
-	rv = cache_is_valid(detail, h);
+	rv = cache_is_valid(h);
 	if (rv != -EAGAIN) {
 		write_unlock(&detail->hash_lock);
 		return rv;
@@ -260,7 +260,7 @@ int cache_check(struct cache_detail *detail,
 	long refresh_age, age;

 	/* First decide return status as best we can */
-	rv = cache_is_valid(detail, h);
+	rv = cache_is_valid(h);

 	/* now see if we want to start an upcall */
 	refresh_age = (h->expiry_time - h->last_refresh);
@@ -293,7 +293,7 @@ int cache_check(struct cache_detail *detail,
 			 * Request was not deferred; handle it as best
 			 * we can ourselves:
 			 */
-			rv = cache_is_valid(detail, h);
+			rv = cache_is_valid(h);
 			if (rv == -EAGAIN)
 				rv = -ETIMEDOUT;
 		}
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] sunrpc: the cache_detail in cache_is_valid is unused any more
  2013-03-28 13:58 ` Myklebust, Trond
  2013-03-28 14:07   ` chaoting fan
@ 2013-03-28 14:19   ` chaoting fan
  2013-05-15 13:48     ` J. Bruce Fields
  1 sibling, 1 reply; 5+ messages in thread
From: chaoting fan @ 2013-03-28 14:19 UTC (permalink / raw)
  To: Myklebust, Trond; +Cc: linux-nfs

> Why not just remove it altogether? There are only 3 callers.

thanks ,here is the change patch.

the cache_detail(*detail) in function cache_is_valid is unused any more.

Signed-off-by: fanchaoting <fanchaoting@cn.fujitsu.com>

---
 net/sunrpc/cache.c |    8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
index 9afa439..adbbc19 100644
--- a/net/sunrpc/cache.c
+++ b/net/sunrpc/cache.c
@@ -201,7 +201,7 @@ static int cache_make_upcall(struct cache_detail
*cd, struct cache_head *h)
 	return cd->cache_upcall(cd, h);
 }

-static inline int cache_is_valid(struct cache_detail *detail, struct
cache_head *h)
+static inline int cache_is_valid(struct cache_head *h)
 {
 	if (!test_bit(CACHE_VALID, &h->flags))
 		return -EAGAIN;
@@ -227,7 +227,7 @@ static int try_to_negate_entry(struct cache_detail
*detail, struct cache_head *h
 	int rv;

 	write_lock(&detail->hash_lock);
-	rv = cache_is_valid(detail, h);
+	rv = cache_is_valid(h);
 	if (rv != -EAGAIN) {
 		write_unlock(&detail->hash_lock);
 		return rv;
@@ -260,7 +260,7 @@ int cache_check(struct cache_detail *detail,
 	long refresh_age, age;

 	/* First decide return status as best we can */
-	rv = cache_is_valid(detail, h);
+	rv = cache_is_valid(h);

 	/* now see if we want to start an upcall */
 	refresh_age = (h->expiry_time - h->last_refresh);
@@ -293,7 +293,7 @@ int cache_check(struct cache_detail *detail,
 			 * Request was not deferred; handle it as best
 			 * we can ourselves:
 			 */
-			rv = cache_is_valid(detail, h);
+			rv = cache_is_valid(h);
 			if (rv == -EAGAIN)
 				rv = -ETIMEDOUT;
 		}
-- 
1.7.10.4

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] sunrpc: the cache_detail in cache_is_valid is unused any more
  2013-03-28 14:19   ` chaoting fan
@ 2013-05-15 13:48     ` J. Bruce Fields
  0 siblings, 0 replies; 5+ messages in thread
From: J. Bruce Fields @ 2013-05-15 13:48 UTC (permalink / raw)
  To: chaoting fan; +Cc: Myklebust, Trond, linux-nfs

I think this never got applied?  Applying for 3.11.--b.

On Thu, Mar 28, 2013 at 10:19:45PM +0800, chaoting fan wrote:
> > Why not just remove it altogether? There are only 3 callers.
> 
> thanks ,here is the change patch.
> 
> the cache_detail(*detail) in function cache_is_valid is unused any more.
> 
> Signed-off-by: fanchaoting <fanchaoting@cn.fujitsu.com>
> 
> ---
>  net/sunrpc/cache.c |    8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/net/sunrpc/cache.c b/net/sunrpc/cache.c
> index 9afa439..adbbc19 100644
> --- a/net/sunrpc/cache.c
> +++ b/net/sunrpc/cache.c
> @@ -201,7 +201,7 @@ static int cache_make_upcall(struct cache_detail
> *cd, struct cache_head *h)
>  	return cd->cache_upcall(cd, h);
>  }
> 
> -static inline int cache_is_valid(struct cache_detail *detail, struct
> cache_head *h)
> +static inline int cache_is_valid(struct cache_head *h)
>  {
>  	if (!test_bit(CACHE_VALID, &h->flags))
>  		return -EAGAIN;
> @@ -227,7 +227,7 @@ static int try_to_negate_entry(struct cache_detail
> *detail, struct cache_head *h
>  	int rv;
> 
>  	write_lock(&detail->hash_lock);
> -	rv = cache_is_valid(detail, h);
> +	rv = cache_is_valid(h);
>  	if (rv != -EAGAIN) {
>  		write_unlock(&detail->hash_lock);
>  		return rv;
> @@ -260,7 +260,7 @@ int cache_check(struct cache_detail *detail,
>  	long refresh_age, age;
> 
>  	/* First decide return status as best we can */
> -	rv = cache_is_valid(detail, h);
> +	rv = cache_is_valid(h);
> 
>  	/* now see if we want to start an upcall */
>  	refresh_age = (h->expiry_time - h->last_refresh);
> @@ -293,7 +293,7 @@ int cache_check(struct cache_detail *detail,
>  			 * Request was not deferred; handle it as best
>  			 * we can ourselves:
>  			 */
> -			rv = cache_is_valid(detail, h);
> +			rv = cache_is_valid(h);
>  			if (rv == -EAGAIN)
>  				rv = -ETIMEDOUT;
>  		}
> -- 
> 1.7.10.4
> --
> To unsubscribe from this list: send the line "unsubscribe linux-nfs" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2013-05-15 13:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-28 13:53 [PATCH] sunrpc: the cache_detail in cache_is_valid is unused any more chaoting fan
2013-03-28 13:58 ` Myklebust, Trond
2013-03-28 14:07   ` chaoting fan
2013-03-28 14:19   ` chaoting fan
2013-05-15 13:48     ` J. Bruce Fields

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.