From: okaya@codeaurora.org
To: Andy Shevchenko <andy.shevchenko@gmail.com>
Cc: dmaengine <dmaengine@vger.kernel.org>,
Timur Tabi <timur@codeaurora.org>,
devicetree <devicetree@vger.kernel.org>,
Christopher Covington <cov@codeaurora.org>,
Vinod Koul <vinod.koul@intel.com>, Jon Masters <jcm@redhat.com>,
Andy Gross <agross@codeaurora.org>, Arnd Bergmann <arnd@arndb.de>,
linux-arm-msm@vger.kernel.org,
linux-arm Mailing List <linux-arm-kernel@lists.infradead.org>,
Dan Williams <dan.j.williams@intel.com>,
Dave Jiang <dave.jiang@intel.com>,
Lars-Peter Clausen <lars@metafoo.de>,
linux-kernel@vger.kernel.org, dmaengine-owner@vger.kernel.org
Subject: Re: [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.
prev parent reply other threads:[~2016-10-24 11:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <1477067879-23750-1-git-send-email-okaya@codeaurora.org>
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 [this message]
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=agross@codeaurora.org \
--cc=andy.shevchenko@gmail.com \
--cc=arnd@arndb.de \
--cc=cov@codeaurora.org \
--cc=dan.j.williams@intel.com \
--cc=dave.jiang@intel.com \
--cc=devicetree@vger.kernel.org \
--cc=dmaengine-owner@vger.kernel.org \
--cc=dmaengine@vger.kernel.org \
--cc=jcm@redhat.com \
--cc=lars@metafoo.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=timur@codeaurora.org \
--cc=vinod.koul@intel.com \
/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
Powered by JetHome