From patchwork Thu Aug 3 07:42:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xin Long X-Patchwork-Id: 797044 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=vger.kernel.org (client-ip=209.132.180.67; helo=vger.kernel.org; envelope-from=netdev-owner@vger.kernel.org; receiver=) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="orJpHiw8"; dkim-atps=neutral Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3xNMVZ6mwhz9s75 for ; Thu, 3 Aug 2017 17:43:18 +1000 (AEST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751895AbdHCHnQ (ORCPT ); Thu, 3 Aug 2017 03:43:16 -0400 Received: from mail-pf0-f196.google.com ([209.85.192.196]:37423 "EHLO mail-pf0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751262AbdHCHnO (ORCPT ); Thu, 3 Aug 2017 03:43:14 -0400 Received: by mail-pf0-f196.google.com with SMTP id p13so775285pfd.4; Thu, 03 Aug 2017 00:43:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=HuLBnlYqw/yFDXncUulbSNcwx/v96mMjIJzdRro9ifA=; b=orJpHiw89xwxVi3BC7QPgkqNcfk45wqIFZhrrz66sKfkVx7VOEDh4gcNdOhxuqg3bd dzISRaUE5jiZv1vjhD33hnnyO7di/sXJg+a7QfUA24J+6igAHCzS0DNm4BbmJODllgJw wXeJI+D4FLoQCEpBbH9D5Wn9TvYPAxuVoJwycThk378xL4MzCDvIbzZBbpJYg/8gw4q6 G0RHjuy1hdJb2/yKnDxkde/5kZPFc1F3fBOj29elqPubVPS4hpicozn8h6fAGAOagZAX G4DmV+E/Oy1JBo8NI15NsMPteIRfBovfC0wS9qjZ1vRt0u20mDc024RlhkbMj7CkwEGr hGhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:in-reply-to:references; bh=HuLBnlYqw/yFDXncUulbSNcwx/v96mMjIJzdRro9ifA=; b=Huoc8XsjTbUG0Z7X9U/+7Bsd0P/G0xk7L3GRSz2HdQ+Qgr8ar4QWeaYhSFp0eros6F g2WekbJ3r/AMrFDmy0lfOxMndJKGVDhVhmY75mH/YedUjnliCCrbyub1er09MxL7V4Oq H1VgdHMF8t8IHDyn2bf60g6BgXOCYSluPgpKqc3H+3j/84FdHEtyWXkYAMNdhksFKNEy aHdHPdU70K7IA1Kh7QxDPBcfO9gC3mVErPAYoGiI4WEEB1tX88mH5P7jvbxskx9OX83o eCiy9enUwER3KDDHqkc1vZB+YvlCVcAYVcVaweC/R21ebnkMDi+3dBxI0a+B6KwYq6vq 5xSg== X-Gm-Message-State: AIVw111XLBLYDDVZcd/4kiEAr3t2GrI2GGDdtgq6jUtyhObjab+Hv9Va 5E7fv/gnxwpciQK2lvc= X-Received: by 10.84.197.129 with SMTP id n1mr892278pld.385.1501746194194; Thu, 03 Aug 2017 00:43:14 -0700 (PDT) Received: from localhost ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id s87sm66953103pfa.86.2017.08.03.00.43.13 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 03 Aug 2017 00:43:13 -0700 (PDT) From: Xin Long To: network dev , linux-sctp@vger.kernel.org Cc: Marcelo Ricardo Leitner , Neil Horman , davem@davemloft.net Subject: [PATCH net-next 04/14] sctp: remove the typedef sctp_operr_chunk_t Date: Thu, 3 Aug 2017 15:42:12 +0800 Message-Id: <61746e2a2efa75634ab632cf264ad902aa3f9685.1501745729.git.lucien.xin@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: References: <8149f8b0a190eb047abfe48a7fa79ba74e4e4544.1501745729.git.lucien.xin@gmail.com> <457c0c30e478f1ead75d3606e17519ca23daddfc.1501745729.git.lucien.xin@gmail.com> In-Reply-To: References: Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org This patch is to remove the typedef sctp_operr_chunk_t, and replace with struct sctp_operr_chunk in the places where it's using this typedef. Signed-off-by: Xin Long --- include/linux/sctp.h | 4 ++-- net/sctp/sm_statefuns.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/include/linux/sctp.h b/include/linux/sctp.h index d35bdd3..07c12e9 100644 --- a/include/linux/sctp.h +++ b/include/linux/sctp.h @@ -433,10 +433,10 @@ struct sctp_errhdr { __u8 variable[0]; }; -typedef struct sctp_operr_chunk { +struct sctp_operr_chunk { struct sctp_chunkhdr chunk_hdr; struct sctp_errhdr err_hdr; -} sctp_operr_chunk_t; +}; /* RFC 2960 3.3.10 - Operation Error * diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 7a2ba4c..3b121d2 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c @@ -2278,7 +2278,7 @@ sctp_disposition_t sctp_sf_cookie_echoed_err(struct net *net, /* Make sure that the ERROR chunk has a valid length. * The parameter walking depends on this as well. */ - if (!sctp_chunk_length_valid(chunk, sizeof(sctp_operr_chunk_t))) + if (!sctp_chunk_length_valid(chunk, sizeof(struct sctp_operr_chunk))) return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, commands); @@ -3317,7 +3317,7 @@ sctp_disposition_t sctp_sf_operr_notify(struct net *net, return sctp_sf_pdiscard(net, ep, asoc, type, arg, commands); /* Make sure that the ERROR chunk has a valid length. */ - if (!sctp_chunk_length_valid(chunk, sizeof(sctp_operr_chunk_t))) + if (!sctp_chunk_length_valid(chunk, sizeof(struct sctp_operr_chunk))) return sctp_sf_violation_chunklen(net, ep, asoc, type, arg, commands); sctp_walk_errors(err, chunk->chunk_hdr);