Received: by 2002:ac0:950c:0:0:0:0:0 with SMTP id f12csp2100169imc; Tue, 12 Mar 2019 07:06:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqxABVGQ8IRfgvu/GyIB8HL6lwCJbxstk9hzoyG/rz8uOWF+gPf3IXfEedANS+0Xoe4BrVdE X-Received: by 2002:a63:f407:: with SMTP id g7mr35145891pgi.413.1552399588757; Tue, 12 Mar 2019 07:06:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1552399588; cv=none; d=google.com; s=arc-20160816; b=bJkJ8jZu50BScD3dXQ0Apfpyc51NeWBPe1L3daJvcvXovHSK6Ki3kMmrrHZHVvayfi 9H/h5tR15ieZdLo5VskDA1MbZyIIQ1SISHTSaVGhp2nppPErnDnXq0I0jDU1P/94lYGZ C/CAipjraVP8JAxoUTiySTRyQmMIu7h3TahkfUJR0sE+qAe+cZMLwNyXLA5j7Nlt6Byt tdiDvvdVSmqzdzzJcAPTASnDeA2VWSC7Bl5Uvf7m4X07z2NsK7oAkK14GRW63yaP+gY4 1VtG7NAXNSHXbJ3yxrZmThhkIyZ89Q4iyQSKs1LF3VgLjwS3SzIHx/uWHnhqzCcSday/ d7RQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:cc:to:subject :message-id:date:from:in-reply-to:references:mime-version :dkim-signature; bh=RC9n/L2urRzMIddaEkM47GUXLJfkJCfKnT+zLB1fxyQ=; b=yRfKdsT8qISFw7+G3RKKSV9algpx6HzdoM27BfVd0IPhS0PNj4yksJnwYsUjbkEOti 6DlN9DVtYZzL56eJ0ScwHLY01YFEYJelKge2cpIib/lkw7ooqNSCoAfJmF5yb5rz+ZBx rwbE2upvUaFSTEjtEbZRqbtBH/kiYCUwnASMGt5aL6v594irBaBVkzLfJgJYDZOUPzeQ Jz28yetY8QkR9DLTJEgyu+bm3COsqngpuMthvK4eAsHCrA0X5JPRZJRBvyC2NT8LZply jwaKKrI087UAp/Rf8GvprR3YzTzrPdZEOWdajp3QGsgPerOsr91asiMX/aL+mpDeH3g7 k6eQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=xXGa1xhP; 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 37si6005137plc.233.2019.03.12.07.06.08; Tue, 12 Mar 2019 07:06:28 -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=@baylibre-com.20150623.gappssmtp.com header.s=20150623 header.b=xXGa1xhP; 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 S1726771AbfCLOEE (ORCPT + 99 others); Tue, 12 Mar 2019 10:04:04 -0400 Received: from mail-oi1-f193.google.com ([209.85.167.193]:43208 "EHLO mail-oi1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725895AbfCLOEE (ORCPT ); Tue, 12 Mar 2019 10:04:04 -0400 Received: by mail-oi1-f193.google.com with SMTP id i8so2124960oib.10 for ; Tue, 12 Mar 2019 07:04:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=RC9n/L2urRzMIddaEkM47GUXLJfkJCfKnT+zLB1fxyQ=; b=xXGa1xhPq962PZh/0M3j4mAOlmZhS6NFDXzo4vogkbyqv8U/tAbx8VNHJd6v5gaJbq iGPH2tBC8fkPtNUdDfrARZkcdTs9pn6H7O9/hI80ITNHS0D1dz4jr2y2Fb+w3ZCGYfCE A4mGfJj1LXwVSWhi/LvnZ6mfPUrMgPy61gAjgvpnWxvleAq+h6HXaEMYRJxwZVWCmRmq CQ87C8MPJdouValtJ3f2b6kP2ucp6E2Oxmpv+N5ezPOzbEMBLqVYMG1ZZ6L944+2pORs UX9YOCdpXCFbej3zSL4snoaAfGWMegeigvwjUU+7ia/FQcyNWZr8FXPErpNcFtn4MuC0 7C1w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=RC9n/L2urRzMIddaEkM47GUXLJfkJCfKnT+zLB1fxyQ=; b=H35LF4f12FG4JMVbfWQGJREapy/YItTxtBIYDfJJ6XAevUbwYfAhNFwDrXqBv6bd12 w/r8ZiB63pkQ5xHT6HGR1mRCs9JjCZSg+GVxAGIHcJutYv1Z5bXr3Nek0V3p9idJSOdU 83IyKm92sCsoXKtg7UM9wbRM/66DnXTPc3xP28B7HoKU7nXAH///uj6WXUbHOs0WuHn3 t1mhNz9zQ8ujstbTOOsCpCp4avD1R3+qcymGu/i79VY9C3Pc8Nv/6s8yQOMMbpwWkr/x wjVb+2CHr36rsqZTKA6QT5/QjBU+Rh80bgtHTcTbVKm5rthhiXHpQyWrXrWnd30va2wY WeLQ== X-Gm-Message-State: APjAAAVoNq+Y9rzNHjiXL9t3Y2R5NVoG1wwTQywnXnmrZrUBFUxWNz9X gbYaGtSDv/MckcL51q38mdXiR+m4Q2dhif+m1uH4QQ== X-Received: by 2002:aca:4dca:: with SMTP id a193mr1806746oib.21.1552399443282; Tue, 12 Mar 2019 07:04:03 -0700 (PDT) MIME-Version: 1.0 References: <20190312132852.20115-1-brgl@bgdev.pl> In-Reply-To: From: Bartosz Golaszewski Date: Tue, 12 Mar 2019 15:03:52 +0100 Message-ID: Subject: Re: [PATCH] mm: remove unused variable To: Khalid Aziz Cc: Bartosz Golaszewski , Andrew Morton , Anthony Yznaga , "Aneesh Kumar K . V" , =?UTF-8?B?SsOpcsO0bWUgR2xpc3Nl?= , linux-mm@kvack.org, LKML Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org wt., 12 mar 2019 o 14:59 Khalid Aziz napisa=C5=82(= a): > > On 3/12/19 7:28 AM, Bartosz Golaszewski wrote: > > From: Bartosz Golaszewski > > > > The mm variable is set but unused. Remove it. > > It is used. Look further down for calls to set_pte_at(). > > -- > Khalid > > > > > Signed-off-by: Bartosz Golaszewski > > --- > > mm/mprotect.c | 1 - > > 1 file changed, 1 deletion(-) > > > > diff --git a/mm/mprotect.c b/mm/mprotect.c > > index 028c724dcb1a..130dac3ad04f 100644 > > --- a/mm/mprotect.c > > +++ b/mm/mprotect.c > > @@ -39,7 +39,6 @@ static unsigned long change_pte_range(struct vm_area_= struct *vma, pmd_t *pmd, > > unsigned long addr, unsigned long end, pgprot_t newprot, > > int dirty_accountable, int prot_numa) > > { > > - struct mm_struct *mm =3D vma->vm_mm; > > pte_t *pte, oldpte; > > spinlock_t *ptl; > > unsigned long pages =3D 0; > > > > Oops, I blindly assumed the compiler is right, sorry for that. GCC complains it's unused when building usermode linux. I guess it's a matter of how set_pte_at() is defined for ARCH=3Dum. I'll take a second look. Bart