From: Jiri Slaby <jirislaby@kernel.org>
To: Christoph Hellwig <hch@lst.de>
Cc: stefani@seibold.net, jassisinghbrar@gmail.com,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] kfifo: don't include dma-mapping.h in kfifo.h
Date: Tue, 15 Oct 2024 10:19:05 +0200 [thread overview]
Message-ID: <60488994-e8bc-4f50-a592-8dc539d396d7@kernel.org> (raw)
In-Reply-To: <20241015075613.GB25487@lst.de>
On 15. 10. 24, 9:56, Christoph Hellwig wrote:
> On Tue, Oct 15, 2024 at 09:53:52AM +0200, Jiri Slaby wrote:
>>> 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.
>>
>> Well, I don't understand. Looking at:
>> #define kfifo_dma_in_prepare(fifo, sgl, nents, len) \
>> kfifo_dma_in_prepare_mapped(fifo, sgl, nents, len,
>> DMA_MAPPING_ERROR)
>>
>> You'd have to include dma-mapping.h if you used this macro.
>
> Yes, obviously.
>
>> Even though you
>> do not explicitly use any other def from the dma header.
>
> Sure.
>
>> Well, this is not a definition of self-containment.
>
> Yes, it is the exact definition of it.
Then it depends on which one, apparently.
So I disagree, but I don't mind either (meaning: I don't oppose to the
patch any longer either).
>> If you use every macro
>> from a header and it does not need any other include, then it is
>> self-contained.
>
> No, that goes way beyond the self containedness. In fact these days
> the main reason to use macros is exactly to avoid these kinds of
> dependencies.
--
js
suse labs
next prev parent reply other threads:[~2024-10-15 8:19 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-14 14:46 [PATCH] kfifo: don't include dma-mapping.h in kfifo.h Christoph Hellwig
2024-10-15 7:38 ` Jiri Slaby
2024-10-15 7:40 ` Christoph Hellwig
2024-10-15 7:53 ` Jiri Slaby
2024-10-15 7:56 ` Christoph Hellwig
2024-10-15 8:19 ` Jiri Slaby [this message]
2024-10-15 7:47 ` Jiri Slaby
2024-10-15 7:50 ` Christoph Hellwig
2024-10-15 7:55 ` Jiri Slaby
2024-10-15 7:57 ` Christoph Hellwig
2024-10-15 8:03 ` Jiri Slaby
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=60488994-e8bc-4f50-a592-8dc539d396d7@kernel.org \
--to=jirislaby@kernel.org \
--cc=hch@lst.de \
--cc=jassisinghbrar@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stefani@seibold.net \
/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