Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5458790ybi; Tue, 28 May 2019 13:29:04 -0700 (PDT) X-Google-Smtp-Source: APXvYqwcSe1hr/TJPwpkNd95upIY1Bru1cdCyB61hH7myg4n4hZ2FWhKdjqorAEVxJBjzUYBg1Id X-Received: by 2002:a63:144e:: with SMTP id 14mr117117927pgu.304.1559075344411; Tue, 28 May 2019 13:29:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559075344; cv=none; d=google.com; s=arc-20160816; b=hpagYbzuYPIEgemFPOBo0YeZFpbrjUTk3nCbcbbU8GleBUqE6oUBRuepRakCYEbR8n AWvUs5n8WcZrRRwarYa3TBahoSbuH/oFvzOB13H2mqBWEoWGsmFbQkrFOm/+DUGUb6xg UMnWP38pGWEsULewHPbblT3vaWbeLq6OUjskRHYdCq6gvGZk/AF94Hn59WVGE8Z55+f9 n+yWcu7rRwHirOHJnmqamL+yMgzeJSA1qXlZb2PV8hVJcQP5FaWFl+QNKiNuYPi8OMU1 v4PIVi4b/yWLpKyEKvlgohHKLDDBfViza82ZUPDM77qhOhQkd53DsOtaYQflkJKmneJ9 V+Gw== 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=xNIfN8iP61jt3zQccTc9JxOkZ8J4CEm1u7qbNWzRMOM=; b=jRW8PHmehu79tszQEMFycqObc6WUBMpzMs9gSpreAhXm+SVyLXXl8oAzZ8YwRqV1j/ zntmTiSXaYGaNpYR7l3oSit+dZri+RM2EPY4d9ueQxH3N/u/CroGYK/UUieSeaybNotY /SJTUw65wRrbUT2h4YJSXBd3M2K1P3uKDRR3WOOascS54NlJLcgA8h7uctOOaQDvJk1o ykdUi6PIITYqf1lPLAA39Sx2rnDX1G2W2ofetgvtDzjQ0fy0Y+SkTIZt4Ut4uzPVCYjb 4xwHxPT+VS05o5O0o4MG4GbHEydyVT9WVHbsusuX/o79Erz7gGzB+at4rljxXwfjgTQ5 MM/Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=Pd06yysC; 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 r5si23605827pgv.166.2019.05.28.13.28.47; Tue, 28 May 2019 13:29:04 -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=Pd06yysC; 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 S1727216AbfE1TDy (ORCPT + 99 others); Tue, 28 May 2019 15:03:54 -0400 Received: from mail-lf1-f68.google.com ([209.85.167.68]:44197 "EHLO mail-lf1-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726526AbfE1TDy (ORCPT ); Tue, 28 May 2019 15:03:54 -0400 Received: by mail-lf1-f68.google.com with SMTP id r15so5989823lfm.11 for ; Tue, 28 May 2019 12:03:53 -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=xNIfN8iP61jt3zQccTc9JxOkZ8J4CEm1u7qbNWzRMOM=; b=Pd06yysCLBSycRTXjmvKdW4Y+phHo573v+/6jzUP+xP3ps/hunOO1mtGrJzymmotMx 7zR1oU8ZhbJj6VR78NkwLbJCmbgDlR7RA9b9wJIKnVnlN5jzcYV8+ATU/fkJ7tc8ab7w /+hb4CRqYA40DegwtV/SFf/6I8uHmFQixBD+OW25ggCJjCc/O1z+7TaZwvyE+BSibKBd v93/MxXRvgdq3Jkw7MhzduiRY55JyN6o3S0bwW10eo6Jd0abP542DYqBvpjnY3ssA5md rH5mrArbilaSYpjmru+39iJLPZupA8VX4KmPS+PI8UW6HiWd17rLGY9+/NKCIy47WG2d lNbw== 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=xNIfN8iP61jt3zQccTc9JxOkZ8J4CEm1u7qbNWzRMOM=; b=bp6VZrzSCyXI7od1JUfG2kviK/HB8v92qB/jZp3GGDqkGRzHAPQVPbGOOLcVBjveAx zdcVftqwtP8O259J7z7DLap5omXmAhQ0+RStQ5UHagI1M7FeGXzYqqUxB1+sQiHKP4uO mMTneQEERehP7mxxasmWR4VQHTuFsIeUjz5gAtyVxy6N/CfxJ2xLEIpIQoiNaCrImLpN g/5oiDaI/jC16ChwM6ikJoZutwsa6DEY20Zwtm5Olwvg6vqgTA5yrgoyBfksWmAe5jL8 MRMa7xGkumoQZl4JS+OJiL8oOIOlgaHPoij+0TMtycgQ9EMhbUoA+qJeNtyFwUfJyoJ4 S+DQ== X-Gm-Message-State: APjAAAUxGXa2Z2NmQ9xZ4e4oW4XpOMEEdDLB8CR1gICLHHgSNO+3XdEi ZrQKGCNH1Cu0Yo3vd/lqR4fjgfHTIeVi6Oyqdn0= X-Received: by 2002:ac2:598d:: with SMTP id w13mr2369750lfn.165.1559070232676; Tue, 28 May 2019 12:03:52 -0700 (PDT) MIME-Version: 1.0 References: <1558366258-3808-1-git-send-email-jrdr.linux@gmail.com> <20190521085547.58e1650c@erd987> In-Reply-To: From: Miguel Ojeda Date: Tue, 28 May 2019 21:03:41 +0200 Message-ID: Subject: Re: [PATCH 2/2] auxdisplay/ht16k33.c: Convert to use vm_map_pages_zero() To: Souptick Joarder Cc: Robin van der Gracht , linux-kernel , 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 Fri, May 24, 2019 at 8:07 AM Souptick Joarder wrote: > > > > Taking a quick look now, by the way, why does vm_map_pages_zero() (and > > > __vm_map_pages() etc.) get a pointer to an array instead of a pointer > > > to the first element? > > For this particular driver, one page is getting mapped into vma. But > there are other > places where a entire page array ( with more than one pages) mapped into > vma. That's the reason to pass pointer to an array and do rest of the operations > inside __vm_map_pages(). Ah, "pointer to array of source kernel pages" made me think the actual `struct page`s were the ones consecutive in memory, not the pointers. Maybe "array of page pointers" is more clear. > > Also, in __vm_map_pages(), semantically w.r.t. to the comment, > > shouldn't the first check test for equality too? (i.e. for vm_pgoff == > > num)? (even if such case fails in the second test anyway). > > Sorry, didn't get it. Do you mean there should be a separate check for > *vm_pgoff == num* ? No, that the first check should be widened. I will send a patch. Cheers, Miguel