From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-ot1-f72.google.com (mail-ot1-f72.google.com [209.85.210.72]) by kanga.kvack.org (Postfix) with ESMTP id C14596B026A for ; Fri, 12 Oct 2018 12:58:30 -0400 (EDT) Received: by mail-ot1-f72.google.com with SMTP id y34so8966507oti.1 for ; Fri, 12 Oct 2018 09:58:30 -0700 (PDT) Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 135-v6sor993768oia.49.2018.10.12.09.58.29 for (Google Transport Security); Fri, 12 Oct 2018 09:58:29 -0700 (PDT) MIME-Version: 1.0 References: <20181011175542.13045-1-keith.busch@intel.com> <20181012110020.pu5oanl6tnz4mibr@kshutemo-mobl1> In-Reply-To: <20181012110020.pu5oanl6tnz4mibr@kshutemo-mobl1> From: Dan Williams Date: Fri, 12 Oct 2018 09:58:18 -0700 Message-ID: Subject: Re: [PATCHv2] mm/gup: Cache dev_pagemap while pinning pages Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: "Kirill A. Shutemov" Cc: Keith Busch , Linux MM , Linux Kernel Mailing List , "Kirill A. Shutemov" , Dave Hansen , Andrew Morton On Fri, Oct 12, 2018 at 4:00 AM Kirill A. Shutemov wrote: [..] > > Does this have defined behavior? I would feel better with " = { 0 }" > > to be explicit. > > Well, it's not allowed by the standart, but GCC allows this. > You can see a warning with -pedantic. > > We use empty-list initializers a lot in the kernel: > $ git grep 'struct .*= {};' | wc -l > 997 > > It should be fine. Ah, ok. I would still say we should be consistent between the init syntax for 'ctx' in follow_page() and __get_user_pages(), and why not go with '= { 0 }', one less unnecessary gcc'ism.