Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp1469218ybm; Thu, 23 May 2019 01:21:21 -0700 (PDT) X-Google-Smtp-Source: APXvYqzy89weQH/pU4lsx8b6SG84bBu4lNgl5psk5MsM41O0XBaY4iLkSlh35RHkPXpWy6aZSmm2 X-Received: by 2002:a17:902:1347:: with SMTP id r7mr52238431ple.45.1558599681274; Thu, 23 May 2019 01:21:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558599681; cv=none; d=google.com; s=arc-20160816; b=ysFPLhymN3SMq4GbOrn0CBnzmmzaorDrMAQIVKwe+hT4MU/JBimU4mUiO3aDFV9vDb 5Q1nv3xvgzOmRQmPySl0k8IxsOF9Al/r3rpHURqWaeQoABDENW3s3ggnrMxKHA3mAG4G BOz/Q8VOTnNcxIK4b7WugX8ZmmrEhKUbTXg5YJ2WkhArAl7843FnjRIEH9SeU4Z/LaJ/ dkEi3zceH2g6PHKRobEQ+sn/1ihR0PFZJ1VSh3UlEhnfVs4clglipxWhbAm6m5qJk68Q h5DMMTINlg+aO5cECJCfsTRS0uT+XlQ+ppRsARKltve1r7w54jN03Kb7447MjTdEsPIv p/kg== 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 :in-reply-to:references:mime-version:dkim-signature; bh=mYyAF+Hnh5b5m8fm6hqJdeNUx/XFi2YtL8HXbo6MIQ4=; b=oyZiM7OA14vzVcbl3kwjvhd2pXbfbmLORM1UlW2OQyhO62b0cu99dg+xBHx5Pc0zqo 4wn0GpYyBaHzq/pDmvBpcKLOFStjYxcN0LpQoxUmU4cSCn7uaHChAHvqeX9olqZQX3xb s0t+kHD0FVKJMK9z3/bnCSD2f2iFC3Rq8fuAV5IR4MlZJEZgTtwLpdILSVbjdtxgVPhV F0UJsdMEhSkdMZaYW8gnOfaVx4OM5Oawys/9l/Kb9zSCuTDgnTZsO+JXjBkQ7NiC6luj 5Xh4sqoW5KZHzHCxcYYxLdZXmeAnWy13y9LdWDPnbQmoX9OaTIHaspjmrvZfISe3Jj+j Yh9g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=ZjDPRXWo; 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 204si31444272pfz.86.2019.05.23.01.21.06; Thu, 23 May 2019 01:21:21 -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=ZjDPRXWo; 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 S1729866AbfEWISk (ORCPT + 99 others); Thu, 23 May 2019 04:18:40 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:33156 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725814AbfEWISk (ORCPT ); Thu, 23 May 2019 04:18:40 -0400 Received: by mail-lj1-f196.google.com with SMTP id w1so4630301ljw.0 for ; Thu, 23 May 2019 01:18:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=mYyAF+Hnh5b5m8fm6hqJdeNUx/XFi2YtL8HXbo6MIQ4=; b=ZjDPRXWojXAS6NqPEz8JB/OA8f1NvfH0idz/DYqPNKOIwEnxvT9rxLaT2Dtp1Z5DKO lc1+9om+ogwDFs8c/NxPujzlRuHpuAqwqpugZqGGmU8N+VbjkrF+V22SOt++6PSEIrI9 qpQA9ItNygk6fuyOzlcd+RJMS03m7NUPj3dxo2Kop/7NZx4/0ddV1TSmQTRatZLOiUFB lfgXKMLFrTesdMiF1fPZ03rx3ze/lt+LMEShvoc2aopH7MALrcdfhiz10XdPlfAdYj0J ZrRhfmTygEfaaL/c73qutQ9HnNot9FX5xO12fNz8xqQjOpPNgu8ZZZgwt6eqLCjYlUM7 o/Ng== 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; bh=mYyAF+Hnh5b5m8fm6hqJdeNUx/XFi2YtL8HXbo6MIQ4=; b=azbwgsAPlDLdq3GG36pzjypIcs3x0lrU372MTibz6zLg6E3RkvUPqJdu5vJklPYcGB tg6rKCDee/vlZOyLlHRvmDHkiElP0dEBSFTgwj2sTxGPFBu+Q4KeO/Y+aV/jZXq2gTEK G2BJncTsf9v6pSfrCM3kjivkhTmySJme1Kzge9+KB1Wgu5XpHV12Am75SzwjOVuFVEOs yZ3QEvxk6+drVmkYh12vXL5bdJ5Gcc1X7uXV6s/ZavA8qJSsMRCA/zzLJXJK2ZPIUPEU ASXAdDLBaOztgTx3fUtlHfmBBcBWUCGW1pmZYsnIGRvEW+L076lVRsUWuuz8Eo2+11Tx XfGQ== X-Gm-Message-State: APjAAAU6ZYtQ1AnBJDDFoZqLIik0N+K1X347M6hPnvZwgAWyh33sC59C JAHRIvCQfU2AnU+aw8grvcjU5Ur65PUS6gy6kHo= X-Received: by 2002:a2e:900e:: with SMTP id h14mr28081740ljg.77.1558599518508; Thu, 23 May 2019 01:18:38 -0700 (PDT) MIME-Version: 1.0 References: <1558366258-3808-1-git-send-email-jrdr.linux@gmail.com> <20190521085547.58e1650c@erd987> In-Reply-To: <20190521085547.58e1650c@erd987> From: Souptick Joarder Date: Thu, 23 May 2019 13:48:26 +0530 Message-ID: Subject: Re: [PATCH 2/2] auxdisplay/ht16k33.c: Convert to use vm_map_pages_zero() To: Robin van der Gracht Cc: Miguel Ojeda , linux-kernel@vger.kernel.org, Matthew Wilcox 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 21, 2019 at 12:24 PM Robin van der Gracht wrote: > > On Mon, 20 May 2019 21:00:58 +0530 > Souptick Joarder wrote: > > > While using mmap, the incorrect value of length and vm_pgoff are > > ignored and this driver go ahead with mapping fbdev.buffer > > to user vma. > > > > Convert vm_insert_pages() to use vm_map_pages_zero(). We could later > > "fix" these drivers to behave according to the normal vm_pgoff > > offsetting simply by removing the _zero suffix on the function name > > and if that causes regressions, it gives us an easy way to revert. > > > > Signed-off-by: Souptick Joarder > > --- > > drivers/auxdisplay/ht16k33.c | 4 ++-- > > 1 file changed, 2 insertions(+), 2 deletions(-) > > > > diff --git a/drivers/auxdisplay/ht16k33.c b/drivers/auxdisplay/ht16k33.c > > index 21393ec..9c0bb77 100644 > > --- a/drivers/auxdisplay/ht16k33.c > > +++ b/drivers/auxdisplay/ht16k33.c > > @@ -223,9 +223,9 @@ static int ht16k33_bl_check_fb(struct backlight_device *bl, struct fb_info *fi) > > static int ht16k33_mmap(struct fb_info *info, struct vm_area_struct *vma) > > { > > struct ht16k33_priv *priv = info->par; > > + struct page *pages = virt_to_page(priv->fbdev.buffer); > > > > - return vm_insert_page(vma, vma->vm_start, > > - virt_to_page(priv->fbdev.buffer)); > > + return vm_map_pages_zero(vma, &pages, 1); > > } > > > > static struct fb_ops ht16k33_fb_ops = { > > Acked-by: Robin van der Gracht Miguel, Ack from Robin is missing in linux-next-20190523 when applied.