[PATCH] Remove unused variable in ktrace_free()

STALE6523d

3 messages, 3 authors, 2008-12-04 · open the first message on its own page

[PATCH] Remove unused variable in ktrace_free()

From: Lachlan McIlroy <hidden>
Date: 2008-12-04 06:18:53

entries_size is probably left over from when we used to pass the
size to kmem_free().
--- xfs-fix.orig/fs/xfs/support/ktrace.c
+++ xfs-fix/fs/xfs/support/ktrace.c
@@ -113,21 +113,16 @@ ktrace_alloc(int nentries, unsigned int
  void
  ktrace_free(ktrace_t *ktp)
  {
-	int     entries_size;
-
  	if (ktp == (ktrace_t *)NULL)
  		return;

  	/*
  	 * Special treatment for the Vnode trace buffer.
  	 */
-	if (ktp->kt_nentries == ktrace_zentries) {
+	if (ktp->kt_nentries == ktrace_zentries)
  		kmem_zone_free(ktrace_ent_zone, ktp->kt_entries);
-	} else {
-		entries_size = (int)(ktp->kt_nentries * sizeof(ktrace_entry_t));
-
+	else
  		kmem_free(ktp->kt_entries);
-	}

  	kmem_zone_free(ktrace_hdr_zone, ktp);
  }
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

Re: [PATCH] Remove unused variable in ktrace_free()

From: Christoph Hellwig <hch@infradead.org>
Date: 2008-12-04 07:09:08

On Thu, Dec 04, 2008 at 05:19:09PM +1100, Lachlan McIlroy wrote:
entries_size is probably left over from when we used to pass the
size to kmem_free().
Looks good.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

Re: [PATCH] Remove unused variable in ktrace_free()

From: Eric Sandeen <hidden>
Date: 2008-12-04 15:29:39

Lachlan McIlroy wrote:
entries_size is probably left over from when we used to pass the
size to kmem_free().
Reviewed-by: Eric Sandeen <redacted>
quoted hunk
--- xfs-fix.orig/fs/xfs/support/ktrace.c
+++ xfs-fix/fs/xfs/support/ktrace.c
@@ -113,21 +113,16 @@ ktrace_alloc(int nentries, unsigned int
  void
  ktrace_free(ktrace_t *ktp)
  {
-	int     entries_size;
-
  	if (ktp == (ktrace_t *)NULL)
  		return;

  	/*
  	 * Special treatment for the Vnode trace buffer.
  	 */
-	if (ktp->kt_nentries == ktrace_zentries) {
+	if (ktp->kt_nentries == ktrace_zentries)
  		kmem_zone_free(ktrace_ent_zone, ktp->kt_entries);
-	} else {
-		entries_size = (int)(ktp->kt_nentries * sizeof(ktrace_entry_t));
-
+	else
  		kmem_free(ktp->kt_entries);
-	}

  	kmem_zone_free(ktrace_hdr_zone, ktp);
  }
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help