From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 67D11C32771 for ; Thu, 9 Jan 2020 10:21:04 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 38C612072A for ; Thu, 9 Jan 2020 10:21:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729249AbgAIKVE (ORCPT ); Thu, 9 Jan 2020 05:21:04 -0500 Received: from mga05.intel.com ([192.55.52.43]:56730 "EHLO mga05.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729118AbgAIKVD (ORCPT ); Thu, 9 Jan 2020 05:21:03 -0500 X-Amp-Result: UNKNOWN X-Amp-Original-Verdict: FILE UNKNOWN X-Amp-File-Uploaded: False Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by fmsmga105.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 09 Jan 2020 02:21:02 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.69,413,1571727600"; d="scan'208";a="272076267" Received: from smile.fi.intel.com (HELO smile) ([10.237.68.40]) by FMSMGA003.fm.intel.com with ESMTP; 09 Jan 2020 02:21:00 -0800 Received: from andy by smile with local (Exim 4.93) (envelope-from ) id 1ipUw0-0006bc-PX; Thu, 09 Jan 2020 12:21:00 +0200 Date: Thu, 9 Jan 2020 12:21:00 +0200 From: Andy Shevchenko To: Hans de Goede Cc: Mika Westerberg , Linus Walleij , Bastien Nocera , Dmitry Mastykin , linux-gpio@vger.kernel.org, linux-acpi@vger.kernel.org Subject: Re: [PATCH v3] pinctrl: baytrail: Replace WARN with dev_info_once when setting direct-irq pin to output Message-ID: <20200109102100.GK32742@smile.fi.intel.com> References: <20200101145243.15912-1-hdegoede@redhat.com> <20200108174745.GG32742@smile.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-gpio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-gpio@vger.kernel.org On Thu, Jan 09, 2020 at 10:05:47AM +0100, Hans de Goede wrote: > On 08-01-2020 18:47, Andy Shevchenko wrote: > > On Wed, Jan 01, 2020 at 03:52:43PM +0100, Hans de Goede wrote: ... > > > /* > > > * Before making any direction modifications, do a check if gpio > > > * is set for direct IRQ. On baytrail, setting GPIO to output > > > * does not make sense, so let's at least warn the caller before > > > > ...if it's a warning, perhaps do a warning instead of info? > > Otherwise, we probably need to change a comment here. > > I went with info on purpose since this will trigger on all BYT devices with > a Goodix touchscreens of which we have quite a few, so my vote goes to maybe > the comment. Note that although the log level is info (because it is somewhat > expected to happen), the content of the log msg is still warning-ish. > > I guess we could replace "let's at least warn the caller before" with > "let's at least let the caller know before" What about simple 'warn -> inform' ? (I can update myself) > > > * they shoot themselves in the foot. > > > */ > > > - WARN(readl(conf_reg) & BYT_DIRECT_IRQ_EN, > > > - "Potential Error: Setting GPIO with direct_irq_en to output"); > > > + dev_info_once(vg->dev, "Potential Error: Setting GPIO with direct_irq_en to output"); -- With Best Regards, Andy Shevchenko