Skip to content

Commit 3f874ad

Browse files
sjur.brandeland@stericsson.comdavem330
authored andcommitted
caif: remove unesesarry exports
Signed-off-by: Sjur Brændeland <sjur.brandeland@stericsson.com> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 33b2f55 commit 3f874ad

5 files changed

Lines changed: 13 additions & 25 deletions

File tree

‎include/net/caif/cfpkt.h‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -195,5 +195,4 @@ void *cfpkt_tonative(struct cfpkt *pkt);
195195
* @return Packet information
196196
*/
197197
struct caif_payload_info *cfpkt_info(struct cfpkt *pkt);
198-
/*! @} */
199198
#endif /* CFPKT_H_ */

‎net/caif/caif_socket.c‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -205,7 +205,7 @@ static int caif_sktrecv_cb(struct cflayer *layr, struct cfpkt *pkt)
205205
skb = cfpkt_tonative(pkt);
206206

207207
if (unlikely(cf_sk->sk.sk_state != CAIF_CONNECTED)) {
208-
cfpkt_destroy(pkt);
208+
kfree_skb(skb);
209209
return 0;
210210
}
211211
caif_queue_rcv_skb(&cf_sk->sk, skb);
@@ -537,7 +537,7 @@ static int transmit_skb(struct sk_buff *skb, struct caifsock *cf_sk,
537537
struct cfpkt *pkt;
538538

539539
pkt = cfpkt_fromnative(CAIF_DIR_OUT, skb);
540-
memset(cfpkt_info(pkt), 0, sizeof(struct caif_payload_info));
540+
memset(skb->cb, 0, sizeof(struct caif_payload_info));
541541

542542
if (cf_sk->layer.dn == NULL)
543543
return -EINVAL;

‎net/caif/cfcnfg.c‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ struct cfcnfg *cfcnfg_create(void)
117117
kfree(this);
118118
return NULL;
119119
}
120-
EXPORT_SYMBOL(cfcnfg_create);
121120

