From patchwork Tue Nov 15 02:07:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li zeming X-Patchwork-Id: 20128 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2473611wru; Mon, 14 Nov 2022 18:14:48 -0800 (PST) X-Google-Smtp-Source: AA0mqf7K9IgCikM9FgXrxd9pJzW+sYqmtOcyQ3WdUoxobGzH/cVAndFgatGuTZQZcrfNqZTU4+I6 X-Received: by 2002:a17:902:c651:b0:175:5129:f3b0 with SMTP id s17-20020a170902c65100b001755129f3b0mr2036798pls.1.1668478488625; Mon, 14 Nov 2022 18:14:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668478488; cv=none; d=google.com; s=arc-20160816; b=Mh04qbrBRczwU122e7eBZnxKa7PGVdJLS2yWytG+VwqlasMubESS5Sraqv/IVd1e9u C6CkQvGXjB6diYEgQPimUCYnUflLfPEmNVtr7KMFOUmpt+LldKJXidUSoAVV2GJfkKOe Y5I2x6200xNV4KSmaBCCo0k+8o2N7SvlXjPDACYZFW5q3lDuuXIJjfl6rvW8HCNYysVQ kHh2GOzMlABDAKI6NOOUq3F3Ty14nZ5/mq9b0FlV/GIq8puLJ2c2cX2vhJgqoHHZwuX6 LlGVOORKUer09K6qXUmSsUO5eyWDnbzcvk2EL98ZaARaUoCKEn5OiQoWiF0yzSZqAEgm 4E1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:subject:cc:to:from; bh=neb7W43fKx3oGkwdZD978gfdwkJfP2G2Qlv2UgkMgvE=; b=mMwUoqkZBAdl1FHqsYhDVNeKfVFG4vvdczT3c4CwjCA4s+ovxDfylrvWnXt2I42y9T 9q/Yg05F3rXM28Zmn8HtNS+l38lGeIlfXy8tNGPTREsahZoUNoPEqwh44uqokW7QOF6J tHEZzo9uW1jOoUhcUBKBfQSmgXTBwHwfGSfXq5FEB+nT4cJSZqCSZ8WkaWE142uzQCIo X64rNIIA3MaXcKVyI6OgRzNXK3QmvX8jIG0lMW4L6n0V25fmgsJpLzL3PHT4RWk54ShZ BPEdWdZJOGa0Q1QVeI5QMQZfjR6juLQRpuR0kubdDjeDUqzwoEG4YSt9gXIX/Dnzi+gK HXsg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r17-20020a63d911000000b0046ef67cc137si11247813pgg.522.2022.11.14.18.14.34; Mon, 14 Nov 2022 18:14:48 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231925AbiKOCHR (ORCPT + 99 others); Mon, 14 Nov 2022 21:07:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232202AbiKOCHN (ORCPT ); Mon, 14 Nov 2022 21:07:13 -0500 Received: from mail.nfschina.com (unknown [124.16.136.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id AEE121A05B; Mon, 14 Nov 2022 18:07:10 -0800 (PST) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id E6C661E80DB8; Tue, 15 Nov 2022 10:04:12 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id y99CiAy1pngm; Tue, 15 Nov 2022 10:04:10 +0800 (CST) Received: from localhost.localdomain (unknown [219.141.250.2]) (Authenticated sender: zeming@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id 2DDD61E80DB4; Tue, 15 Nov 2022 10:04:10 +0800 (CST) From: Li zeming To: vyasevich@gmail.com, nhorman@tuxdriver.com, marcelo.leitner@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com Cc: linux-sctp@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Li zeming Subject: [PATCH] sctp: sm_statefuns: Remove pointer casts of the same type Date: Tue, 15 Nov 2022 10:07:05 +0800 Message-Id: <20221115020705.3220-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,MAY_BE_FORGED, SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749526499693442731?= X-GMAIL-MSGID: =?utf-8?q?1749526499693442731?= The subh.addip_hdr pointer is also of type (struct sctp_addiphdr *), so it does not require a cast. Signed-off-by: Li zeming --- net/sctp/sm_statefuns.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/net/sctp/sm_statefuns.c b/net/sctp/sm_statefuns.c index 714605746fee..fa9c61d3000f 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c @@ -4044,7 +4044,7 @@ enum sctp_disposition sctp_sf_do_asconf_ack(struct net *net, (void *)err_param, commands); if (last_asconf) { - addip_hdr = (struct sctp_addiphdr *)last_asconf->subh.addip_hdr; + addip_hdr = last_asconf->subh.addip_hdr; sent_serial = ntohl(addip_hdr->serial); } else { sent_serial = asoc->addip_serial - 1;