Hi Marcelo,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on net-next/master]

url:    
https://github.com/0day-ci/linux/commits/Marcelo-Ricardo-Leitner/sctp-allow-sctp_init_cause-to-return-errors/20180430-073613
config: i386-randconfig-s1-201817 (attached as .config)
compiler: gcc-6 (Debian 6.4.0-9) 6.4.0 20171026
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

All errors (new ones prefixed by >>):

   net/sctp/sm_make_chunk.c: In function 'sctp_make_op_error_limited':
>> net/sctp/sm_make_chunk.c:1260:9: error: implicit declaration of function 
>> 'sctp_mtu_payload' [-Werror=implicit-function-declaration]
     size = sctp_mtu_payload(sp, size, sizeof(struct sctp_errhdr));
            ^~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors

vim +/sctp_mtu_payload +1260 net/sctp/sm_make_chunk.c

  1240  
  1241  /* Create an Operation Error chunk of a fixed size, specifically,
  1242   * min(asoc->pathmtu, SCTP_DEFAULT_MAXSEGMENT) - overheads.
  1243   * This is a helper function to allocate an error chunk for for those
  1244   * invalid parameter codes in which we may not want to report all the
  1245   * errors, if the incoming chunk is large. If it can't fit in a single
  1246   * packet, we ignore it.
  1247   */
  1248  static inline struct sctp_chunk *sctp_make_op_error_limited(
  1249                                          const struct sctp_association 
*asoc,
  1250                                          const struct sctp_chunk *chunk)
  1251  {
  1252          size_t size = SCTP_DEFAULT_MAXSEGMENT;
  1253          struct sctp_sock *sp = NULL;
  1254  
  1255          if (asoc) {
  1256                  size = min_t(size_t, size, asoc->pathmtu);
  1257                  sp = sctp_sk(asoc->base.sk);
  1258          }
  1259  
> 1260          size = sctp_mtu_payload(sp, size, sizeof(struct sctp_errhdr));
  1261  
  1262          return sctp_make_op_error_space(asoc, chunk, size);
  1263  }
  1264  

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

Attachment: .config.gz
Description: application/gzip

Reply via email to