From: Judith Mendez <jm@ti.com>
To: Marc Kleine-Budde <mkl@pengutronix.de>
Cc: Chandrasekar Ramakrishnan <rcsekar@samsung.com>,
Wolfgang Grandegger <wg@grandegger.com>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
<linux-can@vger.kernel.org>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, Schuyler Patton <spatton@ti.com>,
Nishanth Menon <nm@ti.com>, Vignesh Raghavendra <vigneshr@ti.com>,
Tero Kristo <kristo@kernel.org>, Rob Herring <robh+dt@kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
<devicetree@vger.kernel.org>,
Oliver Hartkopp <socketcan@hartkopp.net>,
Simon Horman <simon.horman@corigine.com>
Subject: Re: [PATCH v4 2/4] can: m_can: Add hrtimer to generate software interrupt
Date: Wed, 10 May 2023 09:23:46 -0500 [thread overview]
Message-ID: <f8077b36-ed89-e957-1aba-f9cda7acd566@ti.com> (raw)
In-Reply-To: <20230510-salad-decaf-009b9da48271-mkl@pengutronix.de>
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
next prev parent reply other threads:[~2023-05-10 14:25 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-01 22:46 [PATCH v4 0/4] Enable multiple MCAN on AM62x Judith Mendez
2023-05-01 22:46 ` [PATCH v4 1/4] dt-bindings: net: can: Add poll-interval for MCAN Judith Mendez
2023-05-05 21:29 ` Rob Herring
2023-05-09 12:27 ` Marc Kleine-Budde
2023-05-09 17:02 ` Judith Mendez
2023-05-01 22:46 ` [PATCH v4 2/4] can: m_can: Add hrtimer to generate software interrupt Judith Mendez
2023-05-02 6:37 ` Marc Kleine-Budde
2023-05-02 18:09 ` Judith Mendez
2023-05-09 22:18 ` Judith Mendez
2023-05-10 7:21 ` Marc Kleine-Budde
2023-05-10 14:23 ` Judith Mendez [this message]
2023-05-01 22:46 ` [PATCH v4 3/4] DO_NOT_MERGE arm64: dts: ti: Add AM62x MCAN MAIN domain transceiver overlay Judith Mendez
2023-05-02 0:18 ` Nishanth Menon
2023-05-01 22:46 ` [PATCH v4 4/4] DO_NOT_MERGE arm64: dts: ti: Enable MCU MCANs for AM62x Judith Mendez
2023-05-02 6:52 ` [PATCH v4 0/4] Enable multiple MCAN on AM62x Krzysztof Kozlowski
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f8077b36-ed89-e957-1aba-f9cda7acd566@ti.com \
--to=jm@ti.com \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=kristo@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=nm@ti.com \
--cc=pabeni@redhat.com \
--cc=rcsekar@samsung.com \
--cc=robh+dt@kernel.org \
--cc=simon.horman@corigine.com \
--cc=socketcan@hartkopp.net \
--cc=spatton@ti.com \
--cc=vigneshr@ti.com \
--cc=wg@grandegger.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox