Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4246660rwb; Sat, 3 Dec 2022 21:27:05 -0800 (PST) X-Google-Smtp-Source: AA0mqf4JM2ZUWvOYTmm58AHy+cIs+IFc2JJ+zkIEATpZjwnc49iLvMIwF1H5vgV+bZOb1vnXG0Hh X-Received: by 2002:a17:902:eb13:b0:189:44a2:4cb0 with SMTP id l19-20020a170902eb1300b0018944a24cb0mr53963066plb.44.1670131625463; Sat, 03 Dec 2022 21:27:05 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670131625; cv=none; d=google.com; s=arc-20160816; b=w+/YY8K2CntxVwni1r767fBpXTYZzZz2K+iJTm4w3F0+fkXnTcWkJ9781X3qRthjg2 w+/UEo2aUjbNU7/5Rq1u5p60d5UZ5gnbUs095E0vcW0qHn/AwKNjJQd4NkxYgekWFwZC IX/YlJo9axs6ASb9ELlKeZQhnqCsqeg6v6Gcu/7M3OLADc/pbFgx4G6YHrhN+KBsm8kJ BDloypiuw+epyMkD2nt2wNtQztjgWuq1lXt7KBkC7KzSWQENhVpqMC5W335oMR+J71jg DW9OdJ1ynRlQHc+SHZYfmrsXxol/I5inApI9Oq6ZgexfOP/i2U1thZw2Z68S65UjFoog 1OUQ== 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=A94Jx5gpZnDfPPcO1nelBjLpEijULp99U4xEQt4BRR8=; b=T5HDm38jTNI4AXvdiDALlCa0JZrAa2WIiupUauHXh53OTVrrN2dxteMMuO/4u6ytHo xqIEq7r68Q7WMhsrw1jVTZEY9JvpgNF0C0JX2kbg8BH2zg21pazFWtaPU8PWNsAt+zFU UojDTc4iL1ptuWFnRVNfP3MNvD0U53GhjxgSTsIP321qrYSq2KKjm2U8igmgM2ejAvdL zSCYgUa6CTcMnWkZpmafebjF4Td/BSI3rk85HFP+0QaenXlSqXhAW1oXldCd+meHdhm7 qlZEywbAjwKLtptf5p5YtRNF6VVgIoOO1DDtVVsmijMgkf8xNZtbAQm/ytOfFwRwVeYC Y4QQ== 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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b10-20020a6541ca000000b0047769403088si11479377pgq.627.2022.12.03.21.26.55; Sat, 03 Dec 2022 21:27:05 -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; dmarc=fail (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=huawei.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229870AbiLDDOr (ORCPT + 82 others); Sat, 3 Dec 2022 22:14:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45346 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229765AbiLDDOq (ORCPT ); Sat, 3 Dec 2022 22:14:46 -0500 Received: from szxga08-in.huawei.com (szxga08-in.huawei.com [45.249.212.255]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0505D1903B for ; Sat, 3 Dec 2022 19:14:44 -0800 (PST) Received: from dggpemm500014.china.huawei.com (unknown [172.30.72.54]) by szxga08-in.huawei.com (SkyGuard) with ESMTP id 4NPsGG1pZgz15MvX; Sun, 4 Dec 2022 11:13:58 +0800 (CST) Received: from localhost.localdomain (10.175.112.125) by dggpemm500014.china.huawei.com (7.185.36.153) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.31; Sun, 4 Dec 2022 11:14:42 +0800 From: Wupeng Ma To: , , , CC: , , Subject: [PATCH -next 1/1] percpu: cleanup invalid assignment to err in pcpu_alloc Date: Sun, 4 Dec 2022 11:14:30 +0800 Message-ID: <20221204031430.662169-1-mawupeng1@huawei.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [10.175.112.125] X-ClientProxiedBy: dggems704-chm.china.huawei.com (10.3.19.181) To dggpemm500014.china.huawei.com (7.185.36.153) X-CFilter-Loop: Reflected X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 From: Ma Wupeng Assignment to err if is_atomic is true will never be used since warn message can only be shown if is_atomic is false after label fail. So drop it. Signed-off-by: Ma Wupeng --- mm/percpu.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mm/percpu.c b/mm/percpu.c index acd78da0493b..df86d79325b2 100644 --- a/mm/percpu.c +++ b/mm/percpu.c @@ -1817,10 +1817,8 @@ static void __percpu *pcpu_alloc(size_t size, size_t align, bool reserved, spin_unlock_irqrestore(&pcpu_lock, flags); - if (is_atomic) { - err = "atomic alloc failed, no space left"; + if (is_atomic) goto fail; - } /* No space left. Create a new chunk. */ if (list_empty(&pcpu_chunk_lists[pcpu_free_slot])) { -- 2.25.1