From mboxrd@z Thu Jan 1 00:00:00 1970 From: Marcelo Ricardo Leitner Subject: [PATCH net-next 0/2] sctp: unify sctp_make_op_error_fixed and sctp_make_op_error_space Date: Sun, 29 Apr 2018 12:56:30 -0300 Message-ID: Cc: linux-sctp@vger.kernel.org, Vlad Yasevich , Neil Horman , Xin Long To: netdev@vger.kernel.org Return-path: Received: from mail-qt0-f194.google.com ([209.85.216.194]:44361 "EHLO mail-qt0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753849AbeD2QdR (ORCPT ); Sun, 29 Apr 2018 12:33:17 -0400 Sender: netdev-owner@vger.kernel.org List-ID: These two variants are very close to each other and can be merged to avoid code duplication. That's what this patchset does. First, we allow sctp_init_cause to return errors, which then allow us to add sctp_make_op_error_limited that handles both situations. Marcelo Ricardo Leitner (2): sctp: allow sctp_init_cause to return errors sctp: add sctp_make_op_error_limited and reuse inner functions include/net/sctp/sm.h | 2 +- net/sctp/sm_make_chunk.c | 134 ++++++++++++++++++----------------------------- 2 files changed, 52 insertions(+), 84 deletions(-)