Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp7382491rwr; Wed, 10 May 2023 07:35:52 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4Nf0lA+kfk+wPfO9U8G9zTAEPVHrgSlCPnKLs3+huswKSRO/15g68/DLReOz8FKFc0z8oa X-Received: by 2002:a05:6a20:914a:b0:ef:f659:8623 with SMTP id x10-20020a056a20914a00b000eff6598623mr24364118pzc.21.1683729352228; Wed, 10 May 2023 07:35:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683729352; cv=none; d=google.com; s=arc-20160816; b=lWrUEjPLgMQxBtXTDCkWBVky9PcOSg8mCO28K3IBeeLQ07uS8qj7SYKDgtpGG1hfZ/ PpNOiuoYR0NboCNY6e1wkvw0OKKvrbCO8R4SwL/HyG8dsSX677ogjgbCFeJP3QBHIJMa w7dy4ZFOJuL1uNeKa1pXF9CVQhYcf3c5cEMZe6G5NV2CizIggLXr65YteYrXm906VieN CVTnZ4IciC1w9JbFNXyS/C8I0MnVHta/2T8XHJTk8pOfJVcH0yYZulDULXTHwTNoT/7C O2g3CiqHM0OkeGFW0SBWMtGn+a6Rq96tvvM7/EzCfjCq24flyqEy6qrpN1/BIVkZtn0u +d/w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=gR6IVuKbRKYO1DmIRDu7mk6S0UxadvOmtfohJs7JR50=; b=gfzx+0hvFHvK53CQO5Yt1cV5Kw2U+IuM7qBafLxTBq64hGZ8rz58Wj68dpW8XQJr3C lN3Q+JD792rCqYhRocnvY1WxxVgmUbNE087R+ioCOCId/gFtXW9nWJkZyJjjxsY330gA hwE6o9uWoKt56PluWolVZ8NSojvU4HAtI10FDCtaLEYD08222pcROGkCQOll53P0BbYe dVrpDXwM6Mx8NFzOkYxVXx1FlNR+JRszZ+cjPDR9+GLDScdRmGkeFwUbFWYOQ+FfUFCx G3mT5AHVeK/ugiLUcWurJoCfnBf9SMfab6rVa/KALPZtjs2oRcYXKHURym882kxZBc5h JDsA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ItmSnfRF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id n6-20020aa79846000000b0064355e25c7esi5191014pfq.188.2023.05.10.07.35.36; Wed, 10 May 2023 07:35:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ItmSnfRF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237429AbjEJOZL (ORCPT + 99 others); Wed, 10 May 2023 10:25:11 -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 X-Spam-Status: No, score=-7.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A, RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS,T_SCC_BODY_TEXT_LINE, URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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