Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4048388imm; Tue, 29 May 2018 20:41:32 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLNjwNBqV0sUG6isPoCkxVWaRVLUeI/DHr9TOnjS83SR2+qCFPkQaHe6IgNvHqV4BaoiFl/ X-Received: by 2002:a17:902:8b8c:: with SMTP id ay12-v6mr1142968plb.74.1527651692019; Tue, 29 May 2018 20:41:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527651691; cv=none; d=google.com; s=arc-20160816; b=o0JdufM0k0Ddl8AIuQB4g7VRpSmEnhmB7iV96Kn65uiMOAYdJ8F0ZfEMxmYda/H5gD teLbLP3gL3L/Cv0fQ/etr0L61oIaOjGx9MxaH0ZGvttEBY7Pu21olayBmeXRAqc0LD/y MJNYwSw7j+xj4pWjnXmWPZigNA4Tx4pxUmuHQITrD95bZYBcgoNwcapyA0lQKHs/Hh5t bfPqI5TwAttvLrLtEb/di9NyjOPFJt72gGuqYEAC8S6tsdCaARH3viuyYY5HaEVApVpK +KnvYOF03Wig5cxC1/+vWv+zLBEtxKvAVCE8oCHRp+ojCpPGk3sQqmhNTCX/71nXptzD Qufw== 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=OHulZiYCcg05nVd16fsO43egmnJm74o4sfcyI/rV850=; b=k+UYdoxshce6u/lCgC8QOMJZVNVtXqBQg7JGcAsa6RiTqtvMAM4WF4PhjTLXQQv9Hh dykYs3rmQAMeXJXp8PWDcRJoUhcywKUyl5Bb22Osna0Uqg25OouawzRkldSO9TGcuvx2 a4HZ0RghzpJnzrra1lwk+rGEKf28VG0R0PSMtgbGZx30t0tPBkHSxUTmrBMTZYPI0O4M U/MNN9Y3615rvP2/THAA248YrFD0FMVpup6sMki1N3PV2rObHcaU29ClQO/w9LdKYtlT s7uXsIRVDnaNom/urozMyRKYaWXzOzRAHBVY54holRdKWjAt6Nb1lw7FqUapRRPZXGLO E/1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=OLmk9uPM; 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 w13-v6si33410689plq.413.2018.05.29.20.41.17; Tue, 29 May 2018 20:41:31 -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=OLmk9uPM; 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 S1755439AbeE3Dkw (ORCPT + 99 others); Tue, 29 May 2018 23:40:52 -0400 Received: from mail-lf0-f66.google.com ([209.85.215.66]:42577 "EHLO mail-lf0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755001AbeE3Dku (ORCPT ); Tue, 29 May 2018 23:40:50 -0400 Received: by mail-lf0-f66.google.com with SMTP id v135-v6so1968616lfa.9; Tue, 29 May 2018 20:40:49 -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=OHulZiYCcg05nVd16fsO43egmnJm74o4sfcyI/rV850=; b=OLmk9uPMH574OOGVTNJGEeMnwlAtazpsbAd3p9lOs61Ly8Pj4v4hIVWcOOEfQlBy7S xkyTCkbUzTsKaDf/cKUdCMdgDTD/5Tn9ho7pijrP1989oYjDSgOvep607rgQDw/JJyRL wFy2TMqwMWjR3scZ9LBayD2gltCXVW1xk4ofjY9+Mo6R4xa/3KbTV8L6lnPRDiotqQ1b T6jM6tbcBHbOUDmHCgezF1Y5ZJ4voeB/BJ2e//h2/u00qknaXMH5nqfVBGssM75EOz2H /MOcMtkzlgv6Mfvs7ml+WzeCkgFtYTCFkdv/q+jSWZFPJAfmsiAcyQ6VR4Vj1nBh9Jq5 0HsQ== 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=OHulZiYCcg05nVd16fsO43egmnJm74o4sfcyI/rV850=; b=gKRtTv6jDIVhxoD5LcAB3/XAiXc1UTaZdJiMU30Ck9ihwXQnFmOms3E8RPrgDSylXv kXMHHzUx7PP3fv8w5Sorqi9Q1QQv6QLyDiMpXwmUETXMfeIE8qH2Q7n99b/3ysTTE2Rv 1ew+vfsSAVV7hECerh+IdfIBtoanP/wiGcX6qJHK4rYcApiLdpLOGdUE7V1DeaSTJ8JI MMn3MtDPO8tvltr1XNbe8cUf4BwNjGtzaRIbEdgZAKuNYcU5oxDfTFbavAuXxqzJAZ4r dE9jxFeW15JTVr4EgVydu+fnMrtVCzKWfkdPnOyyyBwrH9s8Cs1ZlKGqCV+p+TJr4HZZ kzFA== X-Gm-Message-State: ALKqPwd9F0264tCo0aartexzZkZoJj7iT6Zpx5S4uszjk6ht/B4N4OFO vhOB+X4YB4Tj51ox1Qb8pq3KMNa9WXVOn/uzrvc= X-Received: by 2002:a2e:86d9:: with SMTP id n25-v6mr633736ljj.18.1527651648585; Tue, 29 May 2018 20:40:48 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:d885:0:0:0:0:0 with HTTP; Tue, 29 May 2018 20:40:47 -0700 (PDT) In-Reply-To: <20180529173445.GD15148@bombadil.infradead.org> References: <20180529143126.GA19698@jordon-HP-15-Notebook-PC> <20180529145055.GA15148@bombadil.infradead.org> <20180529173445.GD15148@bombadil.infradead.org> From: Souptick Joarder Date: Wed, 30 May 2018 09:10:47 +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 11:04 PM, Matthew Wilcox wrote: > 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'? Building with C=2. Do I need to enable any separate FLAG ?