Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 22282
b: refs/heads/master
c: 05790c6
h: refs/heads/master
v: v3
  • Loading branch information
Sam Ravnborg authored and David S. Miller committed Mar 21, 2006
1 parent 4501139 commit ce14a7b
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 54 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1fc54d8f49c1270c584803437fb7c0ac543588c1
refs/heads/master: 05790c6456f144024e655710347b3df499260374
12 changes: 6 additions & 6 deletions trunk/net/tipc/bcast.c
Original file line number Diff line number Diff line change
Expand Up @@ -107,22 +107,22 @@ static spinlock_t bc_lock = SPIN_LOCK_UNLOCKED;
char tipc_bclink_name[] = "multicast-link";


static inline u32 buf_seqno(struct sk_buff *buf)
static u32 buf_seqno(struct sk_buff *buf)
{
return msg_seqno(buf_msg(buf));
}

static inline u32 bcbuf_acks(struct sk_buff *buf)
static u32 bcbuf_acks(struct sk_buff *buf)
{
return (u32)(unsigned long)TIPC_SKB_CB(buf)->handle;
}

static inline void bcbuf_set_acks(struct sk_buff *buf, u32 acks)
static void bcbuf_set_acks(struct sk_buff *buf, u32 acks)
{
TIPC_SKB_CB(buf)->handle = (void *)(unsigned long)acks;
}

static inline void bcbuf_decr_acks(struct sk_buff *buf)
static void bcbuf_decr_acks(struct sk_buff *buf)
{
bcbuf_set_acks(buf, bcbuf_acks(buf) - 1);
}
Expand All @@ -134,7 +134,7 @@ static inline void bcbuf_decr_acks(struct sk_buff *buf)
* Called with 'node' locked, bc_lock unlocked
*/

static inline void bclink_set_gap(struct node *n_ptr)
static void bclink_set_gap(struct node *n_ptr)
{
struct sk_buff *buf = n_ptr->bclink.deferred_head;

Expand All @@ -154,7 +154,7 @@ static inline void bclink_set_gap(struct node *n_ptr)
* distribute NACKs, but tries to use the same spacing (divide by 16).
*/

static inline int bclink_ack_allowed(u32 n)
static int bclink_ack_allowed(u32 n)
{
return((n % TIPC_MIN_LINK_WIN) == tipc_own_tag);
}
Expand Down
58 changes: 29 additions & 29 deletions trunk/net/tipc/link.c
Original file line number Diff line number Diff line change
Expand Up @@ -157,13 +157,13 @@ static void link_print(struct link *l_ptr, struct print_buf *buf,
} \
} while (0)

static inline void dbg_print_link(struct link *l_ptr, const char *str)
static void dbg_print_link(struct link *l_ptr, const char *str)
{
if (DBG_OUTPUT)
link_print(l_ptr, DBG_OUTPUT, str);
}

static inline void dbg_print_buf_chain(struct sk_buff *root_buf)
static void dbg_print_buf_chain(struct sk_buff *root_buf)
{
if (DBG_OUTPUT) {
struct sk_buff *buf = root_buf;
Expand All @@ -176,50 +176,50 @@ static inline void dbg_print_buf_chain(struct sk_buff *root_buf)
}

/*
* Simple inlined link routines
* Simple link routines
*/

static inline unsigned int align(unsigned int i)
static unsigned int align(unsigned int i)
{
return (i + 3) & ~3u;
}

static inline int link_working_working(struct link *l_ptr)
static int link_working_working(struct link *l_ptr)
{
return (l_ptr->state == WORKING_WORKING);
}

static inline int link_working_unknown(struct link *l_ptr)
static int link_working_unknown(struct link *l_ptr)
{
return (l_ptr->state == WORKING_UNKNOWN);
}

static inline int link_reset_unknown(struct link *l_ptr)
static int link_reset_unknown(struct link *l_ptr)
{
return (l_ptr->state == RESET_UNKNOWN);
}

static inline int link_reset_reset(struct link *l_ptr)
static int link_reset_reset(struct link *l_ptr)
{
return (l_ptr->state == RESET_RESET);
}

static inline int link_blocked(struct link *l_ptr)
static int link_blocked(struct link *l_ptr)
{
return (l_ptr->exp_msg_count || l_ptr->blocked);
}

static inline int link_congested(struct link *l_ptr)
static int link_congested(struct link *l_ptr)
{
return (l_ptr->out_queue_size >= l_ptr->queue_limit[0]);
}

static inline u32 link_max_pkt(struct link *l_ptr)
static u32 link_max_pkt(struct link *l_ptr)
{
return l_ptr->max_pkt;
}

static inline void link_init_max_pkt(struct link *l_ptr)
static void link_init_max_pkt(struct link *l_ptr)
{
u32 max_pkt;

Expand All @@ -236,20 +236,20 @@ static inline void link_init_max_pkt(struct link *l_ptr)
l_ptr->max_pkt_probes = 0;
}

static inline u32 link_next_sent(struct link *l_ptr)
static u32 link_next_sent(struct link *l_ptr)
{
if (l_ptr->next_out)
return msg_seqno(buf_msg(l_ptr->next_out));
return mod(l_ptr->next_out_no);
}

static inline u32 link_last_sent(struct link *l_ptr)
static u32 link_last_sent(struct link *l_ptr)
{
return mod(link_next_sent(l_ptr) - 1);
}

/*
* Simple non-inlined link routines (i.e. referenced outside this file)
* Simple non-static link routines (i.e. referenced outside this file)
*/

int tipc_link_is_up(struct link *l_ptr)
Expand Down Expand Up @@ -396,7 +396,7 @@ static void link_timeout(struct link *l_ptr)
tipc_node_unlock(l_ptr->owner);
}

