Skip to content

Commit 29c6e48

Browse files
AdrianBunkLinus Torvalds
authored andcommitted
[PATCH] fs/9p/: possible cleanups
- mux.c: v9fs_poll_mux() was inline but not static resuling in needless object size bloat - mux.c: remove all "inline"s: gcc should know best what to inline - #if 0 the following unused global functions: - 9p.c: v9fs_v9fs_t_flush() - conv.c: v9fs_create_tauth() - mux.c: v9fs_mux_rpcnb() Signed-off-by: Adrian Bunk <bunk@stusta.de> Cc: Eric Van Hensbergen <ericvh@ericvh.myip.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
1 parent caa9ee7 commit 29c6e48

6 files changed

Lines changed: 10 additions & 10 deletions

File tree

‎fs/9p/9p.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ v9fs_t_clunk(struct v9fs_session_info *v9ses, u32 fid)
148148
return ret;
149149
}
150150

151+
#if 0
151152
/**
152153
* v9fs_v9fs_t_flush - flush a pending transaction
153154
* @v9ses: 9P2000 session information
@@ -171,6 +172,7 @@ int v9fs_t_flush(struct v9fs_session_info *v9ses, u16 oldtag)
171172

172173
return ret;
173174
}
175+
#endif /* 0 */
174176

175177
/**
176178
* v9fs_t_stat - read a file's meta-data

‎fs/9p/9p.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -348,8 +348,6 @@ int v9fs_t_attach(struct v9fs_session_info *v9ses, char *uname, char *aname,
348348

349349
int v9fs_t_clunk(struct v9fs_session_info *v9ses, u32 fid);
350350

351-
int v9fs_t_flush(struct v9fs_session_info *v9ses, u16 oldtag);
352-
353351
int v9fs_t_stat(struct v9fs_session_info *v9ses, u32 fid,
354352
struct v9fs_fcall **rcall);
355353

‎fs/9p/conv.c‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -536,6 +536,7 @@ struct v9fs_fcall *v9fs_create_tversion(u32 msize, char *version)
536536
return fc;
537537
}
538538

539+
#if 0
539540
struct v9fs_fcall *v9fs_create_tauth(u32 afid, char *uname, char *aname)
540541
{
541542
int size;
@@ -559,6 +560,7 @@ struct v9fs_fcall *v9fs_create_tauth(u32 afid, char *uname, char *aname)
559560
error:
560561
return fc;
561562
}
563+
#endif /* 0 */
562564

563565
struct v9fs_fcall *
564566
v9fs_create_tattach(u32 fid, u32 afid, char *uname, char *aname)

‎fs/9p/conv.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,6 @@ int v9fs_deserialize_fcall(void *buf, u32 buflen, struct v9fs_fcall *rcall,
3333
void v9fs_set_tag(struct v9fs_fcall *fc, u16 tag);
3434

3535
struct v9fs_fcall *v9fs_create_tversion(u32 msize, char *version);
36-
struct v9fs_fcall *v9fs_create_tauth(u32 afid, char *uname, char *aname);
3736
struct v9fs_fcall *v9fs_create_tattach(u32 fid, u32 afid, char *uname,
3837
char *aname);
3938
struct v9fs_fcall *v9fs_create_tflush(u16 oldtag);

‎fs/9p/mux.c‎

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ void v9fs_mux_global_exit(void)
143143
*
144144
* The current implementation returns sqrt of the number of mounts.
145145
*/
146-
inline int v9fs_mux_calc_poll_procs(int muxnum)
146+
static int v9fs_mux_calc_poll_procs(int muxnum)
147147
{
148148
int n;
149149

@@ -384,7 +384,7 @@ v9fs_pollwait(struct file *filp, wait_queue_head_t * wait_address,
384384
/**
385385
* v9fs_poll_mux - polls a mux and schedules read or write works if necessary
386386
*/
387-
static inline void v9fs_poll_mux(struct v9fs_mux_data *m)
387+
static void v9fs_poll_mux(struct v9fs_mux_data *m)
388388
{
389389
int n;
390390

@@ -762,9 +762,8 @@ static struct v9fs_req *v9fs_send_request(struct v9fs_mux_data *m,
762762
return req;
763763
}
764764

765-
static inline void
766-
v9fs_mux_flush_cb(void *a, struct v9fs_fcall *tc, struct v9fs_fcall *rc,
767-
int err)
765+
static void v9fs_mux_flush_cb(void *a, struct v9fs_fcall *tc,
766+
struct v9fs_fcall *rc, int err)
768767
{
769768
v9fs_mux_req_callback cb;
770769
int tag;
@@ -902,6 +901,7 @@ v9fs_mux_rpc(struct v9fs_mux_data *m, struct v9fs_fcall *tc,
902901
return err;
903902
}
904903

904+
#if 0
905905
/**
906906
* v9fs_mux_rpcnb - sends 9P request without waiting for response.
907907
* @m: mux data
@@ -925,6 +925,7 @@ int v9fs_mux_rpcnb(struct v9fs_mux_data *m, struct v9fs_fcall *tc,
925925
dprintk(DEBUG_MUX, "mux %p tc %p tag %d\n", m, tc, req->tag);
926926
return 0;
927927
}
928+
#endif /* 0 */
928929

929930
/**
930931
* v9fs_mux_cancel - cancel all pending requests with error

‎fs/9p/mux.h‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,6 @@ void v9fs_mux_destroy(struct v9fs_mux_data *);
5050
int v9fs_mux_send(struct v9fs_mux_data *m, struct v9fs_fcall *tc);
5151
struct v9fs_fcall *v9fs_mux_recv(struct v9fs_mux_data *m);
5252
int v9fs_mux_rpc(struct v9fs_mux_data *m, struct v9fs_fcall *tc, struct v9fs_fcall **rc);
53-
int v9fs_mux_rpcnb(struct v9fs_mux_data *m, struct v9fs_fcall *tc,
54-
v9fs_mux_req_callback cb, void *a);
5553

5654
void v9fs_mux_flush(struct v9fs_mux_data *m, int sendflush);
5755
void v9fs_mux_cancel(struct v9fs_mux_data *m, int err);

0 commit comments

Comments
 (0)