From patchwork Tue Sep 26 02:24:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Li kunyu X-Patchwork-Id: 144685 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:cae8:0:b0:403:3b70:6f57 with SMTP id r8csp1623421vqu; Mon, 25 Sep 2023 19:25:15 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGO23cliqA+ypKLCIQZ2Pp2mac1OwT0Vcwb6yFRM7lL1KcUOS8Dn5hYjgQq/dvBIyM3PXV/ X-Received: by 2002:a17:903:2285:b0:1b5:561a:5c9a with SMTP id b5-20020a170903228500b001b5561a5c9amr8146898plh.39.1695695114629; Mon, 25 Sep 2023 19:25:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695695114; cv=none; d=google.com; s=arc-20160816; b=m3M8awdkSVhFnT+9STSvzO9F/vWwN76kxbMBw1He0WXOyZd+vF9pO8JRSZKmHASwv/ RzKMVnc++I3KPsm9fvHcVHCNFzg/kMJySEhocNHPJLee9k8fIOKUi2lRp0d7UbAB2UjW 4CSRTfeGPx2nMTmjFLjFMyMgQReRwAhMorl/QvtbxrgEKr/EeUnQzohaV1vUI6KYJBnt MGQImdMPxKYqAF5/4T317UKOU21ho1AScR1XPwHFY3QhxJoHulVDSnyNVaRg0zLR9COT m2KnRIRtmmeGFx+v2uPEWHVMxo0yWL47s5M0psVRtfCy1b4F7fSQiA7CuAlx8f9evdEO J56Q== 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=HO1EkwWb9OaK1pCPSXfCpuWe3ff7FjiI86eID8s1M2w=; fh=p1fkp93mR/Srvrc2cGP2TGzUyn8t3Fk4/JYZ63B+8Zw=; b=0/1Y325McSFzLOF5pC/HInSCzvxjVbv+YpamD6OOgGUrLmqajTmGOy/+f3ZO1niQ5c A44lpqOZC5oqQO5nz383kZTL4U/1GIGwIqT16lHT1chm0fRDxoNFQrHyfrE7LL4qurFI qHqiwjFuMDxG7HX1FPpRIUE+fuMGsxKugrhqse+ypJzwoZ5gO/D+uD/0rvSqfDxwZYkD vgiGgtE4HKxnsg5LKD3TSrhRQC79A+SdjO2E1EzA2Jd3a2IfVXQbZbGb6nl03kqGAoTj sx7oHrGbMcTqkYMWR/wd+D1DNqP14uAz0a/7B/DqCw+V2eV5JHdPVM+CJvAonAjTUnNE LmkQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id y12-20020a170903010c00b001c5f9de7a35si6639894plc.109.2023.09.25.19.25.14 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 25 Sep 2023 19:25:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by snail.vger.email (Postfix) with ESMTP id 08A55816693E; Mon, 25 Sep 2023 19:24:46 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231843AbjIZCYn (ORCPT + 27 others); Mon, 25 Sep 2023 22:24:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230054AbjIZCYk (ORCPT ); Mon, 25 Sep 2023 22:24:40 -0400 Received: from mail.nfschina.com (unknown [42.101.60.195]) by lindbergh.monkeyblade.net (Postfix) with SMTP id 4F292BF for ; Mon, 25 Sep 2023 19:24:34 -0700 (PDT) Received: from localhost.localdomain (unknown [219.141.250.2]) by mail.nfschina.com (Maildata Gateway V2.8.8) with ESMTPA id 53C2960520007; Tue, 26 Sep 2023 10:24:18 +0800 (CST) X-MD-Sfrom: kunyu@nfschina.com X-MD-SrcIP: 219.141.250.2 From: Li kunyu To: oleg@redhat.com, peterz@infradead.org, mcgrof@kernel.org, mathieu.desnoyers@efficios.com, elver@google.com, viro@zeniv.linux.org.uk, dvyukov@google.com, vincent.whitchurch@axis.com, michael.christie@oracle.com Cc: linux-kernel@vger.kernel.org, Li kunyu Subject: [PATCH] =?utf-8?q?kernel/signal=3A_Remove_unnecessary_=E2=80=98NULL?= =?utf-8?q?=E2=80=99_values_from_ucounts?= Date: Tue, 26 Sep 2023 10:24:10 +0800 Message-Id: <20230926022410.4280-1-kunyu@nfschina.com> X-Mailer: git-send-email 2.18.2 MIME-Version: 1.0 X-Spam-Status: No, score=-1.1 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_BLOCKED,RDNS_NONE,SPF_HELO_NONE,SPF_PASS autolearn=no 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (snail.vger.email [0.0.0.0]); Mon, 25 Sep 2023 19:24:46 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778065200586351520 X-GMAIL-MSGID: 1778065200586351520 ucounts is assigned first, so it does not need to initialize the assignment. Signed-off-by: Li kunyu Acked-by: Oleg Nesterov --- kernel/signal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/kernel/signal.c b/kernel/signal.c index 09019017d669..27f6cd37ac4f 100644 --- a/kernel/signal.c +++ b/kernel/signal.c @@ -415,7 +415,7 @@ __sigqueue_alloc(int sig, struct task_struct *t, gfp_t gfp_flags, int override_rlimit, const unsigned int sigqueue_flags) { struct sigqueue *q = NULL; - struct ucounts *ucounts = NULL; + struct ucounts *ucounts; long sigpending; /*