merge sock_alloc_fd/sock_attach_fd into a new helper
[safe/jmp/linux-2.6] / net / rxrpc / ar-internal.h
index cb1eb49..7043b29 100644 (file)
@@ -23,7 +23,7 @@
 struct rxrpc_crypt {
        union {
                u8      x[FCRYPT_BSIZE];
-               u32     n[2];
+               __be32  n[2];
        };
 } __attribute__((aligned(8)));
 
@@ -229,7 +229,7 @@ struct rxrpc_conn_bundle {
        int                     debug_id;       /* debug ID for printks */
        unsigned short          num_conns;      /* number of connections in this bundle */
        __be16                  service_id;     /* service ID */
-       uint8_t                 security_ix;    /* security type */
+       u8                      security_ix;    /* security type */
 };
 
 /*
@@ -370,10 +370,10 @@ struct rxrpc_call {
        u8                      channel;        /* connection channel occupied by this call */
 
        /* transmission-phase ACK management */
-       uint8_t                 acks_head;      /* offset into window of first entry */
-       uint8_t                 acks_tail;      /* offset into window of last entry */
-       uint8_t                 acks_winsz;     /* size of un-ACK'd window */
-       uint8_t                 acks_unacked;   /* lowest unacked packet in last ACK received */
+       u8                      acks_head;      /* offset into window of first entry */
+       u8                      acks_tail;      /* offset into window of last entry */
+       u8                      acks_winsz;     /* size of un-ACK'd window */
+       u8                      acks_unacked;   /* lowest unacked packet in last ACK received */
        int                     acks_latest;    /* serial number of latest ACK received */
        rxrpc_seq_t             acks_hard;      /* highest definitively ACK'd msg seq */
        unsigned long           *acks_window;   /* sent packet window
@@ -388,7 +388,7 @@ struct rxrpc_call {
        rxrpc_seq_t             rx_first_oos;   /* first packet in rx_oos_queue (or 0) */
        rxrpc_seq_t             ackr_win_top;   /* top of ACK window (rx_data_eaten is bottom) */
        rxrpc_seq_net_t         ackr_prev_seq;  /* previous sequence number received */
-       uint8_t                 ackr_reason;    /* reason to ACK */
+       u8                      ackr_reason;    /* reason to ACK */
        __be32                  ackr_serial;    /* serial of packet being ACK'd */
        atomic_t                ackr_not_idle;  /* number of packets in Rx queue */
 
@@ -402,22 +402,6 @@ struct rxrpc_call {
 };
 
 /*
- * RxRPC key for Kerberos (type-2 security)
- */
-struct rxkad_key {
-       u16     security_index;         /* RxRPC header security index */
-       u16     ticket_len;             /* length of ticket[] */
-       u32     expiry;                 /* time at which expires */
-       u32     kvno;                   /* key version number */
-       u8      session_key[8];         /* DES session key */
-       u8      ticket[0];              /* the encrypted ticket */
-};
-
-struct rxrpc_key_payload {
-       struct rxkad_key k;
-};
-
-/*
  * locally abort an RxRPC call
  */
 static inline void rxrpc_abort_call(struct rxrpc_call *call, u32 abort_code)
@@ -450,8 +434,8 @@ extern int rxrpc_reject_call(struct rxrpc_sock *);
 /*
  * ar-ack.c
  */
-extern void __rxrpc_propose_ACK(struct rxrpc_call *, uint8_t, __be32, bool);
-extern void rxrpc_propose_ACK(struct rxrpc_call *, uint8_t, __be32, bool);
+extern void __rxrpc_propose_ACK(struct rxrpc_call *, u8, __be32, bool);
+extern void rxrpc_propose_ACK(struct rxrpc_call *, u8, __be32, bool);
 extern void rxrpc_process_call(struct work_struct *);
 
 /*
@@ -565,9 +549,9 @@ extern void __exit rxrpc_destroy_all_peers(void);
 /*
  * ar-proc.c
  */
-extern const char *rxrpc_call_states[];
-extern struct file_operations rxrpc_call_seq_fops;
-extern struct file_operations rxrpc_connection_seq_fops;
+extern const char *const rxrpc_call_states[];
+extern const struct file_operations rxrpc_call_seq_fops;
+extern const struct file_operations rxrpc_connection_seq_fops;
 
 /*
  * ar-recvmsg.c
@@ -611,7 +595,7 @@ extern struct rxrpc_transport *rxrpc_find_transport(struct rxrpc_local *,
 extern unsigned rxrpc_debug;
 
 #define dbgprintk(FMT,...) \
-       printk("[%x%-6.6s] "FMT"\n", smp_processor_id(), current->comm ,##__VA_ARGS__)
+       printk("[%-6.6s] "FMT"\n", current->comm ,##__VA_ARGS__)
 
 /* make sure we maintain the format strings, even when debugging is disabled */
 static inline __attribute__((format(printf,1,2)))
@@ -619,8 +603,8 @@ void _dbprintk(const char *fmt, ...)
 {
 }
 
-#define kenter(FMT,...)        dbgprintk("==> %s("FMT")",__FUNCTION__ ,##__VA_ARGS__)
-#define kleave(FMT,...)        dbgprintk("<== %s()"FMT"",__FUNCTION__ ,##__VA_ARGS__)
+#define kenter(FMT,...)        dbgprintk("==> %s("FMT")",__func__ ,##__VA_ARGS__)
+#define kleave(FMT,...)        dbgprintk("<== %s()"FMT"",__func__ ,##__VA_ARGS__)
 #define kdebug(FMT,...)        dbgprintk("    "FMT ,##__VA_ARGS__)
 #define kproto(FMT,...)        dbgprintk("### "FMT ,##__VA_ARGS__)
 #define knet(FMT,...)  dbgprintk("@@@ "FMT ,##__VA_ARGS__)
@@ -671,8 +655,8 @@ do {                                                        \
 } while (0)
 
 #else
-#define _enter(FMT,...)        _dbprintk("==> %s("FMT")",__FUNCTION__ ,##__VA_ARGS__)
-#define _leave(FMT,...)        _dbprintk("<== %s()"FMT"",__FUNCTION__ ,##__VA_ARGS__)
+#define _enter(FMT,...)        _dbprintk("==> %s("FMT")",__func__ ,##__VA_ARGS__)
+#define _leave(FMT,...)        _dbprintk("<== %s()"FMT"",__func__ ,##__VA_ARGS__)
 #define _debug(FMT,...)        _dbprintk("    "FMT ,##__VA_ARGS__)
 #define _proto(FMT,...)        _dbprintk("### "FMT ,##__VA_ARGS__)
 #define _net(FMT,...)  _dbprintk("@@@ "FMT ,##__VA_ARGS__)
@@ -786,30 +770,6 @@ static inline void rxrpc_purge_queue(struct sk_buff_head *list)
                rxrpc_free_skb(skb);
 }
 
-static inline void __rxrpc__atomic_inc(atomic_t *v)
-{
-       CHECK_SLAB_OKAY(v);
-       atomic_inc(v);
-}
-
-#define atomic_inc(v) __rxrpc__atomic_inc((v))
-
-static inline void __rxrpc__atomic_dec(atomic_t *v)
-{
-       CHECK_SLAB_OKAY(v);
-       atomic_dec(v);
-}
-
-#define atomic_dec(v) __rxrpc__atomic_dec((v))
-
-static inline int __rxrpc__atomic_dec_and_test(atomic_t *v)
-{
-       CHECK_SLAB_OKAY(v);
-       return atomic_dec_and_test(v);
-}
-
-#define atomic_dec_and_test(v) __rxrpc__atomic_dec_and_test((v))
-
 static inline void __rxrpc_get_local(struct rxrpc_local *local, const char *f)
 {
        CHECK_SLAB_OKAY(&local->usage);