static inline void link_set_timer(struct link *l_ptr, u32 time)
static void link_set_timer(struct link *l_ptr, u32 time)
{
k_start_timer(&l_ptr->timer, time);
}
Expand Down Expand Up @@ -1004,9 +1004,9 @@ static int link_bundle_buf(struct link *l_ptr,
return 1;
}

static inline void link_add_to_outqueue(struct link *l_ptr,
struct sk_buff *buf,
struct tipc_msg *msg)
static void link_add_to_outqueue(struct link *l_ptr,
struct sk_buff *buf,
struct tipc_msg *msg)
{
u32 ack = mod(l_ptr->next_in_no - 1);
u32 seqno = mod(l_ptr->next_out_no++);
Expand Down Expand Up @@ -1156,8 +1156,8 @@ int tipc_link_send(struct sk_buff *buf, u32 dest, u32 selector)
* Link is locked. Returns user data length.
*/

static inline int link_send_buf_fast(struct link *l_ptr, struct sk_buff *buf,
u32 *used_max_pkt)
static int link_send_buf_fast(struct link *l_ptr, struct sk_buff *buf,
u32 *used_max_pkt)
{
struct tipc_msg *msg = buf_msg(buf);
int res = msg_data_sz(msg);
Expand Down Expand Up @@ -2539,42 +2539,42 @@ int tipc_link_send_long_buf(struct link *l_ptr, struct sk_buff *buf)
* pending message. This makes dynamic memory allocation unecessary.
*/

static inline u32 get_long_msg_seqno(struct sk_buff *buf)
static u32 get_long_msg_seqno(struct sk_buff *buf)
{
return msg_seqno(buf_msg(buf));
}

static inline void set_long_msg_seqno(struct sk_buff *buf, u32 seqno)
static void set_long_msg_seqno(struct sk_buff *buf, u32 seqno)
{
msg_set_seqno(buf_msg(buf), seqno);
}

static inline u32 get_fragm_size(struct sk_buff *buf)
static u32 get_fragm_size(struct sk_buff *buf)
{
return msg_ack(buf_msg(buf));
}

static inline void set_fragm_size(struct sk_buff *buf, u32 sz)
static void set_fragm_size(struct sk_buff *buf, u32 sz)
{
msg_set_ack(buf_msg(buf), sz);
}

static inline u32 get_expected_frags(struct sk_buff *buf)
static u32 get_expected_frags(struct sk_buff *buf)
{
return msg_bcast_ack(buf_msg(buf));
}

static inline void set_expected_frags(struct sk_buff *buf, u32 exp)
static void set_expected_frags(struct sk_buff *buf, u32 exp)
{
msg_set_bcast_ack(buf_msg(buf), exp);
}

static inline u32 get_timer_cnt(struct sk_buff *buf)
static u32 get_timer_cnt(struct sk_buff *buf)
{
return msg_reroute_cnt(buf_msg(buf));
}

static inline void incr_timer_cnt(struct sk_buff *buf)
static void incr_timer_cnt(struct sk_buff *buf)
{
msg_incr_reroute_cnt(buf_msg(buf));
}
Expand Down
6 changes: 3 additions & 3 deletions trunk/net/tipc/name_table.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static atomic_t rsv_publ_ok = ATOMIC_INIT(0);
rwlock_t tipc_nametbl_lock = RW_LOCK_UNLOCKED;


static inline int hash(int x)
static int hash(int x)
{
return(x & (tipc_nametbl_size - 1));
}
Expand Down Expand Up @@ -190,8 +190,8 @@ struct name_seq *tipc_nameseq_create(u32 type, struct hlist_head *seq_head)
* Very time-critical, so binary searches through sub-sequence array.
*/

static inline struct sub_seq *nameseq_find_subseq(struct name_seq *nseq,
u32 instance)
static struct sub_seq *nameseq_find_subseq(struct name_seq *nseq,
u32 instance)
{
struct sub_seq *sseqs = nseq->sseqs;
int low = 0;
Expand Down
14 changes: 7 additions & 7 deletions trunk/net/tipc/port.c
Original file line number Diff line number Diff line change
Expand Up @@ -67,27 +67,27 @@ static struct sk_buff* port_build_peer_abort_msg(struct port *,u32 err);
static void port_timeout(unsigned long ref);


static inline u32 port_peernode(struct port *p_ptr)
static u32 port_peernode(struct port *p_ptr)
{
return msg_destnode(&p_ptr->publ.phdr);
}

static inline u32 port_peerport(struct port *p_ptr)
static u32 port_peerport(struct port *p_ptr)
{
return msg_destport(&p_ptr->publ.phdr);
}

static inline u32 port_out_seqno(struct port *p_ptr)
static u32 port_out_seqno(struct port *p_ptr)
{
return msg_transp_seqno(&p_ptr->publ.phdr);
}

static inline void port_set_out_seqno(struct port *p_ptr, u32 seqno)
static void port_set_out_seqno(struct port *p_ptr, u32 seqno)
{
msg_set_transp_seqno(&p_ptr->publ.phdr,seqno);
}

static inline void port_incr_out_seqno(struct port *p_ptr)
static void port_incr_out_seqno(struct port *p_ptr)
{
struct tipc_msg *m = &p_ptr->publ.phdr;

Expand Down Expand Up @@ -335,7 +335,7 @@ void *tipc_get_handle(const u32 ref)
return handle;
}

static inline int port_unreliable(struct port *p_ptr)
static int port_unreliable(struct port *p_ptr)
{
return msg_src_droppable(&p_ptr->publ.phdr);
}
Expand Down Expand Up @@ -364,7 +364,7 @@ int tipc_set_portunreliable(u32 ref, unsigned int isunreliable)
return TIPC_OK;
}

static inline int port_unreturnable(struct port *p_ptr)
static int port_unreturnable(struct port *p_ptr)
{
return msg_dest_droppable(&p_ptr->publ.phdr);
}
Expand Down
14 changes: 7 additions & 7 deletions trunk/net/tipc/socket.c
Original file line number Diff line number Diff line change
Expand Up @@ -88,15 +88,15 @@ static atomic_t tipc_queue_size = ATOMIC_INIT(0);
* with non-socket interfaces.
* See net.c for description of locking policy.
*/
static inline void sock_lock(struct tipc_sock* tsock)
static void sock_lock(struct tipc_sock* tsock)
{
spin_lock_bh(tsock->p->lock);
}

/*
* sock_unlock(): Unlock a port/socket pair
*/
static inline void sock_unlock(struct tipc_sock* tsock)
static void sock_unlock(struct tipc_sock* tsock)
{
spin_unlock_bh(tsock->p->lock);
}
Expand All @@ -119,7 +119,7 @@ static inline void sock_unlock(struct tipc_sock* tsock)
* Returns pollmask value
*/

static inline u32 pollmask(struct socket *sock)
static u32 pollmask(struct socket *sock)
{
u32 mask;

Expand All @@ -144,7 +144,7 @@ static inline u32 pollmask(struct socket *sock)
* @tsock: TIPC socket
*/

static inline void advance_queue(struct tipc_sock *tsock)
static void advance_queue(struct tipc_sock *tsock)
{
sock_lock(tsock);
buf_discard(skb_dequeue(&tsock->sk.sk_receive_queue));
Expand Down Expand Up @@ -412,7 +412,7 @@ static unsigned int poll(struct file *file, struct socket *sock,
* Returns 0 if permission is granted, otherwise errno
*/

static inline int dest_name_check(struct sockaddr_tipc *dest, struct msghdr *m)
static int dest_name_check(struct sockaddr_tipc *dest, struct msghdr *m)
{
struct tipc_cfg_msg_hdr hdr;

Expand Down Expand Up @@ -695,7 +695,7 @@ static int auto_connect(struct socket *sock, struct tipc_sock *tsock,
* Note: Address is not captured if not requested by receiver.
*/

static inline void set_orig_addr(struct msghdr *m, struct tipc_msg *msg)
static void set_orig_addr(struct msghdr *m, struct tipc_msg *msg)
{
struct sockaddr_tipc *addr = (struct sockaddr_tipc *)m->msg_name;

Expand All @@ -721,7 +721,7 @@ static inline void set_orig_addr(struct msghdr *m, struct tipc_msg *msg)
* Returns 0 if successful, otherwise errno
*/

static inline int anc_data_recv(struct msghdr *m, struct tipc_msg *msg,
static int anc_data_recv(struct msghdr *m, struct tipc_msg *msg,
struct tipc_port *tport)
{
u32 anc_data[3];
Expand Down
2 changes: 1 addition & 1 deletion trunk/net/tipc/subscr.c
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ static struct top_srv topsrv = { 0 };
* Returns converted value
*/

static inline u32 htohl(u32 in, int swap)
static u32 htohl(u32 in, int swap)
{
char *c = (char *)∈

Expand Down

0 comments on commit ce14a7b

Please sign in to comment.