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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1E571C7EE2A for ; Wed, 10 May 2023 14:25:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237371AbjEJOZK (ORCPT ); Wed, 10 May 2023 10:25:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57074 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237248AbjEJOZG (ORCPT ); Wed, 10 May 2023 10:25:06 -0400 Received: from fllv0016.ext.ti.com (fllv0016.ext.ti.com [198.47.19.142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AC2F09007; Wed, 10 May 2023 07:24:43 -0700 (PDT) Received: from lelv0265.itg.ti.com ([10.180.67.224]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 34AENknN023679; Wed, 10 May 2023 09:23:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1683728627; bh=gR6IVuKbRKYO1DmIRDu7mk6S0UxadvOmtfohJs7JR50=; h=Date:Subject:To:CC:References:From:In-Reply-To; b=ItmSnfRFxtgHAabhQiGvTlhdv+SN9n5Qm6WgQMOSmgQreqosoxIPHJh4La2aCOjsl QLjDB0EJat/v+Xwg/nmPT3IJ544OxIZx0ZzuF7ZWt4Rafy3cWgqAo4+vQk4je7GtGM MAXkJ1u2uNSFucdo+zakpJSUI9jk3+Svru7hhUlQ= Received: from DLEE114.ent.ti.com (dlee114.ent.ti.com [157.170.170.25]) by lelv0265.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 34AENkCD021548 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 10 May 2023 09:23:46 -0500 Received: from DLEE104.ent.ti.com (157.170.170.34) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Wed, 10 May 2023 09:23:46 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE104.ent.ti.com (157.170.170.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Wed, 10 May 2023 09:23:46 -0500 Received: from [128.247.81.95] (ileaxei01-snat2.itg.ti.com [10.180.69.6]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 34AENkET008910; Wed, 10 May 2023 09:23:46 -0500 Message-ID: Date: Wed, 10 May 2023 09:23:46 -0500 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.10.0 Subject: Re: [PATCH v4 2/4] can: m_can: Add hrtimer to generate software interrupt To: Marc Kleine-Budde CC: Chandrasekar Ramakrishnan , Wolfgang Grandegger , Krzysztof Kozlowski , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , , , , Schuyler Patton , Nishanth Menon , Vignesh Raghavendra , Tero Kristo , Rob Herring , , , Oliver Hartkopp , Simon Horman References: <20230501224624.13866-1-jm@ti.com> <20230501224624.13866-3-jm@ti.com> <20230502-twiddling-threaten-d032287d4630-mkl@pengutronix.de> <84e5b09e-f8b9-15ae-4871-e5e4c4f4a470@ti.com> <20230510-salad-decaf-009b9da48271-mkl@pengutronix.de> Content-Language: en-US From: Judith Mendez In-Reply-To: <20230510-salad-decaf-009b9da48271-mkl@pengutronix.de> Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Precedence: bulk List-ID: X-Mailing-List: linux-can@vger.kernel.org Hello Marc, On 5/10/23 02:21, Marc Kleine-Budde wrote: > On 09.05.2023 17:18:06, Judith Mendez wrote: > [...] >>>> + if (!mcan_class->polling && irq < 0) { >>>> + ret = -ENXIO; >>>> + dev_err_probe(mcan_class->dev, ret, "IRQ int0 not found and polling not activated\n"); >>>> + goto probe_fail; >>>> + } >>>> + >>>> + if (mcan_class->polling) { >>>> + if (irq > 0) { >>>> + mcan_class->polling = 0; >>> >>> false >>> >>>> + dev_dbg(mcan_class->dev, "Polling enabled and hardware IRQ found, use hardware IRQ\n"); >>> >>> "...using hardware IRQ" >>> >>> Use dev_info(), as there is something not 100% correct with the DT. >> >> Is it dev_info or dev_dbg? > > dev_info() - But without an explicit "poll-interval' in the DT, this > code path doesn't exist anymore. > >> I used to have dev_info since it was nice to see when polling was >> enabled. > > Re-read your code, this is not about enabling polling. This message > handles the case where an IRQ was given _and_ "poll-interval" was > specified. So there is something not 100% correct with the DT (IRQ _and_ > polling), but this is obsolete now. Sorry, I meant it was nice to see when polling was enabled or not. In this case, if polling was enabled but hardware IRQ exists, it is good information to see this print. But I understand now how this is a case where 'something is strange'. >> Also, I had seen this print and the next as informative prints, hence the dev_info(). > > We don't print messages when IRQs are enabled, so enabling polling > should be a dev_dbg(), too. > >> However, I was told in this review process to change to dev_dbg. Which is correct? > > Driver works correct -> dev_dbg() > Something is strange -> dev_info() Got it, this is very helpful. Thanks. regards, Judith