Skip to content

Commit

Permalink
[GFS2] Remove redundant casts to/from void
Browse files Browse the repository at this point in the history
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
  • Loading branch information
David Teigland authored and Steven Whitehouse committed Apr 27, 2006
1 parent 6bd70ab commit e7f5c01
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
11 changes: 5 additions & 6 deletions fs/gfs2/glock.c
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ void gfs2_glock_force_drop(struct gfs2_glock *gl)

static void greedy_work(void *data)
{
struct greedy *gr = (struct greedy *)data;
struct greedy *gr = data;
struct gfs2_holder *gh = &gr->gr_gh;
struct gfs2_glock *gl = gh->gh_gl;
struct gfs2_glock_operations *glops = gl->gl_ops;
Expand Down Expand Up @@ -1745,19 +1745,19 @@ void gfs2_glock_cb(lm_fsdata_t *fsdata, unsigned int type, void *data)

switch (type) {
case LM_CB_NEED_E:
blocking_cb(sdp, (struct lm_lockname *)data, LM_ST_UNLOCKED);
blocking_cb(sdp, data, LM_ST_UNLOCKED);
return;

case LM_CB_NEED_D:
blocking_cb(sdp, (struct lm_lockname *)data, LM_ST_DEFERRED);
blocking_cb(sdp, data, LM_ST_DEFERRED);
return;

case LM_CB_NEED_S:
blocking_cb(sdp, (struct lm_lockname *)data, LM_ST_SHARED);
blocking_cb(sdp, data, LM_ST_SHARED);
return;

case LM_CB_ASYNC: {
struct lm_async_cb *async = (struct lm_async_cb *)data;
struct lm_async_cb *async = data;
struct gfs2_glock *gl;

gl = gfs2_glock_find(sdp, &async->lc_name);
Expand All @@ -1766,7 +1766,6 @@ void gfs2_glock_cb(lm_fsdata_t *fsdata, unsigned int type, void *data)
if (!gfs2_assert_warn(sdp, gl->gl_req_bh))
gl->gl_req_bh(gl, async->lc_ret);
gfs2_glock_put(gl);

return;
}

Expand Down
4 changes: 2 additions & 2 deletions fs/gfs2/locking/dlm/lock.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ static void queue_complete(struct gdlm_lock *lp)

static inline void gdlm_ast(void *astarg)
{
queue_complete((struct gdlm_lock *) astarg);
queue_complete(astarg);
}

static inline void gdlm_bast(void *astarg, int mode)
Expand Down Expand Up @@ -257,7 +257,7 @@ unsigned int gdlm_do_lock(struct gdlm_lock *lp)
lp->cur, lp->req, lp->lkf);

error = dlm_lock(ls->dlm_lockspace, lp->req, &lp->lksb, lp->lkf,
str.name, str.namelen, 0, gdlm_ast, (void *) lp,
str.name, str.namelen, 0, gdlm_ast, lp,
bast ? gdlm_bast : NULL);

if ((error == -EAGAIN) && (lp->lkf & DLM_LKF_NOQUEUE)) {
Expand Down

0 comments on commit e7f5c01

Please sign in to comment.