Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3635369imm; Tue, 29 May 2018 10:36:30 -0700 (PDT) X-Google-Smtp-Source: AB8JxZr0hqW6zSwYBI85bwvNj/qYzfAHMrK0XZPzMm8uiYVAo4dehJh+hKRspVDEIQ0V98V3au3H X-Received: by 2002:a62:7105:: with SMTP id m5-v6mr17798122pfc.167.1527615390450; Tue, 29 May 2018 10:36:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527615390; cv=none; d=google.com; s=arc-20160816; b=MfON981A26CCuG4R02waQ9VdWD7guuFOXWaSLhduefvHJGYRaB7aiTi87zNzzGFj+9 uS3YlbCJAI7UaT0T47aP2/zLY6ZVEQZXvEpyk7t0bM46zSTy1tKMgsRX27h+0EbQRPVK pdCliBzt44tA4SafOyvXj/mBNzc9AYlek4KdBzpC/DBKtj9XjBgUJJ6GS6+jf0xCtK6D NaSaDTSGDjfVmQr1qnrx09bo0PcB0DOTe6ws1t9PrRuglrmxNXiWdGROhhOYv/j3puMs O98YYRcmHziYaw1d2WvXYpQJzu+hnbk8O0yFFiGjOx8ZmTO2n1dEIkeeD0yi1Onbn7L2 hiFg== 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=W4OljuCgLO7Oh/XXHtkJscyFNI3xStOn4SqaoA4iMns=; b=nbd9hHOVaNoU/wesE6beXeFZrS7MJWRcWuSk5I6BSKDo5dRdIHpIeWJ3n66JbV4wVl EsQHZA6MhUGl2m+XBfH10cb3JUq9mcBW/4ImNwsSln9vodI9EVyelSOJ9I47z9IoF0SK 7iFg+NZ5rzLar/BtO/lxnTgmL/nIXUvGCszCycueHCsp/mOho4hmwJWmKL//Gq6xgQat jAfLcgB5kIsFnfCmvUk/aRNxvGSY3rY0bZVgthx4Y1PcO689zRC0qTtIJRFXl8fmLgbp RJh5X58BK3RmSDInJoLfrkeJMv7D7oSz03+S6xDV2NkL7QY5+P4LXXXK1obIh/x1P2JU kA/g== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Icdlr44z; 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 s7-v6si25335479pgr.670.2018.05.29.10.36.16; Tue, 29 May 2018 10:36:30 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=Icdlr44z; 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 S965540AbeE2Rfh (ORCPT + 99 others); Tue, 29 May 2018 13:35:37 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:55302 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965010AbeE2Rff (ORCPT ); Tue, 29 May 2018 13:35:35 -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=W4OljuCgLO7Oh/XXHtkJscyFNI3xStOn4SqaoA4iMns=; b=Icdlr44zfTQw2btA6Oik0QMsK dnf0nvdpzVu0jSpKqtSqHgmnI1iM+Z84ZJGnv4aCwbrJYR0ue8NDk18slpP61orToluZZ61Bi4s6g HaYKHSILy+P2wjqXV4xdLIxmqOkp+vM3zRQ0Lh9LgqZdPH3ya4pLCygoRVhiraj1WRJlRQp3KY5zC BXPv4ADPtm2ICOO7ezRZrp4ehmTuKr4F/QbnAfdm/fpv9/PY9icN4wFEtl7T9qEp4LBq4XLb8BG0K Hiis/7uyU59jIDWadekPKccezqB057aoA/35tdkLjOIo4K3uxdkoiGYuIV+lGH6hEkwAw70Mr4ysV iubtCtEUA==; Received: from willy by bombadil.infradead.org with local (Exim 4.90_1 #2 (Red Hat Linux)) id 1fNiWD-0004Nf-IF; Tue, 29 May 2018 17:34:45 +0000 Date: Tue, 29 May 2018 10:34:45 -0700 From: Matthew Wilcox To: Souptick Joarder Cc: Al Viro , Hugh Dickins , Andrew Morton , Michal Hocko , Ross Zwisler , zi.yan@cs.rutgers.edu, "Kirill A. Shutemov" , Dan Williams , Greg KH , Mark Rutland , riel@redhat.com, pasha.tatashin@oracle.com, jschoenh@amazon.de, Kate Stewart , David Rientjes , tglx@linutronix.de, Peter Zijlstra , Mel Gorman , yang.s@alibaba-inc.com, Minchan Kim , linux-fsdevel , linux-kernel@vger.kernel.org, Linux-MM Subject: Re: [PATCH] mm: Change return type to vm_fault_t Message-ID: <20180529173445.GD15148@bombadil.infradead.org> References: <20180529143126.GA19698@jordon-HP-15-Notebook-PC> <20180529145055.GA15148@bombadil.infradead.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: 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 09:25:05PM +0530, Souptick Joarder wrote: > On Tue, May 29, 2018 at 8:20 PM, Matthew Wilcox wrote: > > 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. > > Sorry, but I verified again and didn't see similar warnings. > > steps followed - > > apply the patch > make c=2 -j4 ( build for x86_64) > looking for warnings in files because of this patch. > > The only error I am seeing "error: undefined identifier '__COUNTER__' " > which is pointing to BUG(). There are few warnings but those are not > related to this patch. > > In my test tree the final patch to create new vm_fault_t type is > already applied. > > Do you want me to verify in some other way ? I see: mm/gup.c:817:15: warning: invalid assignment: |= mm/gup.c:817:15: left side has type int mm/gup.c:817:15: right side has type restricted vm_fault_t are you building with 'c=2' or 'C=2'?