Re: [PATCH] kfifo: don't include dma-mapping.h in kfifo.h

From: Christoph Hellwig
Date: Tue Oct 15 2024 - 03:41:10 EST


On Tue, Oct 15, 2024 at 09:38:24AM +0200, Jiri Slaby wrote:
> On 14. 10. 24, 16:46, Christoph Hellwig wrote:
>> Nothing in kfifo.h needs dma-mapping.h. Drop the include to
>> reduce include bloat.
>
> Except DMA_MAPPING_ERROR.

DMA_MAPPING_ERROR is never used by kfifo.h itself. It is used
by user of the header that instanciate one of the macros that use
it.

> The header should stay self-contained.

It does with this patch. You can include it as the only header
in a source file and will work fine. I've actually tried that.

>
> --
> js
> suse labs
---end quoted text---