* [PATCH] fs/jffs2: kill warning RE debug-only variables
@ 2006-10-04 11:57 Jeff Garzik
2006-10-04 13:31 ` David Woodhouse
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Garzik @ 2006-10-04 11:57 UTC (permalink / raw)
To: dwmw2, Andrew Morton, LKML
gcc emits the following warning on a 'allmodconfig' build:
fs/jffs2/xattr.c: In function ‘unrefer_xattr_datum’:
fs/jffs2/xattr.c:402: warning: unused variable ‘version’
fs/jffs2/xattr.c:402: warning: unused variable ‘xid’
Given that these variables are only used in the debug printk, and they
merely remove a deref, we can easily kill the warning by adding the
derefs to the debug printk.
Signed-off-by: Jeff Garzik <jeff@garzik.org>
---
fs/jffs2/xattr.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/fs/jffs2/xattr.c b/fs/jffs2/xattr.c
index 4da09ce..4bb3f18 100644
--- a/fs/jffs2/xattr.c
+++ b/fs/jffs2/xattr.c
@@ -399,8 +399,6 @@ static void unrefer_xattr_datum(struct j
{
/* must be called under down_write(xattr_sem) */
if (atomic_dec_and_lock(&xd->refcnt, &c->erase_completion_lock)) {
- uint32_t xid = xd->xid, version = xd->version;
-
unload_xattr_datum(c, xd);
xd->flags |= JFFS2_XFLAGS_DEAD;
if (xd->node == (void *)xd) {
@@ -411,7 +409,8 @@ static void unrefer_xattr_datum(struct j
}
spin_unlock(&c->erase_completion_lock);
- dbg_xattr("xdatum(xid=%u, version=%u) was removed.\n", xid, version);
+ dbg_xattr("xdatum(xid=%u, version=%u) was removed.\n",
+ xd->xid, xd->version);
}
}
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH] fs/jffs2: kill warning RE debug-only variables
2006-10-04 11:57 [PATCH] fs/jffs2: kill warning RE debug-only variables Jeff Garzik
@ 2006-10-04 13:31 ` David Woodhouse
0 siblings, 0 replies; 2+ messages in thread
From: David Woodhouse @ 2006-10-04 13:31 UTC (permalink / raw)
To: Jeff Garzik; +Cc: Andrew Morton, LKML
On Wed, 2006-10-04 at 07:57 -0400, Jeff Garzik wrote:
> build:
>
> fs/jffs2/xattr.c: In function ‘unrefer_xattr_datum’:
> fs/jffs2/xattr.c:402: warning: unused variable ‘version’
> fs/jffs2/xattr.c:402: warning: unused variable ‘xid’
>
> Given that these variables are only used in the debug printk, and they
> merely remove a deref, we can easily kill the warning by adding the
> derefs to the debug printk.
>
> Signed-off-by: Jeff Garzik <jeff@garzik.org>
Applied; thanks.
--
dwmw2
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2006-10-04 13:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-10-04 11:57 [PATCH] fs/jffs2: kill warning RE debug-only variables Jeff Garzik
2006-10-04 13:31 ` David Woodhouse
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®