From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-9.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SIGNED_OFF_BY,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E0108C04AB4 for ; Wed, 15 May 2019 00:30:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id A776B20873 for ; Wed, 15 May 2019 00:30:35 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=synopsys.com header.i=@synopsys.com header.b="Stcpfomi" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726901AbfEOAae (ORCPT ); Tue, 14 May 2019 20:30:34 -0400 Received: from dc2-smtprelay2.synopsys.com ([198.182.61.142]:38842 "EHLO smtprelay-out1.synopsys.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726834AbfEOAac (ORCPT ); Tue, 14 May 2019 20:30:32 -0400 Received: from mailhost.synopsys.com (dc8-mailhost2.synopsys.com [10.13.135.210]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtprelay-out1.synopsys.com (Postfix) with ESMTPS id 8BD27C0A63; Wed, 15 May 2019 00:30:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=synopsys.com; s=mail; t=1557880222; bh=uh9UA+kPv4V1KqsVc+h+XFlXPK5I/tzW1yJ39f1zSew=; h=From:To:CC:Subject:Date:In-Reply-To:References:From; b=StcpfomiPaz311LQ+zHrKvFpn1jpoRgQ4U5VvLR5jyW8aGuPJHCeLon0S8wLmgwRg 17UCEsHzUm4FZ5jQf6RTYJWY9IlX5thtxG2FTyNia3olPBk/TajOXBDNaJ94AjDbh9 od3kqvN9+mrpMqBha1X3hzO2UjSDdfP2tPBrUrOPIy14kL0hjVJL8iAlJr7u0vaHim YwT9Y4z9wFzbRDrUb7iYwztf/v+t08GpH8G1Zmk1QgSVsbTw8pClgy7hZdrE4n5ivR OER2XW28gq8iJUKjK79wAtEI+SumU+qkEqA0l6QQ8v6UqR0GUTZ5SMOwvG8VvNGCFP W7jphfenBauMA== Received: from us01wehtc1.internal.synopsys.com (us01wehtc1-vip.internal.synopsys.com [10.12.239.236]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-SHA384 (256/256 bits)) (No client certificate requested) by mailhost.synopsys.com (Postfix) with ESMTPS id 93E18A0068; Wed, 15 May 2019 00:30:31 +0000 (UTC) Received: from IN01WEHTCB.internal.synopsys.com (10.144.199.106) by us01wehtc1.internal.synopsys.com (10.12.239.235) with Microsoft SMTP Server (TLS) id 14.3.408.0; Tue, 14 May 2019 17:30:04 -0700 Received: from IN01WEHTCA.internal.synopsys.com (10.144.199.103) by IN01WEHTCB.internal.synopsys.com (10.144.199.105) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 15 May 2019 06:00:01 +0530 Received: from vineetg-Latitude-E7450.internal.synopsys.com (10.13.182.230) by IN01WEHTCA.internal.synopsys.com (10.144.199.243) with Microsoft SMTP Server (TLS) id 14.3.408.0; Wed, 15 May 2019 06:00:12 +0530 From: Vineet Gupta To: CC: , , Vineet Gupta Subject: [PATCH 3/9] ARC: mm: do_page_fault refactor #2: remove short lived variable Date: Tue, 14 May 2019 17:29:30 -0700 Message-ID: <1557880176-24964-4-git-send-email-vgupta@synopsys.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1557880176-24964-1-git-send-email-vgupta@synopsys.com> References: <1557880176-24964-1-git-send-email-vgupta@synopsys.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.13.182.230] Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Compiler will do this anyways, still.. No functional change. Signed-off-by: Vineet Gupta --- arch/arc/mm/fault.c | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/arch/arc/mm/fault.c b/arch/arc/mm/fault.c index 94d242740ac5..f1175685d914 100644 --- a/arch/arc/mm/fault.c +++ b/arch/arc/mm/fault.c @@ -67,23 +67,18 @@ void do_page_fault(unsigned long address, struct pt_regs *regs) struct task_struct *tsk = current; struct mm_struct *mm = tsk->mm; int si_code = SEGV_MAPERR; - int ret; vm_fault_t fault; int write = regs->ecr_cause & ECR_C_PROTV_STORE; /* ST/EX */ unsigned int flags = FAULT_FLAG_ALLOW_RETRY | FAULT_FLAG_KILLABLE; /* - * We fault-in kernel-space virtual memory on-demand. The - * 'reference' page table is init_mm.pgd. - * * NOTE! We MUST NOT take any locks for this case. We may * be in an interrupt or a critical region, and should * only copy the information from the master page table, * nothing more. */ if (address >= VMALLOC_START && !user_mode(regs)) { - ret = handle_kernel_vaddr_fault(address); - if (unlikely(ret)) + if (unlikely(handle_kernel_vaddr_fault(address))) goto no_context; else return; -- 2.7.4