Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp3538951imm; Tue, 29 May 2018 08:56:47 -0700 (PDT) X-Google-Smtp-Source: AB8JxZo80/MFgdjO68GMgrVnlIu0zDghi1PX277UlYazFvOB+MB8V2jFez04OpAnEGy962upvQyw X-Received: by 2002:a62:e710:: with SMTP id s16-v6mr17853912pfh.227.1527609407372; Tue, 29 May 2018 08:56:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527609407; cv=none; d=google.com; s=arc-20160816; b=XApkym86Y96FGPnARzzwW+uWOi0DCNoUEyKRRBXiBxuNCnIrHPKiqt+9XqWyolzZGS C2e+6joqbiax0QlvwRidMRiUnz8v/jMT8hzB1vO0erJGeiLmysRpzGj3god/4IELPJeV HKY0Kc4bmzL61le8/M3tiGmvIfduxvgGq32tDjYgeT7N+I0msy+fMLKaUnRFwbDl3TJt KRQ2FEoqV6yxNElVl3vEFhl6auZ8hxou2rspWic1aRc3hdYnHPI95H3Y5J2/z4NzjP4S c3y8Mfwsm+suXfLvF4JpIBi7rbfNRAN3Pxa82bShxeQPkWeKl/X0TZf6lCdEL8nwSM0W 73vw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=YMyhKQFCZJ4NzrJLjMLcZJdoufKu4akBq5F5xIiLJ/s=; b=QAwXZuiTg9pb0w9p+cvaVIuxqvSqv73ZT21fLgWJzAWZuNzewZG25NEddnX/3/jCKE DCE0yPeuryzl87c+f6OkBR5hQms+bci9aPHv5+NfMRTe8zcbipS3gNNTOtp2Io89qQqU tWrIZAle/Bs+nfuL9K+uf7xB9HFp8qXv+WJ/iSHrSDBB/PkUARtd48vJRqdv4WA/69Tm mk5vkGHLX2gYLmcLF4+2dI4pn0YY6sIf5qk61pZ550xAoO4fmqMNcZDiTZFEiHFWgqEb 8SvTznu7WQr61G3KDX8uHmE85jDeqn/8znQWLNLxI6JYRI6lCov/FOxyLpVWSg66UROU gisg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=UwjHkJlD; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id c131-v6si32499445pfg.108.2018.05.29.08.56.33; Tue, 29 May 2018 08:56:47 -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=pass header.i=@gmail.com header.s=20161025 header.b=UwjHkJlD; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S936534AbeE2PzK (ORCPT + 99 others); Tue, 29 May 2018 11:55:10 -0400 Received: from mail-wm0-f65.google.com ([74.125.82.65]:54637 "EHLO mail-wm0-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934836AbeE2PzI (ORCPT ); Tue, 29 May 2018 11:55:08 -0400 Received: by mail-wm0-f65.google.com with SMTP id f6-v6so42051754wmc.4; Tue, 29 May 2018 08:55:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=YMyhKQFCZJ4NzrJLjMLcZJdoufKu4akBq5F5xIiLJ/s=; b=UwjHkJlDAvY2EpqYFUPXho50wkwYVMAIx5BERrM0ZW9gXTFXunXh1zmCMp2SgWH7z4 sKobEktYsztf35LPMEgQamqg9A5xa/nYv6arUoJ368/YSAyop1Dw8QhCKIfWJInQc+Fv 9zSl7Y3kK8T5rJS/Oac6k9LMcqwz54N80biF5Q2fDwvP0YgpI5hzZ6T9YNrJcCMEPejF lhI+y8s74rbPsANV6VckLzF0o/Tz3BK8BpcE++vIsUEf8qDu5M5RNIYSbmrnvthENnlZ bkScjfynYTmpRY4UGKnySjvVhUrB1jbt6b59Ud1p2GRx4AU9XhJ6hYWYlNWGkv+4a9Pg Bw+g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=YMyhKQFCZJ4NzrJLjMLcZJdoufKu4akBq5F5xIiLJ/s=; b=XiS4z2Fj4ooNWd5dLdMzw7IUNzKSHQbUgOq09IT6OMSqwAyM0U1sXUY+hT1SUunh4O 3/DFbjOJM+/tKoezW8B2EPRemmvA6pIjPjBJuXd03RZLyNJ7JIo1bV8jokDTTm5xCrRl hBndQerPs59dDTEeklVn2pclWGXYyTZfx/4TjXZE/Gh8DLQuTz7hZ6uF6DUt0avKS4H8 3poyV475mdwUdJLLmwIQgaNttiNAAs5Uj8imkrHtLZ+ziB3mex+zSzmHx7Q2OA28Vt6j rU9LMr+pr46brsQIiJF4lRp6gkuN1X1dRxytG40zcL93Ha4emJoWWZrwZ6KDZ8Eb3QXf CXGw== X-Gm-Message-State: ALKqPwfLT813cXNkGhQJcZ/FuSDfv6fkQIUc2SRRrIrU36IwEMPXIJyA b6mE9dy27tvu9Zd/HP9jPlgaxv6XupwlGsJT9Nk= X-Received: by 2002:a2e:86d9:: with SMTP id n25-v6mr11544025ljj.18.1527609306692; Tue, 29 May 2018 08:55:06 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:d885:0:0:0:0:0 with HTTP; Tue, 29 May 2018 08:55:05 -0700 (PDT) In-Reply-To: <20180529145055.GA15148@bombadil.infradead.org> References: <20180529143126.GA19698@jordon-HP-15-Notebook-PC> <20180529145055.GA15148@bombadil.infradead.org> From: Souptick Joarder Date: Tue, 29 May 2018 21:25:05 +0530 Message-ID: Subject: Re: [PATCH] mm: Change return type to vm_fault_t To: Matthew Wilcox 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 Content-Type: text/plain; charset="UTF-8" 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 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 ?