Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3475030imm; Tue, 29 May 2018 07:53:53 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqs6YBLTi30gJh4XBQu2u/+Jv59qjzsRlXaMr5xBrtsMG4kYS89vM8WAIUuw1mVna0QfGGz X-Received: by 2002:a17:902:8a81:: with SMTP id p1-v6mr18382990plo.33.1527605633803; Tue, 29 May 2018 07:53:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527605633; cv=none; d=google.com; s=arc-20160816; b=qtjiykIg3EmS+sotyouH/nZrPIHQVr/Fh3U6MnN443zeR7bERl717tYdjQL3FITkf3 DIAa64T/xi1gQMnTmSsV/ZXcLVNMkeGoNo+FlJdIZORLadFeBY1IxaMKCdiiPDdFfeuC M166Jv6qdTrRMP68XEMqWiZh119O63AVsUkGG/26lzZequ1vBSKKFvj/EyFULXn+ONZx /WZ0Cz2fa1qHiUi5Rx3MlsuHLQaKDIWetmoMi7HdkkQ250vdjTqh2xpJaHWExRVQAVt9 io3G0OzSO9R2Qe1Ei7sUNHsLpSryZR48vZPWqS6pIrruPBNued4GYDFtZiRNlJjWkU6v v3bQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=EeklfYWXJAA34QoNg/wSLkHJuh6FS1UIkmdXhQd3RoU=; b=a4LDjlbb3jGgnQb+s12abrI+Hkn8wvz/lX6nFg/CT5p6Y5Ue6pb32ysJ7NMjxEI383 KfnFTR8XZNcn54RV5nCKI3seiQ4x9sjd6rcfmWkEbdd1Gn4YV5hs5UGRmBC06CUA8m9z 3pu0cnQq240X37SgaVLhWYrVfwut/YH16rIf52XfwFEF7IW2NwD8YY2Ho+BvFTNXg8db nGsqnWmAV2hAmJwXu8R7EGGM08ZkdQ5NpnfQ8hgcY86o53j2h7EEGjBK/ptz/e2e8LHf Amy/wdGwY8nB1S+HwPyVWi8e7RBm5RD2ujbkaPyMwagTWjdZQzqpjyLtTneW3VlPtHcu IQTQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@infradead.org header.s=bombadil.20170209 header.b=P0I+462W; 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 b7-v6si3607957pgq.564.2018.05.29.07.53.39; Tue, 29 May 2018 07:53:53 -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; dkim=neutral (body hash did not verify) header.i=@infradead.org header.s=bombadil.20170209 header.b=P0I+462W; 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 S936754AbeE2OwR (ORCPT + 99 others); Tue, 29 May 2018 10:52:17 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:55882 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S936730AbeE2Ovw (ORCPT ); Tue, 29 May 2018 10:51:52 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=In-Reply-To:Content-Type:MIME-Version :References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=JCxYeJtKHVYJ8zlNOpJQ++4kPPVGyVitSdkqvHJRykg=; b=P0I+462W/Xt8HTszr+0bE+TVC ibiqj0dXqqhT6vvIRZU6dte2DfwajVorSo83UZy8rk2MKyDR4aHRIaeTTLX1KxnS6AyakM8xP+ylo PQinsOcizNdTAWGUcilfXKd0snlbeyAJYOb5wT03VunWgfcoTjkt9xaa4FAmPYurPFRkHPQdGXtan Qrk90wvip2vOzlfwMhr8rqsolgQmcmlP6TJxvlgDI+ykbmlXleU19VEAMIBXYmNlf0IgiKAEHnYQN hVH8pPF6Phnk7fV5Zg81uD3YSLuFNA2UppXIZ1ve5ohNxMuoNsBvjwoM/du8PiyxgXaSne4hbkeZ3 VUCEKKi4Q==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fNfxg-0003js-01; Tue, 29 May 2018 14:50:56 +0000 Date: Tue, 29 May 2018 07:50:55 -0700 From: Matthew Wilcox To: Souptick Joarder Cc: viro@zeniv.linux.org.uk, hughd@google.com, akpm@linux-foundation.org, mhocko@suse.com, ross.zwisler@linux.intel.com, zi.yan@cs.rutgers.edu, kirill.shutemov@linux.intel.com, dan.j.williams@intel.com, gregkh@linuxfoundation.org, mark.rutland@arm.com, riel@redhat.com, pasha.tatashin@oracle.com, jschoenh@amazon.de, kstewart@linuxfoundation.org, rientjes@google.com, tglx@linutronix.de, peterz@infradead.org, mgorman@suse.de, yang.s@alibaba-inc.com, minchan@kernel.org, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mm@kvack.org Subject: Re: [PATCH] mm: Change return type to vm_fault_t Message-ID: <20180529145055.GA15148@bombadil.infradead.org> References: <20180529143126.GA19698@jordon-HP-15-Notebook-PC> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20180529143126.GA19698@jordon-HP-15-Notebook-PC> User-Agent: Mutt/1.9.2 (2017-12-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, May 29, 2018 at 08:01:26PM +0530, Souptick Joarder wrote: > Use new return type vm_fault_t for fault handler. For > now, this is just documenting that the function returns > a VM_FAULT value rather than an errno. Once all instances > are converted, vm_fault_t will become a distinct type. I don't believe you've checked this with sparse. > @@ -802,7 +802,8 @@ int fixup_user_fault(struct task_struct *tsk, struct mm_struct *mm, > bool *unlocked) > { > struct vm_area_struct *vma; > - int ret, major = 0; > + int major = 0; > + vm_fault_t ret; > > if (unlocked) > fault_flags |= FAULT_FLAG_ALLOW_RETRY; ... major |= ret & VM_FAULT_MAJOR; That should be throwing a warning.