Re: Bug in add_dma_entry()'s debugging code

From: Alan Stern
Date: Wed Dec 06 2023 - 11:21:58 EST


On Wed, Dec 06, 2023 at 05:12:40PM +0100, Ferry Toth wrote:
> Hi
>
> On 05-12-2023 19:28, Alan Stern wrote:
> > In the long run, it may turn out that trying to detect memory usage
> > patterns that could cause problems for architectures other than the one
> > currently running is not workable. Certainly it is a bad idea to have a
>
> Maybe. But while debugging code on your platform it is a good thing to get
> warnings for potential issues on other platforms.

Oh, absolutely! It's definitely a good thing. I'm just saying that
doing it may not be practical -- there may be too many false positives
(as in this bug report) and false negatives.

> In this case we (I) got misled by the warning message itself. That should be
> easy enough to improve.

I don't think so. Issuing incorrect warnings that should be ignored is
a very bad idea, no matter what the wording is. After seeing a few
messages like that, people learn to expect them -- and then they ignore
the valid warnings along with the incorrect ones.

Alan Stern