Skip to content

Commit efea2c6

Browse files
hgndavem330
authored andcommitted
sctp: several declared/set but unused fixes
Signed-off-by: Hagen Paul Pfeifer <hagen@jauu.net> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent e143038 commit efea2c6

6 files changed

Lines changed: 1 addition & 18 deletions

File tree

‎net/sctp/associola.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1089,15 +1089,13 @@ static void sctp_assoc_bh_rcv(struct work_struct *work)
10891089
base.inqueue.immediate);
10901090
struct sctp_endpoint *ep;
10911091
struct sctp_chunk *chunk;
1092-
struct sock *sk;
10931092
struct sctp_inq *inqueue;
10941093
int state;
10951094
sctp_subtype_t subtype;
10961095
int error = 0;
10971096

10981097
/* The association should be held so we should be safe. */
10991098
ep = asoc->ep;
1100-
sk = asoc->base.sk;
11011099

11021100
inqueue = &asoc->base.inqueue;
11031101
sctp_association_hold(asoc);

‎net/sctp/input.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -948,14 +948,11 @@ static struct sctp_association *__sctp_rcv_init_lookup(struct sk_buff *skb,
948948
union sctp_addr addr;
949949
union sctp_addr *paddr = &addr;
950950
struct sctphdr *sh = sctp_hdr(skb);
951-
sctp_chunkhdr_t *ch;
952951
union sctp_params params;
953952
sctp_init_chunk_t *init;
954953
struct sctp_transport *transport;
955954
struct sctp_af *af;
956955

957-
ch = (sctp_chunkhdr_t *) skb->data;
958-
959956
/*
960957
* This code will NOT touch anything inside the chunk--it is
961958
* strictly READ-ONLY.

‎net/sctp/outqueue.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -545,13 +545,11 @@ static int sctp_outq_flush_rtx(struct sctp_outq *q, struct sctp_packet *pkt,
545545
struct sctp_transport *transport = pkt->transport;
546546
sctp_xmit_t status;
547547
struct sctp_chunk *chunk, *chunk1;
548-
struct sctp_association *asoc;
549548
int fast_rtx;
550549
int error = 0;
551550
int timer = 0;
552551
int done = 0;
553552

554-
asoc = q->asoc;
555553
lqueue = &q->retransmit;
556554
fast_rtx = q->fast_rtx;
557555

‎net/sctp/sm_make_chunk.c‎

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3375,7 +3375,6 @@ struct sctp_chunk *sctp_make_fwdtsn(const struct sctp_association *asoc,
33753375
struct sctp_fwdtsn_skip *skiplist)
33763376
{
33773377
struct sctp_chunk *retval = NULL;
3378-
struct sctp_fwdtsn_chunk *ftsn_chunk;
33793378
struct sctp_fwdtsn_hdr ftsn_hdr;
33803379
struct sctp_fwdtsn_skip skip;
33813380
size_t hint;
@@ -3388,8 +3387,6 @@ struct sctp_chunk *sctp_make_fwdtsn(const struct sctp_association *asoc,
33883387
if (!retval)
33893388
return NULL;
33903389

3391-
ftsn_chunk = (struct sctp_fwdtsn_chunk *)retval->subh.fwdtsn_hdr;
3392-
33933390
ftsn_hdr.new_cum_tsn = htonl(new_cum_tsn);
33943391
retval->subh.fwdtsn_hdr =
33953392
sctp_addto_chunk(retval, sizeof(ftsn_hdr), &ftsn_hdr);

‎net/sctp/socket.c‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2928,15 +2928,13 @@ static int sctp_setsockopt_peer_primary_addr(struct sock *sk, char __user *optva
29282928
unsigned int optlen)
29292929
{
29302930
struct sctp_sock *sp;
2931-
struct sctp_endpoint *ep;
29322931
struct sctp_association *asoc = NULL;
29332932
struct sctp_setpeerprim prim;
29342933
struct sctp_chunk *chunk;
29352934
struct sctp_af *af;
29362935
int err;
29372936

29382937
sp = sctp_sk(sk);
2939-
ep = sp->ep;
29402938

29412939
if (!sctp_addip_enable)
29422940
return -EPERM;

‎net/sctp/ulpqueue.c‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -105,11 +105,8 @@ int sctp_ulpq_tail_data(struct sctp_ulpq *ulpq, struct sctp_chunk *chunk,
105105
gfp_t gfp)
106106
{
107107
struct sk_buff_head temp;
108-
sctp_data_chunk_t *hdr;
109108
struct sctp_ulpevent *event;
110109

111-
hdr = (sctp_data_chunk_t *) chunk->chunk_hdr;
112-
113110
/* Create an event from the incoming chunk. */
114111
event = sctp_ulpevent_make_rcvmsg(chunk->asoc, chunk, gfp);
115112
if (!event)
@@ -743,11 +740,9 @@ static void sctp_ulpq_retrieve_ordered(struct sctp_ulpq *ulpq,
743740
struct sk_buff *pos, *tmp;
744741
struct sctp_ulpevent *cevent;
745742
struct sctp_stream *in;
746-
__u16 sid, csid;
747-
__u16 ssn, cssn;
743+
__u16 sid, csid, cssn;
748744

749745
sid = event->stream;
750-
ssn = event->ssn;
751746
in = &ulpq->asoc->ssnmap->in;
752747

753748
event_list = (struct sk_buff_head *) sctp_event2skb(event)->prev;

0 commit comments

Comments
 (0)