Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1506960
| From | Andy Shevchenko <andy.shevchenko@gmail.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH V7 4/4] dmaengine: qcom_hidma: add MSI support for interrupts |
| Date | 2016-10-24 09:40 +0200 |
| Message-ID | <svI1r-4up-3@gated-at.bofh.it> (permalink) |
| References | <suL1n-8bl-5@gated-at.bofh.it> <suL1o-8bl-33@gated-at.bofh.it> <suNwe-1sv-15@gated-at.bofh.it> <svDEu-1yA-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
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).
--
With Best Regards,
Andy Shevchenko
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH V7 4/4] dmaengine: qcom_hidma: add MSI support for interrupts Sinan Kaya <okaya@codeaurora.org> - 2016-10-21 18:40 +0200
Re: [PATCH V7 4/4] dmaengine: qcom_hidma: add MSI support for interrupts Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-10-21 21:20 +0200
Re: [PATCH V7 4/4] dmaengine: qcom_hidma: add MSI support for interrupts Sinan Kaya <okaya@codeaurora.org> - 2016-10-24 05:00 +0200
Re: [PATCH V7 4/4] dmaengine: qcom_hidma: add MSI support for interrupts Andy Shevchenko <andy.shevchenko@gmail.com> - 2016-10-24 09:40 +0200
Re: [PATCH V7 4/4] dmaengine: qcom_hidma: add MSI support for interrupts okaya@codeaurora.org - 2016-10-24 13:10 +0200
csiph-web