netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] warning in SCTP
@ 2006-11-02  7:29 Meelis Roos
  2006-11-02  8:16 ` David Miller
  0 siblings, 1 reply; 11+ messages in thread
From: Meelis Roos @ 2006-11-02  7:29 UTC (permalink / raw)
  To: netdev, Sridhar Samudrala, lksctp-developers


   CC [M]  net/sctp/sm_make_chunk.o
net/sctp/sm_make_chunk.c: In function 'sctp_unpack_cookie':
net/sctp/sm_make_chunk.c:1358: warning: initialization discards qualifiers from pointer target type

The reason is that sctp_unpack_cookie() takes a const struct 
sctp_endpoint and modifies the digest in it (digest being embedded in 
the struct, not a pointer). So sctp_unpack_cookie really does not use 
the argument as const, mark it as such.

Signed-off-by: Meelis Roos <mroos@linux.ee>

diff --git a/include/net/sctp/sm.h b/include/net/sctp/sm.h
index de313de..ef80489 100644
--- a/include/net/sctp/sm.h
+++ b/include/net/sctp/sm.h
@@ -272,7 +272,7 @@ void sctp_generate_heartbeat_event(unsig

  void sctp_ootb_pkt_free(struct sctp_packet *);

-struct sctp_association *sctp_unpack_cookie(const struct sctp_endpoint *,
+struct sctp_association *sctp_unpack_cookie(struct sctp_endpoint *,
  				       const struct sctp_association *,
  				       struct sctp_chunk *,
  				       gfp_t gfp, int *err,
diff --git a/net/sctp/sm_make_chunk.c b/net/sctp/sm_make_chunk.c
index 507dff7..3d41a9c 100644
--- a/net/sctp/sm_make_chunk.c
+++ b/net/sctp/sm_make_chunk.c
@@ -1346,7 +1346,7 @@ nodata:

  /* Unpack the cookie from COOKIE ECHO chunk, recreating the association.  */
  struct sctp_association *sctp_unpack_cookie(
-	const struct sctp_endpoint *ep,
+	struct sctp_endpoint *ep,
  	const struct sctp_association *asoc,
  	struct sctp_chunk *chunk, gfp_t gfp,
  	int *error, struct sctp_chunk **errp)

-- 
Meelis Roos (mroos@linux.ee)

^ permalink raw reply related	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2006-11-10  0:30 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-11-02  7:29 [PATCH] warning in SCTP Meelis Roos
2006-11-02  8:16 ` David Miller
2006-11-02  8:22   ` Meelis Roos
2006-11-02  8:30     ` Oleg Verych
2006-11-02  8:39   ` David Miller
2006-11-02  8:49     ` Meelis Roos
2006-11-02  9:12       ` Meelis Roos
2006-11-02  9:22     ` Meelis Roos
2006-11-02 16:09       ` Vlad Yasevich
2006-11-02 18:29         ` Sridhar Samudrala
2006-11-10  0:30           ` David Miller

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).