From: Eric Sandeen <sandeen@sandeen.net>
To: xfs-oss <xfs@oss.sgi.com>
Subject: [PATCH] vn_hold return value is unused
Date: Wed, 27 Jun 2007 09:46:36 -0500 [thread overview]
Message-ID: <4682784C.1070607@sandeen.net> (raw)
Came across this while looking at the last patch.
*shrug* it's here if you want it :)
-------------
Make vn_hold a void function; return is never used.
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
Index: xfs-linux-clean/linux-2.4/xfs_vnode.c
===================================================================
--- xfs-linux-clean.orig/linux-2.4/xfs_vnode.c
+++ xfs-linux-clean/linux-2.4/xfs_vnode.c
@@ -133,7 +133,7 @@ vn_revalidate(
/*
* Add a reference to a referenced vnode.
*/
-bhv_vnode_t *
+void
vn_hold(
bhv_vnode_t *vp)
{
@@ -145,8 +145,6 @@ vn_hold(
inode = igrab(vn_to_inode(vp));
ASSERT(inode);
VN_UNLOCK(vp, 0);
-
- return vp;
}
#ifdef XFS_VNODE_TRACE
Index: xfs-linux-clean/linux-2.4/xfs_vnode.h
===================================================================
--- xfs-linux-clean.orig/linux-2.4/xfs_vnode.h
+++ xfs-linux-clean/linux-2.4/xfs_vnode.h
@@ -435,17 +435,17 @@ static inline int vn_count(struct bhv_vn
/*
* Vnode reference counting functions (and macros for compatibility).
*/
-extern bhv_vnode_t *vn_hold(struct bhv_vnode *);
+extern void vn_hold(struct bhv_vnode *);
#if defined(XFS_VNODE_TRACE)
#define VN_HOLD(vp) \
- ((void)vn_hold(vp), \
+ (vn_hold(vp), \
vn_trace_hold(vp, __FILE__, __LINE__, (inst_t *)__return_address))
#define VN_RELE(vp) \
(vn_trace_rele(vp, __FILE__, __LINE__, (inst_t *)__return_address), \
iput(vn_to_inode(vp)))
#else
-#define VN_HOLD(vp) ((void)vn_hold(vp))
+#define VN_HOLD(vp) (vn_hold(vp))
#define VN_RELE(vp) (iput(vn_to_inode(vp)))
#endif
Index: xfs-linux-clean/linux-2.6/xfs_vnode.c
===================================================================
--- xfs-linux-clean.orig/linux-2.6/xfs_vnode.c
+++ xfs-linux-clean/linux-2.6/xfs_vnode.c
@@ -172,7 +172,7 @@ vn_revalidate(
/*
* Add a reference to a referenced vnode.
*/
-bhv_vnode_t *
+void
vn_hold(
bhv_vnode_t *vp)
{
@@ -184,8 +184,6 @@ vn_hold(
inode = igrab(vn_to_inode(vp));
ASSERT(inode);
VN_UNLOCK(vp, 0);
-
- return vp;
}
#ifdef XFS_VNODE_TRACE
Index: xfs-linux-clean/linux-2.6/xfs_vnode.h
===================================================================
--- xfs-linux-clean.orig/linux-2.6/xfs_vnode.h
+++ xfs-linux-clean/linux-2.6/xfs_vnode.h
@@ -454,17 +454,17 @@ static inline int vn_count(struct bhv_vn
/*
* Vnode reference counting functions (and macros for compatibility).
*/
-extern bhv_vnode_t *vn_hold(struct bhv_vnode *);
+extern void vn_hold(struct bhv_vnode *);
#if defined(XFS_VNODE_TRACE)
#define VN_HOLD(vp) \
- ((void)vn_hold(vp), \
+ (vn_hold(vp), \
vn_trace_hold(vp, __FILE__, __LINE__, (inst_t *)__return_address))
#define VN_RELE(vp) \
(vn_trace_rele(vp, __FILE__, __LINE__, (inst_t *)__return_address), \
iput(vn_to_inode(vp)))
#else
-#define VN_HOLD(vp) ((void)vn_hold(vp))
+#define VN_HOLD(vp) (vn_hold(vp))
#define VN_RELE(vp) (iput(vn_to_inode(vp)))
#endif
reply other threads:[~2007-06-27 14:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4682784C.1070607@sandeen.net \
--to=sandeen@sandeen.net \
--cc=xfs@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox