From patchwork Wed Jul 5 00:32:21 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Xin Long X-Patchwork-Id: 784383 X-Patchwork-Delegate: davem@davemloft.net Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 3x2MKZ63F3z9s78 for ; Wed, 5 Jul 2017 10:33:06 +1000 (AEST) Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="k7bNriNn"; dkim-atps=neutral Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752383AbdGEAdE (ORCPT ); Tue, 4 Jul 2017 20:33:04 -0400 Received: from mail-pf0-f194.google.com ([209.85.192.194]:36104 "EHLO mail-pf0-f194.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752368AbdGEAdD (ORCPT ); Tue, 4 Jul 2017 20:33:03 -0400 Received: by mail-pf0-f194.google.com with SMTP id z6so32406198pfk.3; Tue, 04 Jul 2017 17:33:02 -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=u7pTOoT0JoOvJ5z+7T0n/CuWcTD215nz3HT5LUL65xQ=; b=k7bNriNnxvLnTO8yYfJY5wMjxkj53cJRD9X/cRsmqDV1zVqaFwJ054tj8UUgAVVh+F DiDyYQlxmUpLwke3kS/fdn8iZXJXHfTEIP1utt+bFyTlQlYJmfFrxL+bebQSMj+Tp51V XcAcRcON988HuAp+jHb2oHjUbePLy9OjIxjAKW9JNjeHrNodXui2hmofA+2tw2GFJr8M GfwZ7aedoODDaqFtDC1YJmdR3xbT0OOihhS67maXfQ0NCwVdO+rmMCM+yDAx5dQsNwrJ Y90pcYr72Mldk10nRJeatuxPO/WfDiJYky4hQxYKbAvKQajIw6XSWcyrTCApMUmHaGAk Tajg== 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=u7pTOoT0JoOvJ5z+7T0n/CuWcTD215nz3HT5LUL65xQ=; b=kGPjudI9WgK2pLO9QVYnMSCS5AuviZ35UjXhaCa3b6ejvHYUULGvdHZRQxud4Q/m/Z 4qoiKZWqR25TLhubiwVjW67ShTasulaZYKEj/BJL4CUX6QBBxUBdkA6zAjfxC7cI/zmH PSO2p9e9qShzaX5iSU49YkZNhNvYMSxnyx1k4WzdVIRdKv2VIjF7woU13rNzdnJn1tXl WMiXDcZFJwFdgqjt94QB6gl43A90cwhqjZQsO86GwCuBt5w0refiA+X3p/vYNTlP8Wy3 WT82aG8/7n8OxRBJTHOAjqkrfxOD/hfPW7V9n+niBPwus9GWxBoneMG/G41LVThguDjZ W9tA== X-Gm-Message-State: AIVw113SPazPbYO1HQbVuQh6XcPToDmEPA2vBLYW0MGy7WAZwAIkkgmJ aralVAgOJB+ftqMb7wc= X-Received: by 10.84.217.139 with SMTP id p11mr19155486pli.214.1499214782252; Tue, 04 Jul 2017 17:33:02 -0700 (PDT) Received: from localhost ([209.132.188.80]) by smtp.gmail.com with ESMTPSA id k129sm43538214pfc.87.2017.07.04.17.33.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 04 Jul 2017 17:33:01 -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 03/11] sctp: remove the typedef sctp_cookie_preserve_param_t Date: Wed, 5 Jul 2017 08:32:21 +0800 Message-Id: <090c24ed353f37a2bbce41ecc5feec6fc8cffa8b.1499214692.git.lucien.xin@gmail.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <77fa3a776118873a7e5d8203dd59011995b0e865.1499214692.git.lucien.xin@gmail.com> References: <6ba452f31d10acdc95f3cf679ecab15833f7843c.1499214692.git.lucien.xin@gmail.com> <77fa3a776118873a7e5d8203dd59011995b0e865.1499214692.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_cookie_preserve_param_t, and replace with struct sctp_cookie_preserve_param in the places where it's using this typedef. It is also to fix some indents in sctp_sf_do_5_2_6_stale(). Signed-off-by: Xin Long --- include/linux/sctp.h | 6 +++--- net/sctp/sm_statefuns.c | 11 +++++------ 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/include/linux/sctp.h b/include/linux/sctp.h index 6b45c8a..d8f9d8f 100644 --- a/include/linux/sctp.h +++ b/include/linux/sctp.h @@ -285,10 +285,10 @@ struct sctp_ipv6addr_param { }; /* Section 3.3.2.1 Cookie Preservative (9) */ -typedef struct sctp_cookie_preserve_param { +struct sctp_cookie_preserve_param { struct sctp_paramhdr param_hdr; - __be32 lifespan_increment; -} sctp_cookie_preserve_param_t; + __be32 lifespan_increment; +}; /* Section 3.3.2.1 Host Name Address (11) */ typedef struct sctp_hostname_param { diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index b2a74c3..ae4c48c 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c @@ -2336,13 +2336,12 @@ static sctp_disposition_t sctp_sf_do_5_2_6_stale(struct net *net, void *arg, sctp_cmd_seq_t *commands) { - struct sctp_chunk *chunk = arg; - u32 stale; - sctp_cookie_preserve_param_t bht; - sctp_errhdr_t *err; - struct sctp_chunk *reply; - struct sctp_bind_addr *bp; int attempts = asoc->init_err_counter + 1; + struct sctp_chunk *chunk = arg, *reply; + struct sctp_cookie_preserve_param bht; + struct sctp_bind_addr *bp; + sctp_errhdr_t *err; + u32 stale; if (attempts > asoc->max_init_attempts) { sctp_add_cmd_sf(commands, SCTP_CMD_SET_SK_ERR,