Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2051574imm; Thu, 2 Aug 2018 05:34:15 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdsWHjcEcP3Rp2d+yx7XBMvIkGyRlQmh+FJ1XWhflGTNQ3RTJcCOMDxibyZ7/tsmtV3lrj2 X-Received: by 2002:a62:1f06:: with SMTP id f6-v6mr2826245pff.140.1533213255474; Thu, 02 Aug 2018 05:34:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533213255; cv=none; d=google.com; s=arc-20160816; b=SrJ9VMwknveJLqirWxNCLOtoSZCzorfwfpJocDb/w/w45lInJQ3a06dB8ybjwtsyL1 isGDibLP8oiUI3f+gOIbDCgiHgL+yc0WoYVm+Ts668jwkVXEN6iDMo6dNKUrkWiyG0Lk q1gq0K2RQNgwC6gLnBP5EVhGfMCL45w2VZK7yPEPrillWXmJX1uJbCuMYDj/YYDVitDs tLBlD62n1ot9fpQzigDd2cg2CoJYlvhklD5pMXZONCJsS9s1hQbZT/0gt2EfUI5b9AUA vm0161hLi+rq8GlvSSzNqMODquyp7cfeZ7yTHaJ2ugtxUovGF2o70iGTT2DmcaIltvDq ra3A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-disposition :content-transfer-encoding:mime-version:robot-unsubscribe:robot-id :git-commit-id:subject:to:references:in-reply-to:reply-to:cc :message-id:from:date:arc-authentication-results; bh=r2Ii6Za3TW3g45uSuzX0zycIuzn+cXv+/dIObpFdJOI=; b=NsEZtMF+lS5EtO8Ff526umg8QnlicQCc+kRxFAn/CwWQOstOe3vCiTgA5DXlguno/1 FahaUdVS24b9SkoA7Ri7aDs5C3839lI0aDuS4ZpLkfHtj01jweqvNnvalkHOul1EH6xC 7f8+2M5ABS8ElH28vvQYfwkUQ7ozCz7VA71Ua8HE43P9/ulHqpnps1zV8/KXadhlsn22 rzyi2QmPEmbnewCsSqtohVAgdeBI+2QS8b3FbMwDccYCPxEHB58SL7DeSPVIO9lLdyY1 BhO1ozI3EhtRcJKHUEY8htigw9HlgMMwZMl/BGFVt2AosNyH9jor/xvhVGeCcFKtgWob okIw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u15-v6si1855004pfa.28.2018.08.02.05.34.00; Thu, 02 Aug 2018 05:34:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1732393AbeHBOW7 (ORCPT + 99 others); Thu, 2 Aug 2018 10:22:59 -0400 Received: from terminus.zytor.com ([198.137.202.136]:54817 "EHLO terminus.zytor.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731383AbeHBOW7 (ORCPT ); Thu, 2 Aug 2018 10:22:59 -0400 Received: from terminus.zytor.com (localhost [127.0.0.1]) by terminus.zytor.com (8.15.2/8.15.2) with ESMTPS id w72CVs053499909 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Thu, 2 Aug 2018 05:31:55 -0700 Received: (from tipbot@localhost) by terminus.zytor.com (8.15.2/8.15.2/Submit) id w72CVsYs3499906; Thu, 2 Aug 2018 05:31:54 -0700 Date: Thu, 2 Aug 2018 05:31:54 -0700 X-Authentication-Warning: terminus.zytor.com: tipbot set sender to tipbot@zytor.com using -f From: tip-bot for Chengguang Xu Message-ID: Cc: cgxu519@gmx.com, tglx@linutronix.de, mingo@kernel.org, hpa@zytor.com, linux-kernel@vger.kernel.org Reply-To: hpa@zytor.com, mingo@kernel.org, linux-kernel@vger.kernel.org, tglx@linutronix.de, cgxu519@gmx.com In-Reply-To: <1528804132-154948-1-git-send-email-cgxu519@gmx.com> References: <1528804132-154948-1-git-send-email-cgxu519@gmx.com> To: linux-tip-commits@vger.kernel.org Subject: [tip:x86/mm] x86/mm: Remove redundant check for kmem_cache_create() Git-Commit-ID: 765d28f136291f9639e3c031a1070fb76d6625c7 X-Mailer: tip-git-log-daemon Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=UTF-8 Content-Disposition: inline X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED,BAYES_00, DATE_IN_FUTURE_96_Q autolearn=ham autolearn_force=no version=3.4.1 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on terminus.zytor.com Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Commit-ID: 765d28f136291f9639e3c031a1070fb76d6625c7 Gitweb: https://git.kernel.org/tip/765d28f136291f9639e3c031a1070fb76d6625c7 Author: Chengguang Xu AuthorDate: Tue, 12 Jun 2018 19:48:52 +0800 Committer: Thomas Gleixner CommitDate: Thu, 2 Aug 2018 14:27:35 +0200 x86/mm: Remove redundant check for kmem_cache_create() The flag 'SLAB_PANIC' implies panic on failure, So there is no need to check the returned pointer for NULL. Signed-off-by: Chengguang Xu Signed-off-by: Thomas Gleixner Cc: hpa@zytor.com Link: https://lkml.kernel.org/r/1528804132-154948-1-git-send-email-cgxu519@gmx.com --- arch/x86/mm/pgtable.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/arch/x86/mm/pgtable.c b/arch/x86/mm/pgtable.c index e3deefb891da..0f1683fcb196 100644 --- a/arch/x86/mm/pgtable.c +++ b/arch/x86/mm/pgtable.c @@ -329,9 +329,6 @@ static int __init pgd_cache_init(void) */ pgd_cache = kmem_cache_create("pgd_cache", PGD_SIZE, PGD_ALIGN, SLAB_PANIC, NULL); - if (!pgd_cache) - return -ENOMEM; - return 0; } core_initcall(pgd_cache_init);