From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751578AbcGOQcT (ORCPT ); Fri, 15 Jul 2016 12:32:19 -0400 Received: from mail-oi0-f52.google.com ([209.85.218.52]:36798 "EHLO mail-oi0-f52.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751119AbcGOQcP (ORCPT ); Fri, 15 Jul 2016 12:32:15 -0400 MIME-Version: 1.0 In-Reply-To: <5101961.eCg7ixLQWc@vostro.rjw.lan> References: <1468432402-4872-1-git-send-email-fu.wei@linaro.org> <1809117.TV1VJp2Xpr@vostro.rjw.lan> <5101961.eCg7ixLQWc@vostro.rjw.lan> From: Fu Wei Date: Sat, 16 Jul 2016 00:32:14 +0800 Message-ID: Subject: Re: [PATCH v7 4/9] acpi/arm64: Add GTDT table parse driver To: "Rafael J. Wysocki" Cc: "Rafael J. Wysocki" , Len Brown , Daniel Lezcano , Thomas Gleixner , Marc Zyngier , Lorenzo Pieralisi , Sudeep Holla , Hanjun Guo , "linux-arm-kernel@lists.infradead.org" , "linaro-acpi@lists.linaro.org" , Linux Kernel Mailing List , ACPI Devel Maling List , rruigrok@codeaurora.org, harba@codeaurora.org, Christopher Covington , Timur Tabi , G Gregory , Al Stone , Jon Masters , wei@redhat.com, Arnd Bergmann , Wim Van Sebroeck , Catalin Marinas , Will Deacon , Suravee Suthikulanit , Leo Duran , Guenter Roeck , "linux-watchdog@vger.kernel.org" , David Miller , Andrew Morton , Greg Kroah-Hartman , kvalo@codeaurora.org, Jiri Slaby , Christoffer Dall , Julien Grall Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Rafael, On 15 July 2016 at 21:07, Rafael J. Wysocki wrote: > On Friday, July 15, 2016 02:15:27 PM Rafael J. Wysocki wrote: >> On Friday, July 15, 2016 03:32:35 PM Fu Wei wrote: >> > Hi Rafael, >> > > > [cut] > >> > > >> > >> + return 0; >> > >> + } >> > >> + >> > >> + if (!gtdt->platform_timer_count) { >> > >> + pr_info("No Platform Timer.\n"); >> > >> + return 0; >> > >> + } >> > >> + >> > >> + acpi_gtdt_desc.platform_timer_start = (void *)gtdt + >> > >> + gtdt->platform_timer_offset; >> > >> + if (acpi_gtdt_desc.platform_timer_start < >> > >> + (void *)table + sizeof(struct acpi_table_gtdt)) { >> > >> + pr_err(FW_BUG "Platform Timer pointer error.\n"); >> > > >> > > Why pr_err()? >> > >> > if (true), that means the GTDT table has bugs. >> > >> >> And that's not a very useful piece of information unless you're debugging the >> platform, is it? > > FWIW, I'm not a big fan of printing "your firmware is buggy" type of messages > (especially at the "error" log level or higher) unless they can be clearly > connected to a specific type of functional failure. > > So if you want to pring an error-level message, something like "I cannot do X > because of the firmware bug Y" would be better IMO. So can I do this: pr_err(FW_BUG "Can NOT init platform_timer pointer, because of the GTDT table bug\n"); or pr_debug(FW_BUG "Can NOT init platform_timer_start, because of platform_timer_offset bug in GTDT\n"); or just delete it? which one do you prefer? I think maybe should provide some clue for users to fix the problem :-) any thought ? > > Thanks, > Rafael > -- Best regards, Fu Wei Software Engineer Red Hat