Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp6318047rwb; Mon, 14 Nov 2022 18:25:46 -0800 (PST) X-Google-Smtp-Source: AA0mqf7ZCjg9EXOd0H5GRiAPKj6aLjhGLFF8A1zli1ob33vXil31FGuEbW0h7D1riCaW5+mqrqll X-Received: by 2002:a17:902:6b8c:b0:185:4880:91cd with SMTP id p12-20020a1709026b8c00b00185488091cdmr1933915plk.130.1668479146350; Mon, 14 Nov 2022 18:25:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668479146; cv=none; d=google.com; s=arc-20160816; b=dY7dA0UA/JPSh2+28svPiFj6GkeEE3wmKIcA/i6UXBy9MPXDAr6sWUmh1H+zeurQrH bJeubepX8ArFmYxoYMLRwrywyqSjtUyb7Bt7r/hFrWIm6A20gGm6zJQJ5gns0W9Yq7m3 wZR6HGRrJ4VhiKqYirXR71J4/W3Z+DGPjveOSfzI/vQ8b82J6syhdn6hb7v5eb3hSz7A WYegJR0o3TN0YlCSxNqleaTkxgVRPICcmgLfLsXCKRt+5mJcD0r22Tdp6MflTkhkWKxL beRFjTULkuPMoJxV/JK0ta6KXznjHoYY99WvyUJXaILiq1ZlkJSylQbZrzYA8DM2PoSD Sy+w== 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id x19-20020a170902b41300b001871e838ba9si10321805plr.344.2022.11.14.18.25.34; Mon, 14 Nov 2022 18:25:46 -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 + 88 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 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; -- 2.18.2