From patchwork Fri Aug 26 07:19:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: CGEL X-Patchwork-Id: 12955609 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 48C6AECAAD2 for ; Fri, 26 Aug 2022 07:19:12 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id D2B83940008; Fri, 26 Aug 2022 03:19:11 -0400 (EDT) Received: by kanga.kvack.org (Postfix, from userid 40) id CDAC4940007; Fri, 26 Aug 2022 03:19:11 -0400 (EDT) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id BA4BE940008; Fri, 26 Aug 2022 03:19:11 -0400 (EDT) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0010.hostedemail.com [216.40.44.10]) by kanga.kvack.org (Postfix) with ESMTP id AC2DA940007 for ; Fri, 26 Aug 2022 03:19:11 -0400 (EDT) Received: from smtpin18.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay04.hostedemail.com (Postfix) with ESMTP id 848B81A0279 for ; Fri, 26 Aug 2022 07:19:11 +0000 (UTC) X-FDA: 79840892502.18.AD69939 Received: from mail-pf1-f171.google.com (mail-pf1-f171.google.com [209.85.210.171]) by imf29.hostedemail.com (Postfix) with ESMTP id 3685A12000A for ; Fri, 26 Aug 2022 07:19:11 +0000 (UTC) Received: by mail-pf1-f171.google.com with SMTP id 199so734544pfz.2 for ; Fri, 26 Aug 2022 00:19:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc; bh=mujhyhflTSHBMZ6M+FlaiVGD/9sUOC8oxd5fz31ysDM=; b=nXbk6Xa7ljhTr+XpcTgwjQLVifDZi0r6YmywVy2E4uN9ZB2LuLIiQL0eMft4U10UMd VbVbC6HHGhcH8eCpRAnr/5ZWniwrMVVfNA3tV1c7zOZNiNuhbrGxwmU/O3Og/wiYd9kt WnyWu8uPsy/3JvJ5u3H+msCNzJa7C1q4wPMVRsnCk5XjFBNkLUQ8BUo5zVZ7t+eKxGmf ltWJ7iH06DYKcIp20W4nXFi4yaSKdfk7x8yUcYZdWESvwFqdqALooDpT5IXXjQTgn491 eORND/IHqkZ96MZ3+I+oAsSxcivltlNcgvLq1pqcDaHlxFmUgjled49zRPjR53+YIQhF nyCA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc; bh=mujhyhflTSHBMZ6M+FlaiVGD/9sUOC8oxd5fz31ysDM=; b=CnRKmCwhHZ38+q+/KW4+K5awYhpt4COPb6kJLtq995ivlZm1v9e7xhiWEJAi6aNCfA nAEFsS000f/XOFNJgF5VEjOjpZozGwuSXi8rihPcM1uh7sZCVYRAxg72SD4zswfGQXcr u2aQb7U4T581DvLR+xZdzfAjw0cSvcU0nruyVdLcSC6qKBvh9pg5dvgpLjOtlGysSOH1 CkntY8hF35OJj3gSnDwXDdhj9G+6W7g7GTOwtT7oZupgaM3X7nuUflamPpkQGhUlNwzb A3goHYGCNrM4M4ratDBn7d1r8sscdIzS8Ow3p+xvjw21KPgfHZBWPxHNN1jpuQ4i+5F1 n3eA== X-Gm-Message-State: ACgBeo3+On8R9bN6qur0dhNwy+arGbvmyo96ashpe8/2OhocgakdJflI BsiK6yHJubimt8jPYUXTj6c= X-Google-Smtp-Source: AA6agR5hspO+joqEkdhIjD3vEkFNquPzvu/3aHDWt6Zr3KBQv/hUgo8ISs+7yCwTe8npD/1YfGbf8g== X-Received: by 2002:a05:6a00:ad1:b0:530:2cb7:84de with SMTP id c17-20020a056a000ad100b005302cb784demr2728749pfl.3.1661498350189; Fri, 26 Aug 2022 00:19:10 -0700 (PDT) Received: from localhost.localdomain ([193.203.214.57]) by smtp.gmail.com with ESMTPSA id z14-20020a1709027e8e00b00172f0184b54sm773002pla.156.2022.08.26.00.19.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 26 Aug 2022 00:19:09 -0700 (PDT) From: cgel.zte@gmail.com X-Google-Original-From: ye.xingchen@zte.com.cn To: akpm@linux-foundation.org Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, ye xingchen , Zeal Robot Subject: [PATCH linux-next] mm: backing-dev: Remove the unneeded result variable Date: Fri, 26 Aug 2022 07:19:06 +0000 Message-Id: <20220826071906.252419-1-ye.xingchen@zte.com.cn> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 ARC-Authentication-Results: i=1; imf29.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=nXbk6Xa7; spf=pass (imf29.hostedemail.com: domain of cgel.zte@gmail.com designates 209.85.210.171 as permitted sender) smtp.mailfrom=cgel.zte@gmail.com; dmarc=pass (policy=none) header.from=gmail.com ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1661498351; a=rsa-sha256; cv=none; b=yL9Znvtv5DXEMPCof4yh9CiV3kRbFxQ+MnarCng+p4rEotFryvU/Djs6cdW01XiL5hrcbI TJOtLZpTMVZq2LBhMFUDBNGIWuwth3wVaghzSEyqUQukfqKHPZOxUlpO3/W1BHmZr68Ri9 icrZ87XgmFLYbLYl8RBgf3CnI8lM6uQ= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1661498351; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references:dkim-signature; bh=mujhyhflTSHBMZ6M+FlaiVGD/9sUOC8oxd5fz31ysDM=; b=0hqGyPc2R1nhmrkhaAAVZF1/fj7I9Wcmtxly4+CIFwxygtFAhN8vl+P5sR7ttF328BPBff QNw0O0UWJ5hFPNkaNy+zuc2V372bkGIBIGWjPmogvbT8u3yQoYwk7Wfm4td8OfSoXSyR4e mAYcKz/D4pOjOJxxW66dQofrqXJOYm0= X-Rspam-User: X-Rspamd-Queue-Id: 3685A12000A X-Stat-Signature: sy9hb5w6579ibxa1ry654ka63fa6rjdg Authentication-Results: imf29.hostedemail.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=nXbk6Xa7; spf=pass (imf29.hostedemail.com: domain of cgel.zte@gmail.com designates 209.85.210.171 as permitted sender) smtp.mailfrom=cgel.zte@gmail.com; dmarc=pass (policy=none) header.from=gmail.com X-Rspamd-Server: rspam01 X-HE-Tag: 1661498351-311357 X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: From: ye xingchen Return the value cgwb_bdi_init() directly instead of storing it in another redundant variable. Reported-by: Zeal Robot Signed-off-by: ye xingchen --- mm/backing-dev.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/mm/backing-dev.c b/mm/backing-dev.c index 95550b8fa7fe..e1e6f293a0cd 100644 --- a/mm/backing-dev.c +++ b/mm/backing-dev.c @@ -776,8 +776,6 @@ static void cgwb_remove_from_bdi_list(struct bdi_writeback *wb) int bdi_init(struct backing_dev_info *bdi) { - int ret; - bdi->dev = NULL; kref_init(&bdi->refcnt); @@ -788,9 +786,7 @@ int bdi_init(struct backing_dev_info *bdi) INIT_LIST_HEAD(&bdi->wb_list); init_waitqueue_head(&bdi->wb_waitq); - ret = cgwb_bdi_init(bdi); - - return ret; + return cgwb_bdi_init(bdi); } struct backing_dev_info *bdi_alloc(int node_id)