From: okaya@codeaurora.org (okaya at codeaurora.org)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V7 4/4] dmaengine: qcom_hidma: add MSI support for interrupts
Date: Mon, 24 Oct 2016 07:07:19 -0400 [thread overview]
Message-ID: <12f6cc8ec2b83237b61965f8576cface@codeaurora.org> (raw)
In-Reply-To: <CAHp75VettN=-S+iqKQbqixRe2BM=AiS26VGM+8yLophbkc+Z8g@mail.gmail.com>
On 2016-10-24 03:30, Andy Shevchenko wrote:
> On Mon, Oct 24, 2016 at 5:55 AM, Sinan Kaya <okaya@codeaurora.org>
> wrote:
>> On 10/21/2016 12:11 PM, Andy Shevchenko wrote:
>>>> +static void hidma_free_msis(struct hidma_dev *dmadev)
>>>> > +{
>>>> > +#ifdef CONFIG_GENERIC_MSI_IRQ_DOMAIN
>>> Perhaps one #ifdef and two definitions of functions?
>>
>> I don't think it will make a difference. I'll have to move
>> #ifdef around the caller of hidma_free_msis instead which
>> I think is uglier.
>>
>> The hidma_write_msi_msg function gets called only when
>> CONFIG_GENERIC_MSI_IRQ_DOMAIN is defined. If I don't put
>> this around the function definition, I get unused function
>> warning from the compiler. This is the reason why preprocessor
>> definition is outside of the function definition.
>
> I am talking about something like below:
>
> #ifdef UGLY_DEFINE
> myfunc_a()
> {
> }
>
> myfunc_b()
> {
> }
> #else
> static inline myfunc_a() {}
> static inline myfunc_b() {}
> #endif
>
>
> There is another way as well, namely use of IS_ENABLED(), IS_BUILTIN()
> macros (I don't remember how exactly second one is spelt).
This was my initial approach. I was asked to remove the stub functions.
So, I did it.
next prev parent reply other threads:[~2016-10-24 11:07 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-10-21 16:37 [PATCH V7 0/4] dmaengine: qcom_hidma: add MSI interrupt support Sinan Kaya
2016-10-21 16:37 ` [PATCH V7 1/4] dmaengine: qcom_hidma: make pending_tre_count atomic Sinan Kaya
2016-10-21 16:37 ` [PATCH V7 2/4] dmaengine: qcom_hidma: bring out interrupt cause Sinan Kaya
2016-10-21 16:37 ` [PATCH V7 3/4] dmaengine: qcom_hidma: protect common data structures Sinan Kaya
2016-10-21 16:37 ` [PATCH V7 4/4] dmaengine: qcom_hidma: add MSI support for interrupts Sinan Kaya
2016-10-21 19:11 ` Andy Shevchenko
2016-10-24 2:55 ` Sinan Kaya
2016-10-24 7:30 ` Andy Shevchenko
2016-10-24 11:07 ` okaya at codeaurora.org [this message]
2016-11-03 13:17 ` [PATCH V7 0/4] dmaengine: qcom_hidma: add MSI interrupt support Koul, Vinod
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=12f6cc8ec2b83237b61965f8576cface@codeaurora.org \
--to=okaya@codeaurora.org \
--cc=linux-arm-kernel@lists.infradead.org \
/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;
as well as URLs for NNTP newsgroup(s).