From patchwork Tue Jan 22 15:21:11 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg Kroah-Hartman X-Patchwork-Id: 10775721 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id EEB241390 for ; Tue, 22 Jan 2019 15:22:11 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DDDDB2AFE6 for ; Tue, 22 Jan 2019 15:22:11 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DC4492AFEE; Tue, 22 Jan 2019 15:22:11 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7AD232AFE7 for ; Tue, 22 Jan 2019 15:22:11 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 40D8D8E0006; Tue, 22 Jan 2019 10:22:10 -0500 (EST) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 3BC7E8E0001; Tue, 22 Jan 2019 10:22:10 -0500 (EST) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 2ABB48E0006; Tue, 22 Jan 2019 10:22:10 -0500 (EST) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pl1-f199.google.com (mail-pl1-f199.google.com [209.85.214.199]) by kanga.kvack.org (Postfix) with ESMTP id E1A708E0001 for ; Tue, 22 Jan 2019 10:22:09 -0500 (EST) Received: by mail-pl1-f199.google.com with SMTP id g13so15594481plo.10 for ; Tue, 22 Jan 2019 07:22:09 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:from:to:cc:subject:date :message-id:mime-version:content-transfer-encoding; bh=lMFDerOmQoL/jH74LNVxrqhy0OaeeP5R+FQHLa/zOPM=; b=tuLdAgSXOwmFR0+ZWYegbq4e27FBW3K/3xvwsRtAjFy9zc7YQf10sqMe/Io5gPEkP1 wiDXg8jMHxtMs0TExZjBeXuVesH6CQfFCUtui+X966cz6bPUGuxSLLOciNt0VwBPYJDv q5yu9kGgJteCRdyvLggdVif1Xe4aGO6D0uiqtu9zQmeCXjmJkmWc8HYbDhMSJU0056Uc 9H/7GPri2rqtNiE0LQ8OIuzGxp9f4xr+msZXb1qqm5k93YnH1gXzz8hViTvOGEU7YDtP HJBVO2YbjwCNXHkIpgwFfkcAwCVcStclYqz2f25M2VLyoVypviu7HTUqIszt3QUqMBbi T7Pw== X-Gm-Message-State: AJcUukeLEaz0J3ZzNM47YcJXlRIH0YcnZdP5UFjbTG/60lgmHTcO9B4b 1Pd91idxp4b2oype/QrE+9M3i3t9+lWZ4jJcs3nRvyY6QHQ5E9Dphp/ysTNJ/UHkXshx1dPy1Zg mTw4Ol6rznotk9Kr7AlkKgbsROPGjmmPV6YzbESyxkThLfmca10vktESpBzy7uBg= X-Received: by 2002:a17:902:e290:: with SMTP id cf16mr35279586plb.81.1548170529557; Tue, 22 Jan 2019 07:22:09 -0800 (PST) X-Google-Smtp-Source: ALg8bN7A8szA4/G+pbBMuVPpMocHKSoKabJovV8dnwxjz8ClQLTwhUr6bXd0OeTU3IFmsQxXbqVA X-Received: by 2002:a17:902:e290:: with SMTP id cf16mr35279566plb.81.1548170529004; Tue, 22 Jan 2019 07:22:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1548170528; cv=none; d=google.com; s=arc-20160816; b=L1ejB0WvtQo4OGcyIf+dW4+Ecnd65nWRc3UumIO4HdhERmvrRbRkQkYl/DPa+yMvwH 6eEyEB4pX2yiQZsnOvkD+gnxnmKSMiCGazYYUFl/Wc1rkcD85O6jjEMXZnEh3j5fSSTW fwsKGWhY8nXLWfh5ZLl7bG5Op4VpFig6tG/LfQtVGuaXZvCPQyuwoCTwXb8cnFvTqkDR OTlvA2ZAyRqO33Sv0b2Me6ZyWAjs0oFHfDm2NDjlMaSqGBietiwwKDA9ZjKlE8ML7vjv p+3KWCE3tro+g3UvDX7iIkzh35xW8bg1RWGwUHN1gFFOm+Ovqvq/Dg8gontMOKUhwMgW gwnQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=lMFDerOmQoL/jH74LNVxrqhy0OaeeP5R+FQHLa/zOPM=; b=pFkBcSKqLVsn1bG606BVlhPYNGtmoLxq2mRmyZrneDK3JUMUpawLMPw5nXJDL/GXrP 3N9OKpLYAMmkBZirbTfBKI8IksaLKoToOhMk8vcOnjPCC/xEEed6ji+yQwQDyHzToycf 7wF9fXciUrOBSsmP1SWZYPh5Or1/6c1V4uFkpc7/ggDf4yyePxvAAmQI9CqmGUz3V740 HWJ83Rp9k1pm2qThWLPGAgLyzlGtDdKxSSsq1SB1Xn0HDdLgMdKvkLloZNJTzPXJxcLk GPRtM0ATJ8pfcwpuGldW+Fe8ATmGIgE8BxfKVsV6lFRsRoxbwanXtfX4uGSL+tuRye/1 r2kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=k06AHnOw; spf=pass (google.com: domain of srs0=915k=p6=linuxfoundation.org=gregkh@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom="SRS0=915k=P6=linuxfoundation.org=gregkh@kernel.org" Received: from mail.kernel.org (mail.kernel.org. [198.145.29.99]) by mx.google.com with ESMTPS id l4si16745108pgr.346.2019.01.22.07.22.08 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 22 Jan 2019 07:22:08 -0800 (PST) Received-SPF: pass (google.com: domain of srs0=915k=p6=linuxfoundation.org=gregkh@kernel.org designates 198.145.29.99 as permitted sender) client-ip=198.145.29.99; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=k06AHnOw; spf=pass (google.com: domain of srs0=915k=p6=linuxfoundation.org=gregkh@kernel.org designates 198.145.29.99 as permitted sender) smtp.mailfrom="SRS0=915k=P6=linuxfoundation.org=gregkh@kernel.org" Received: from localhost (5356596B.cm-6-7b.dynamic.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 328F2217D8; Tue, 22 Jan 2019 15:22:08 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1548170528; bh=pgfPDiEGyjA54/auXcWXc9FPQo9uEGUkLPWjMRt6uFk=; h=From:To:Cc:Subject:Date:From; b=k06AHnOworTYPCPbks5d+WCjj15LNe2a9Wp+zitW0LH7u5I/oRRqVs6Yf12va9wRR r9oaCc9leIU8a0rn1hxkP1KNtFzkVjMhsXDpyn+FcnyuxQxuN6rmQiTnMoqzP7YqG/ KIDvEKvMEbiV3XzRYisURRlklW0xiYMI2IK764f0= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , Konrad Rzeszutek Wilk , linux-mm@kvack.org Subject: [PATCH] mm: cleancache: no need to check return value of debugfs_create functions Date: Tue, 22 Jan 2019 16:21:11 +0100 Message-Id: <20190122152151.16139-12-gregkh@linuxfoundation.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 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: X-Virus-Scanned: ClamAV using ClamSMTP When calling debugfs functions, there is no need to ever check the return value. The function can work or not, but the code logic should never do something different based on this. Cc: Konrad Rzeszutek Wilk Cc: linux-mm@kvack.org Signed-off-by: Greg Kroah-Hartman Acked-by: Konrad Rzeszutek Wilk --- mm/cleancache.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/mm/cleancache.c b/mm/cleancache.c index 2bf12da9baa0..082fdda7aaa6 100644 --- a/mm/cleancache.c +++ b/mm/cleancache.c @@ -305,8 +305,7 @@ static int __init init_cleancache(void) { #ifdef CONFIG_DEBUG_FS struct dentry *root = debugfs_create_dir("cleancache", NULL); - if (root == NULL) - return -ENXIO; + debugfs_create_u64("succ_gets", 0444, root, &cleancache_succ_gets); debugfs_create_u64("failed_gets", 0444, root, &cleancache_failed_gets); debugfs_create_u64("puts", 0444, root, &cleancache_puts);