[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <d24379ab-5627-d37e-d61f-af68dd56ab12@kernel.org>
Date: Fri, 21 Jan 2022 19:51:44 +0100
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Dmitry Osipenko <digetx@...il.com>,
Ashish Mhetre <amhetre@...dia.com>, thierry.reding@...il.com,
jonathanh@...dia.com, linux-tegra@...r.kernel.org,
linux-kernel@...r.kernel.org
Cc: Snikam@...dia.com, vdumpa@...dia.com
Subject: Re: [Patch V3] memory: tegra: Add MC error logging on tegra186 onward
On 21/01/2022 19:49, Krzysztof Kozlowski wrote:
> On 21/01/2022 13:31, Dmitry Osipenko wrote:
>> ...
>>> @@ -529,12 +536,44 @@ static irqreturn_t tegra30_mc_handle_irq(int irq, void *data)
>>> u8 id, type;
>>> u32 value;
>>>
>>> - value = mc_readl(mc, MC_ERR_STATUS);
>>> + switch (bit) {
>>
>> Again, I see that the code wasn't tested :/ Shouldn't be too difficult
>> to create memory-read errors to check that at least basics work
>> properly. Please always test your changes next time.
>>
>> So it must be "switch(BIT(bit))" here, please write it like this:
>>
>> u32 intmask = BIT(bit);
>> ...
>> switch(intmask) {
>>
>
> Also, please build your changes with W=1... It's the second try of
> sending un-tested and not-working code. This time also with a compiler
> warning. This looks very bad :(
I am afraid this might be taken too literally and W=1 build will replace
other required steps, so let me be explicit:
We not only expect to compile it but also compile with W=1, run sparse,
smatch and coccicheck. Then also test.
>
> For big companies with a lot of engineers, like nVidia, it is useful if
> some internal review happens. It is a nice way to offload community
> reviewers which are - like maintainers - a scarce resource. Doing
> internal review is not a requirement, but helps to find such mistakes
> earlier, before using the community. It is simply nice to us.
>
Best regards,
Krzysztof
Powered by blists - more mailing lists