From patchwork Fri Nov 18 01:46:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li zeming X-Patchwork-Id: 22049 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp730442wrr; Thu, 17 Nov 2022 18:02:01 -0800 (PST) X-Google-Smtp-Source: AA0mqf5abHA5U1hqBIhJqjLFPZ2YXIT+34rGVNtxPjsweTAoTTW01vgS0pJlUD8340/eR2rb8fV+ X-Received: by 2002:a17:906:f106:b0:7b2:9a6b:9ac6 with SMTP id gv6-20020a170906f10600b007b29a6b9ac6mr4160719ejb.215.1668736921169; Thu, 17 Nov 2022 18:02:01 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668736921; cv=none; d=google.com; s=arc-20160816; b=Wbe2gBualIwnovjebKa7yFSafsV2SyrWskdotP5JMP6VKhVKpBDnIbFZTMtPc1WD1K LUtxIh0RxLjuSzzOqqlSsEpf01vd42DWqP+RLL2gmrwDuT6W7KxAKXD7fhbBpdBtmGr/ 9b5F4/qdvPp3mNN66XmCea/+JFlARcWgIvX2SYLxS7KzNXbkmoPyxDrSsINFulq/zFeZ A5I5PxTyh1m31l0TEkYqHf5kVBE+8EMau8hzKcTevTFUeBTqVI/DzdBqTPHE6KNBRXDB Phycc5ox3LCWI6y/EmmuMzjx6clI192ylQUsEuoGqzDRvhnIm66fNuqpmymyH4H6v/1i tzyg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=X7Aeng1ICfvb0OQM7sDZSDixW9DIi837vPlquD3ZsVw=; b=swS5mX8mZavkxbnPSRAwyg5dCZuSXopFysl/3SM+086ACFUhJv9eczsGhVvuogMPM7 MHZ2T1L/eo0wBtwQrz9jJRx/70lXuFfbmN5M+sxx9XZmRFesy9HCJWtu3/OxlemuCc5e 1JsebdokPhGWNbPRREj/Ne/dVZvgEPUJix2mq0J8mq8ptK/M6ohsh/6W0AoK+uchW+qd B2f66BMUpmzoAVpqLleiFD2mxdNyPv/genrtcVKGzLSL3AtT8viNeHkT6KN2WqxQayi2 pkVKf5HXgR2YiyBeVFrQrrKYO7G6JyuvoksZaqPwUXsncfxWbvF9YBwQmEzsPeRmOFqH T+Uw== 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 y14-20020a056402170e00b0045d5b83114esi2104262edu.112.2022.11.17.18.01.36; Thu, 17 Nov 2022 18:02:00 -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 S241051AbiKRBr6 (ORCPT + 99 others); Thu, 17 Nov 2022 20:47:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58360 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241072AbiKRBrt (ORCPT ); Thu, 17 Nov 2022 20:47:49 -0500 Received: from mail.nfschina.com (unknown [124.16.136.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 39FFD898F8; Thu, 17 Nov 2022 17:47:38 -0800 (PST) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id E6FD91E80D72; Fri, 18 Nov 2022 09:44:25 +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 7puBGY77IZMt; Fri, 18 Nov 2022 09:44:23 +0800 (CST) Received: from localhost.localdomain (unknown [219.141.250.2]) (Authenticated sender: zeming@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id D465F1E80D70; Fri, 18 Nov 2022 09:44:22 +0800 (CST) From: Li zeming To: pabeni@redhat.com, vyasevich@gmail.com, nhorman@tuxdriver.com, marcelo.leitner@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org Cc: linux-sctp@vger.kernel.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, Li zeming Subject: =?utf-8?q?=5BPATCH_v2=5D_sctp=3A_sm=5Fstatefuns=3A_Remove_unnecessa?= =?utf-8?q?ry_=E2=80=98NULL=E2=80=99_values_from_Pointer?= Date: Fri, 18 Nov 2022 09:46:42 +0800 Message-Id: <20221118014641.3035-1-zeming@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Spam-Status: No, score=1.4 required=5.0 tests=BAYES_00,RCVD_IN_SBL_CSS, SPF_HELO_NONE,SPF_NONE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: * 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?1749797485858843596?= X-GMAIL-MSGID: =?utf-8?q?1749797485858843596?= The 'packet' pointer is always set in the later code, no need to initialize it at definition time. Signed-off-by: Li zeming --- v2: Modify the submitted description. 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 f6ee7f4040c1..714605746fee 100644 --- a/net/sctp/sm_statefuns.c +++ b/net/sctp/sm_statefuns.c @@ -3781,7 +3781,7 @@ static enum sctp_disposition sctp_sf_shut_8_4_5( void *arg, struct sctp_cmd_seq *commands) { - struct sctp_packet *packet = NULL; + struct sctp_packet *packet; struct sctp_chunk *chunk = arg; struct sctp_chunk *shut;