From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andy Shevchenko Subject: Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning Date: Thu, 15 Feb 2018 14:55:37 +0200 Message-ID: References: <1518543933-22456-1-git-send-email-john.garry@huawei.com> <1518543933-22456-8-git-send-email-john.garry@huawei.com> <20180214161635.GA13849@e107981-ln.cambridge.arm.com> <65185a4d-c712-4486-d713-3fa9de14e35d@huawei.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Return-path: In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: John Garry Cc: Lorenzo Pieralisi , "Rafael J. Wysocki" , Mika Westerberg , "Rafael J. Wysocki" , Hanjun Guo , Rob Herring , Bjorn Helgaas , Arnd Bergmann , Mark Rutland , Olof Johansson , Dann Frazier , Rob Herring , Joe Perches , Benjamin Herrenschmidt , linux-pci-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Linux Kernel Mailing List , ACPI Devel Maling List , Linuxarm , Corey Minyard devicetree List-Id: linux-acpi@vger.kernel.org On Thu, Feb 15, 2018 at 2:52 PM, John Garry wrote: > On 15/02/2018 12:22, Andy Shevchenko wrote: >> On Thu, Feb 15, 2018 at 1:19 PM, John Garry wrote: >>> +static const struct acpi_device_id indirect_io_hosts[] = { >>> + {"HISI0191", 0}, /* HiSilicon LPC host */ >>> + {}, >> >> >> Just a nit. >> > > I noticed that I have this in the LLDD also. I think that this may be a > force of habit. >> It seems lately this happens more often than usual, I mean a comma in >> the terminator line. >> >> If we remove it. we terminate not only at runtime, but at compile >> time, which is slightly better. > > > I grepped for "{}," in the drivers folder and it gives many results (I do > accept that some are not sentinels): Yes, in old code it might be, but why to cargo-culting bad (okay, less worth) practices? >>grep -R "{}," * | tail Btw, `git grep ...` is much faster. > watchdog/gef_wdt.c: {}, > watchdog/asm9260_wdt.c: {}, > watchdog/bcm2835_wdt.c: {}, > watchdog/digicolor_wdt.c: {}, > watchdog/bcm7038_wdt.c: {}, > watchdog/ath79_wdt.c: {}, > watchdog/riowd.c: {}, > watchdog/sbsa_gwdt.c: {}, > watchdog/sbsa_gwdt.c: {}, > watchdog/bcm_kona_wdt.c: {}, -- With Best Regards, Andy Shevchenko -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1031358AbeBOMzl (ORCPT ); Thu, 15 Feb 2018 07:55:41 -0500 Received: from mail-qt0-f196.google.com ([209.85.216.196]:43832 "EHLO mail-qt0-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030245AbeBOMzj (ORCPT ); Thu, 15 Feb 2018 07:55:39 -0500 X-Google-Smtp-Source: AH8x2279Y6+4FnHdyaaWtfQ9mMZs5vbm1h+bWXv2zq/EWSP96eg8mwFUrKg4dXjAjoBkBZEc0pgQCEb4wcTlwlD0UzI= MIME-Version: 1.0 In-Reply-To: References: <1518543933-22456-1-git-send-email-john.garry@huawei.com> <1518543933-22456-8-git-send-email-john.garry@huawei.com> <20180214161635.GA13849@e107981-ln.cambridge.arm.com> <65185a4d-c712-4486-d713-3fa9de14e35d@huawei.com> From: Andy Shevchenko Date: Thu, 15 Feb 2018 14:55:37 +0200 Message-ID: Subject: Re: [PATCH v13 7/9] ACPI: Translate the I/O range of non-MMIO devices before scanning To: John Garry Cc: Lorenzo Pieralisi , "Rafael J. Wysocki" , Mika Westerberg , "Rafael J. Wysocki" , Hanjun Guo , Rob Herring , Bjorn Helgaas , Arnd Bergmann , Mark Rutland , Olof Johansson , Dann Frazier , Rob Herring , Joe Perches , Benjamin Herrenschmidt , linux-pci@vger.kernel.org, Linux Kernel Mailing List , ACPI Devel Maling List , Linuxarm , Corey Minyard , devicetree , Linux-Arch , Randy Dunlap Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 15, 2018 at 2:52 PM, John Garry wrote: > On 15/02/2018 12:22, Andy Shevchenko wrote: >> On Thu, Feb 15, 2018 at 1:19 PM, John Garry wrote: >>> +static const struct acpi_device_id indirect_io_hosts[] = { >>> + {"HISI0191", 0}, /* HiSilicon LPC host */ >>> + {}, >> >> >> Just a nit. >> > > I noticed that I have this in the LLDD also. I think that this may be a > force of habit. >> It seems lately this happens more often than usual, I mean a comma in >> the terminator line. >> >> If we remove it. we terminate not only at runtime, but at compile >> time, which is slightly better. > > > I grepped for "{}," in the drivers folder and it gives many results (I do > accept that some are not sentinels): Yes, in old code it might be, but why to cargo-culting bad (okay, less worth) practices? >>grep -R "{}," * | tail Btw, `git grep ...` is much faster. > watchdog/gef_wdt.c: {}, > watchdog/asm9260_wdt.c: {}, > watchdog/bcm2835_wdt.c: {}, > watchdog/digicolor_wdt.c: {}, > watchdog/bcm7038_wdt.c: {}, > watchdog/ath79_wdt.c: {}, > watchdog/riowd.c: {}, > watchdog/sbsa_gwdt.c: {}, > watchdog/sbsa_gwdt.c: {}, > watchdog/bcm_kona_wdt.c: {}, -- With Best Regards, Andy Shevchenko