From patchwork Mon Jun 3 13:50:45 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: 10972939 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 662A414E5 for ; Mon, 3 Jun 2019 14:08:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 56ACC2848F for ; Mon, 3 Jun 2019 14:08:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4ACF8287BB; Mon, 3 Jun 2019 14:08:48 +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=-5.0 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 37A972848F for ; Mon, 3 Jun 2019 14:08:47 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hXncT-0005oL-H2; Mon, 03 Jun 2019 14:07:25 +0000 Received: from all-amaz-eas1.inumbo.com ([34.197.232.57] helo=us1-amaz-eas2.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1hXncS-0005oG-UA for xen-devel@lists.xenproject.org; Mon, 03 Jun 2019 14:07:24 +0000 X-Inumbo-ID: e8d863d4-8608-11e9-8fb2-f305fba89dbc Received: from mail.kernel.org (unknown [198.145.29.99]) by us1-amaz-eas2.inumbo.com (Halon) with ESMTPS id e8d863d4-8608-11e9-8fb2-f305fba89dbc; Mon, 03 Jun 2019 14:07:23 +0000 (UTC) Received: from localhost (83-86-89-107.cable.dynamic.v4.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 DBFC227CDA; Mon, 3 Jun 2019 13:50:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1559569855; bh=9ZIpxjRQkTPQKKOrEZEvuX2spVekKgyMa2r8cr6R3o0=; h=Subject:To:From:Date:From; b=oVouPxv1YC3UgFmN5VD/tW+qeCHkyuy+z9rfJpV7FRE6bephfALjS67dgLGlMOYCZ ViVbxzB1vsE4U0qyz7eOFKrbvBNebr3wrxFQpW7r99Mo6Kx4Dc0w/pJKhxyglFKTZH HgtX/62ThgD9gFiUeXxkX0a1U9il6AwAlegQqKNU= To: gregkh@linuxfoundation.org, boris.ostrovsky@oracle.com, bp@alien8.de, hpa@zytor.com, jgross@suse.com, mingo@redhat.com, sstabellini@kernel.org, tglx@linutronix.de, x86@kernel.org, xen-devel@lists.xenproject.org From: Date: Mon, 03 Jun 2019 15:50:45 +0200 Message-ID: <155956984518814@kroah.com> MIME-Version: 1.0 Subject: [Xen-devel] patch "x86: xen: no need to check return value of debugfs_create functions" added to driver-core-testing X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP This is a note to let you know that I've just added the patch titled x86: xen: no need to check return value of debugfs_create functions to my driver-core git tree which can be found at git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core.git in the driver-core-testing branch. The patch will show up in the next release of the linux-next tree (usually sometime within the next 24 hours during the week.) The patch will be merged to the driver-core-next branch sometime soon, after it passes testing, and the merge window is open. If you have any questions about this process, please let me know. From ad09137631e6e5acfaf288f3ba3f4b3a9f855d16 Mon Sep 17 00:00:00 2001 From: Greg Kroah-Hartman Date: Tue, 22 Jan 2019 15:35:42 +0100 Subject: x86: xen: no need to check return value of debugfs_create functions 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: Boris Ostrovsky Cc: Stefano Stabellini Cc: Thomas Gleixner Cc: Ingo Molnar Cc: Borislav Petkov Cc: "H. Peter Anvin" Cc: Cc: Reviewed-by: Juergen Gross Signed-off-by: Greg Kroah-Hartman --- arch/x86/xen/debugfs.c | 7 +------ arch/x86/xen/p2m.c | 3 --- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/arch/x86/xen/debugfs.c b/arch/x86/xen/debugfs.c index 13da87918b4f..532410998684 100644 --- a/arch/x86/xen/debugfs.c +++ b/arch/x86/xen/debugfs.c @@ -9,13 +9,8 @@ static struct dentry *d_xen_debug; struct dentry * __init xen_init_debugfs(void) { - if (!d_xen_debug) { + if (!d_xen_debug) d_xen_debug = debugfs_create_dir("xen", NULL); - - if (!d_xen_debug) - pr_warning("Could not create 'xen' debugfs directory\n"); - } - return d_xen_debug; } diff --git a/arch/x86/xen/p2m.c b/arch/x86/xen/p2m.c index 95ce9b5be411..0acba2c712ab 100644 --- a/arch/x86/xen/p2m.c +++ b/arch/x86/xen/p2m.c @@ -817,9 +817,6 @@ static int __init xen_p2m_debugfs(void) { struct dentry *d_xen = xen_init_debugfs(); - if (d_xen == NULL) - return -ENOMEM; - d_mmu_debug = debugfs_create_dir("mmu", d_xen); debugfs_create_file("p2m", 0600, d_mmu_debug, NULL, &p2m_dump_fops);