Meelis Roos wrote: >> Actually, I'm backing this one out, it creates new warnings because >> callers of this function pass in a "const" pointer. > > Yes, it now seems it's not so simple. Marking it non-const there would > mark the it non-const in the whole family of sctp_state_fn_t and I'm not > sure that's the best thing to do. I guess the maintainer has better > bases for deciding what to do about it. > An alternate solution would be to make the digest a pointer, allocate it in sctp_endpoint_init() and free it in sctp_endpoint_destroy(). I guess I should have originally done it this way... 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). Make digest a pointer to fix this warning. Signed-off-by: Vlad Yasevich