122121
void cfcnfg_remove(struct cfcnfg *cfg)
123122
{

‎net/caif/cfpkt_skbuff.c‎

Lines changed: 8 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -97,21 +97,20 @@ inline struct cfpkt *cfpkt_create(u16 len)
9797
{
9898
return cfpkt_create_pfx(len + PKT_POSTFIX, PKT_PREFIX);
9999
}
100-
EXPORT_SYMBOL(cfpkt_create);
101100

102101
void cfpkt_destroy(struct cfpkt *pkt)
103102
{
104103
struct sk_buff *skb = pkt_to_skb(pkt);
105104
kfree_skb(skb);
106105
}
107-
EXPORT_SYMBOL(cfpkt_destroy);
106+
108107

109108
inline bool cfpkt_more(struct cfpkt *pkt)
110109
{
111110
struct sk_buff *skb = pkt_to_skb(pkt);
112111
return skb->len > 0;
113112
}
114-
EXPORT_SYMBOL(cfpkt_more);
113+
115114

116115
int cfpkt_peek_head(struct cfpkt *pkt, void *data, u16 len)
117116
{
@@ -123,7 +122,6 @@ int cfpkt_peek_head(struct cfpkt *pkt, void *data, u16 len)
123122
return !cfpkt_extr_head(pkt, data, len) &&
124123
!cfpkt_add_head(pkt, data, len);
125124
}
126-
EXPORT_SYMBOL(cfpkt_peek_head);
127125

128126
int cfpkt_extr_head(struct cfpkt *pkt, void *data, u16 len)
129127
{
@@ -148,7 +146,6 @@ int cfpkt_extr_head(struct cfpkt *pkt, void *data, u16 len)
148146
memcpy(data, from, len);
149147
return 0;
150148
}
151-
EXPORT_SYMBOL(cfpkt_extr_head);
152149

153150
int cfpkt_extr_trail(struct cfpkt *pkt, void *dta, u16 len)
154151
{
@@ -171,13 +168,13 @@ int cfpkt_extr_trail(struct cfpkt *pkt, void *dta, u16 len)
171168
memcpy(data, from, len);
172169
return 0;
173170
}
174-
EXPORT_SYMBOL(cfpkt_extr_trail);
171+
175172

176173
int cfpkt_pad_trail(struct cfpkt *pkt, u16 len)
177174
{
178175
return cfpkt_add_body(pkt, NULL, len);
179176
}
180-
EXPORT_SYMBOL(cfpkt_pad_trail);
177+
181178

182179
int cfpkt_add_body(struct cfpkt *pkt, const void *data, u16 len)
183180
{
@@ -226,13 +223,11 @@ int cfpkt_add_body(struct cfpkt *pkt, const void *data, u16 len)
226223
memcpy(to, data, len);
227224
return 0;
228225
}
229-
EXPORT_SYMBOL(cfpkt_add_body);
230226

231227
inline int cfpkt_addbdy(struct cfpkt *pkt, u8 data)
232228
{
233229
return cfpkt_add_body(pkt, &data, 1);
234230
}
235-
EXPORT_SYMBOL(cfpkt_addbdy);
236231

237232
int cfpkt_add_head(struct cfpkt *pkt, const void *data2, u16 len)
238233
{
@@ -259,20 +254,20 @@ int cfpkt_add_head(struct cfpkt *pkt, const void *data2, u16 len)
259254
memcpy(to, data, len);
260255
return 0;
261256
}
262-
EXPORT_SYMBOL(cfpkt_add_head);
257+
263258

264259
inline int cfpkt_add_trail(struct cfpkt *pkt, const void *data, u16 len)
265260
{
266261
return cfpkt_add_body(pkt, data, len);
267262
}
268-
EXPORT_SYMBOL(cfpkt_add_trail);
263+
269264

270265
inline u16 cfpkt_getlen(struct cfpkt *pkt)
271266
{
272267
struct sk_buff *skb = pkt_to_skb(pkt);
273268
return skb->len;
274269
}
275-
EXPORT_SYMBOL(cfpkt_getlen);
270+
276271

277272
inline u16 cfpkt_iterate(struct cfpkt *pkt,
278273
u16 (*iter_func)(u16, void *, u16),
@@ -290,7 +285,7 @@ inline u16 cfpkt_iterate(struct cfpkt *pkt,
290285
}
291286
return iter_func(data, pkt->skb.data, cfpkt_getlen(pkt));
292287
}
293-
EXPORT_SYMBOL(cfpkt_iterate);
288+
294289

295290
int cfpkt_setlen(struct cfpkt *pkt, u16 len)
296291
{
@@ -315,7 +310,6 @@ int cfpkt_setlen(struct cfpkt *pkt, u16 len)
315310

316311
return cfpkt_getlen(pkt);
317312
}
318-
EXPORT_SYMBOL(cfpkt_setlen);
319313

320314
struct cfpkt *cfpkt_append(struct cfpkt *dstpkt,
321315
struct cfpkt *addpkt,
@@ -357,7 +351,6 @@ struct cfpkt *cfpkt_append(struct cfpkt *dstpkt,
357351
dst->len += addlen;
358352
return skb_to_pkt(dst);
359353
}
360-
EXPORT_SYMBOL(cfpkt_append);
361354

362355
struct cfpkt *cfpkt_split(struct cfpkt *pkt, u16 pos)
363356
{
@@ -395,17 +388,13 @@ struct cfpkt *cfpkt_split(struct cfpkt *pkt, u16 pos)
395388
skb2->len += len2nd;
396389
return skb_to_pkt(skb2);
397390
}
398-
EXPORT_SYMBOL(cfpkt_split);
399391

400392
bool cfpkt_erroneous(struct cfpkt *pkt)
401393
{
402394
return cfpkt_priv(pkt)->erronous;
403395
}
404-
EXPORT_SYMBOL(cfpkt_erroneous);
405-
406396

407397
struct caif_payload_info *cfpkt_info(struct cfpkt *pkt)
408398
{
409399
return (struct caif_payload_info *)&pkt_to_skb(pkt)->cb;
410400
}
411-
EXPORT_SYMBOL(cfpkt_info);

‎net/caif/chnl_net.c‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,10 +83,11 @@ static int chnl_recv_cb(struct cflayer *layr, struct cfpkt *pkt)
8383
if (!priv)
8484
return -EINVAL;
8585

86+
skb = (struct sk_buff *) cfpkt_tonative(pkt);
87+
8688
/* Get length of CAIF packet. */
87-
pktlen = cfpkt_getlen(pkt);
89+
pktlen = skb->len;
8890

89-
skb = (struct sk_buff *) cfpkt_tonative(pkt);
9091
/* Pass some minimum information and
9192
* send the packet to the net stack.
9293
*/

0 commit comments

Comments
 (0)