Commit 3f874adc authored by sjur.brandeland@stericsson.com's avatar sjur.brandeland@stericsson.com Committed by David S. Miller

caif: remove unesesarry exports

Signed-off-by: default avatarSjur Brændeland <sjur.brandeland@stericsson.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 33b2f559
...@@ -195,5 +195,4 @@ void *cfpkt_tonative(struct cfpkt *pkt); ...@@ -195,5 +195,4 @@ void *cfpkt_tonative(struct cfpkt *pkt);
* @return Packet information * @return Packet information
*/ */
struct caif_payload_info *cfpkt_info(struct cfpkt *pkt); struct caif_payload_info *cfpkt_info(struct cfpkt *pkt);
/*! @} */
#endif /* CFPKT_H_ */ #endif /* CFPKT_H_ */
...@@ -205,7 +205,7 @@ static int caif_sktrecv_cb(struct cflayer *layr, struct cfpkt *pkt) ...@@ -205,7 +205,7 @@ static int caif_sktrecv_cb(struct cflayer *layr, struct cfpkt *pkt)
skb = cfpkt_tonative(pkt); skb = cfpkt_tonative(pkt);
if (unlikely(cf_sk->sk.sk_state != CAIF_CONNECTED)) { if (unlikely(cf_sk->sk.sk_state != CAIF_CONNECTED)) {
cfpkt_destroy(pkt); kfree_skb(skb);
return 0; return 0;
} }
caif_queue_rcv_skb(&cf_sk->sk, skb); caif_queue_rcv_skb(&cf_sk->sk, skb);
...@@ -537,7 +537,7 @@ static int transmit_skb(struct sk_buff *skb, struct caifsock *cf_sk, ...@@ -537,7 +537,7 @@ static int transmit_skb(struct sk_buff *skb, struct caifsock *cf_sk,
struct cfpkt *pkt; struct cfpkt *pkt;
pkt = cfpkt_fromnative(CAIF_DIR_OUT, skb); pkt = cfpkt_fromnative(CAIF_DIR_OUT, skb);
memset(cfpkt_info(pkt), 0, sizeof(struct caif_payload_info)); memset(skb->cb, 0, sizeof(struct caif_payload_info));
if (cf_sk->layer.dn == NULL) if (cf_sk->layer.dn == NULL)
return -EINVAL; return -EINVAL;
......
...@@ -117,7 +117,6 @@ out_of_mem: ...@@ -117,7 +117,6 @@ out_of_mem:
kfree(this); kfree(this);
return NULL; return NULL;
} }
EXPORT_SYMBOL(cfcnfg_create);
void cfcnfg_remove(struct cfcnfg *cfg) void cfcnfg_remove(struct cfcnfg *cfg)
{ {
......
...@@ -97,21 +97,20 @@ inline struct cfpkt *cfpkt_create(u16 len) ...@@ -97,21 +97,20 @@ inline struct cfpkt *cfpkt_create(u16 len)
{ {
return cfpkt_create_pfx(len + PKT_POSTFIX, PKT_PREFIX); return cfpkt_create_pfx(len + PKT_POSTFIX, PKT_PREFIX);
} }
EXPORT_SYMBOL(cfpkt_create);
void cfpkt_destroy(struct cfpkt *pkt) void cfpkt_destroy(struct cfpkt *pkt)
{ {
struct sk_buff *skb = pkt_to_skb(pkt); struct sk_buff *skb = pkt_to_skb(pkt);
kfree_skb(skb); kfree_skb(skb);
} }
EXPORT_SYMBOL(cfpkt_destroy);
inline bool cfpkt_more(struct cfpkt *pkt) inline bool cfpkt_more(struct cfpkt *pkt)
{ {
struct sk_buff *skb = pkt_to_skb(pkt); struct sk_buff *skb = pkt_to_skb(pkt);
return skb->len > 0; return skb->len > 0;
} }
EXPORT_SYMBOL(cfpkt_more);
int cfpkt_peek_head(struct cfpkt *pkt, void *data, u16 len) int cfpkt_peek_head(struct cfpkt *pkt, void *data, u16 len)
{ {
...@@ -123,7 +122,6 @@ int cfpkt_peek_head(struct cfpkt *pkt, void *data, u16 len) ...@@ -123,7 +122,6 @@ int cfpkt_peek_head(struct cfpkt *pkt, void *data, u16 len)
return !cfpkt_extr_head(pkt, data, len) && return !cfpkt_extr_head(pkt, data, len) &&
!cfpkt_add_head(pkt, data, len); !cfpkt_add_head(pkt, data, len);
} }
EXPORT_SYMBOL(cfpkt_peek_head);
int cfpkt_extr_head(struct cfpkt *pkt, void *data, u16 len) int cfpkt_extr_head(struct cfpkt *pkt, void *data, u16 len)
{ {
...@@ -148,7 +146,6 @@ int cfpkt_extr_head(struct cfpkt *pkt, void *data, u16 len) ...@@ -148,7 +146,6 @@ int cfpkt_extr_head(struct cfpkt *pkt, void *data, u16 len)
memcpy(data, from, len); memcpy(data, from, len);
return 0; return 0;
} }
EXPORT_SYMBOL(cfpkt_extr_head);
int cfpkt_extr_trail(struct cfpkt *pkt, void *dta, u16 len) int cfpkt_extr_trail(struct cfpkt *pkt, void *dta, u16 len)
{ {
...@@ -171,13 +168,13 @@ int cfpkt_extr_trail(struct cfpkt *pkt, void *dta, u16 len) ...@@ -171,13 +168,13 @@ int cfpkt_extr_trail(struct cfpkt *pkt, void *dta, u16 len)
memcpy(data, from, len); memcpy(data, from, len);
return 0; return 0;
} }
EXPORT_SYMBOL(cfpkt_extr_trail);
int cfpkt_pad_trail(struct cfpkt *pkt, u16 len) int cfpkt_pad_trail(struct cfpkt *pkt, u16 len)
{ {
return cfpkt_add_body(pkt, NULL, len); return cfpkt_add_body(pkt, NULL, len);
} }
EXPORT_SYMBOL(cfpkt_pad_trail);
int cfpkt_add_body(struct cfpkt *pkt, const void *data, u16 len) int cfpkt_add_body(struct cfpkt *pkt, const void *data, u16 len)
{ {
...@@ -226,13 +223,11 @@ int cfpkt_add_body(struct cfpkt *pkt, const void *data, u16 len) ...@@ -226,13 +223,11 @@ int cfpkt_add_body(struct cfpkt *pkt, const void *data, u16 len)
memcpy(to, data, len); memcpy(to, data, len);
return 0; return 0;
} }
EXPORT_SYMBOL(cfpkt_add_body);
inline int cfpkt_addbdy(struct cfpkt *pkt, u8 data) inline int cfpkt_addbdy(struct cfpkt *pkt, u8 data)
{ {
return cfpkt_add_body(pkt, &data, 1); return cfpkt_add_body(pkt, &data, 1);
} }
EXPORT_SYMBOL(cfpkt_addbdy);
int cfpkt_add_head(struct cfpkt *pkt, const void *data2, u16 len) int cfpkt_add_head(struct cfpkt *pkt, const void *data2, u16 len)
{ {
...@@ -259,20 +254,20 @@ int cfpkt_add_head(struct cfpkt *pkt, const void *data2, u16 len) ...@@ -259,20 +254,20 @@ int cfpkt_add_head(struct cfpkt *pkt, const void *data2, u16 len)
memcpy(to, data, len); memcpy(to, data, len);
return 0; return 0;
} }
EXPORT_SYMBOL(cfpkt_add_head);
inline int cfpkt_add_trail(struct cfpkt *pkt, const void *data, u16 len) inline int cfpkt_add_trail(struct cfpkt *pkt, const void *data, u16 len)
{ {
return cfpkt_add_body(pkt, data, len); return cfpkt_add_body(pkt, data, len);
} }
EXPORT_SYMBOL(cfpkt_add_trail);
inline u16 cfpkt_getlen(struct cfpkt *pkt) inline u16 cfpkt_getlen(struct cfpkt *pkt)
{ {
struct sk_buff *skb = pkt_to_skb(pkt); struct sk_buff *skb = pkt_to_skb(pkt);
return skb->len; return skb->len;
} }
EXPORT_SYMBOL(cfpkt_getlen);
inline u16 cfpkt_iterate(struct cfpkt *pkt, inline u16 cfpkt_iterate(struct cfpkt *pkt,
u16 (*iter_func)(u16, void *, u16), u16 (*iter_func)(u16, void *, u16),
...@@ -290,7 +285,7 @@ inline u16 cfpkt_iterate(struct cfpkt *pkt, ...@@ -290,7 +285,7 @@ inline u16 cfpkt_iterate(struct cfpkt *pkt,
} }
return iter_func(data, pkt->skb.data, cfpkt_getlen(pkt)); return iter_func(data, pkt->skb.data, cfpkt_getlen(pkt));
} }
EXPORT_SYMBOL(cfpkt_iterate);
int cfpkt_setlen(struct cfpkt *pkt, u16 len) int cfpkt_setlen(struct cfpkt *pkt, u16 len)
{ {
...@@ -315,7 +310,6 @@ int cfpkt_setlen(struct cfpkt *pkt, u16 len) ...@@ -315,7 +310,6 @@ int cfpkt_setlen(struct cfpkt *pkt, u16 len)
return cfpkt_getlen(pkt); return cfpkt_getlen(pkt);
} }
EXPORT_SYMBOL(cfpkt_setlen);
struct cfpkt *cfpkt_append(struct cfpkt *dstpkt, struct cfpkt *cfpkt_append(struct cfpkt *dstpkt,
struct cfpkt *addpkt, struct cfpkt *addpkt,
...@@ -357,7 +351,6 @@ struct cfpkt *cfpkt_append(struct cfpkt *dstpkt, ...@@ -357,7 +351,6 @@ struct cfpkt *cfpkt_append(struct cfpkt *dstpkt,
dst->len += addlen; dst->len += addlen;
return skb_to_pkt(dst); return skb_to_pkt(dst);
} }
EXPORT_SYMBOL(cfpkt_append);
struct cfpkt *cfpkt_split(struct cfpkt *pkt, u16 pos) struct cfpkt *cfpkt_split(struct cfpkt *pkt, u16 pos)
{ {
...@@ -395,17 +388,13 @@ struct cfpkt *cfpkt_split(struct cfpkt *pkt, u16 pos) ...@@ -395,17 +388,13 @@ struct cfpkt *cfpkt_split(struct cfpkt *pkt, u16 pos)
skb2->len += len2nd; skb2->len += len2nd;
return skb_to_pkt(skb2); return skb_to_pkt(skb2);
} }
EXPORT_SYMBOL(cfpkt_split);
bool cfpkt_erroneous(struct cfpkt *pkt) bool cfpkt_erroneous(struct cfpkt *pkt)
{ {
return cfpkt_priv(pkt)->erronous; return cfpkt_priv(pkt)->erronous;
} }
EXPORT_SYMBOL(cfpkt_erroneous);
struct caif_payload_info *cfpkt_info(struct cfpkt *pkt) struct caif_payload_info *cfpkt_info(struct cfpkt *pkt)
{ {
return (struct caif_payload_info *)&pkt_to_skb(pkt)->cb; return (struct caif_payload_info *)&pkt_to_skb(pkt)->cb;
} }
EXPORT_SYMBOL(cfpkt_info);
...@@ -83,10 +83,11 @@ static int chnl_recv_cb(struct cflayer *layr, struct cfpkt *pkt) ...@@ -83,10 +83,11 @@ static int chnl_recv_cb(struct cflayer *layr, struct cfpkt *pkt)
if (!priv) if (!priv)
return -EINVAL; return -EINVAL;
skb = (struct sk_buff *) cfpkt_tonative(pkt);
/* Get length of CAIF packet. */ /* Get length of CAIF packet. */
pktlen = cfpkt_getlen(pkt); pktlen = skb->len;
skb = (struct sk_buff *) cfpkt_tonative(pkt);
/* Pass some minimum information and /* Pass some minimum information and
* send the packet to the net stack. * send the packet to the net stack.
*/ */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment