All of lore.kernel.org
 help / color / mirror / Atom feed
From: Alex Elder <elder@linaro.org>
To: Leon Romanovsky <leon@kernel.org>
Cc: Bjorn Andersson <bjorn.andersson@linaro.org>,
	Ohad Ben-Cohen <ohad@wizery.com>,
	David Miller <davem@davemloft.net>, Arnd Bergmann <arnd@arndb.de>,
	Andy Gross <agross@kernel.org>,
	Johannes Berg <johannes@sipsolutions.net>,
	Dan Williams <dcbw@redhat.com>, Evan Green <evgreen@google.com>,
	Eric Caruso <ejcaruso@google.com>,
	Susheel Yadav Yadagiri <syadagir@codeaurora.org>,
	Chaitanya Pratapa <cpratapa@codeaurora.org>,
	Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>,
	Rob Herring <robh+dt@kernel.org>,
	Mark Rutland <mark.rutland@arm.com>,
	Siddharth Gupta <sidgup@codeaurora.org>,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org, linux-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 01/17] remoteproc: add IPA notification to q6v5 driver
Date: Fri, 6 Mar 2020 07:29:23 -0600	[thread overview]
Message-ID: <5548579d-179d-b099-afa9-6b76e9fa5a89@linaro.org> (raw)
In-Reply-To: <20200306114941.GO184088@unreal>

On 3/6/20 5:49 AM, Leon Romanovsky wrote:
> On Thu, Mar 05, 2020 at 10:28:15PM -0600, Alex Elder wrote:
>> Set up a subdev in the q6v5 modem remoteproc driver that generates
>> event notifications for the IPA driver to use for initialization and
>> recovery following a modem shutdown or crash.

. . .

>> diff --git a/include/linux/remoteproc/qcom_q6v5_ipa_notify.h b/include/linux/remoteproc/qcom_q6v5_ipa_notify.h
>> new file mode 100644
>> index 000000000000..0820edc0ab7d
>> --- /dev/null
>> +++ b/include/linux/remoteproc/qcom_q6v5_ipa_notify.h
>> @@ -0,0 +1,82 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +
>> +/* Copyright (C) 2019 Linaro Ltd. */
>> +
>> +#ifndef __QCOM_Q6V5_IPA_NOTIFY_H__
>> +#define __QCOM_Q6V5_IPA_NOTIFY_H__
>> +
>> +#if IS_ENABLED(CONFIG_QCOM_Q6V5_IPA_NOTIFY)
> 
> Why don't you put this guard in the places where such include is called?
> Or the best variant is to ensure that this include is compiled in only
> in CONFIG_QCOM_Q6V5_IPA_NOTIFY flows.

I did it this way so the no-op definitions resided in the same header
file if the config option is not enabled.  And the no-ops were there
so the calling code didn't have to use #ifdef.

I have no objection to what you suggest.  I did a quick scan for other
examples like this for guidance and found lots of examples of doing it
the way I did.

So I'm happy to change it, but would like an additional request to do
so before I do that work.

Thanks.

					-Alex

> That is more common way to guard internal header files.
> 
> Thanks
> 


WARNING: multiple messages have this Message-ID (diff)
From: Alex Elder <elder@linaro.org>
To: Leon Romanovsky <leon@kernel.org>
Cc: Ohad Ben-Cohen <ohad@wizery.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Susheel Yadav Yadagiri <syadagir@codeaurora.org>,
	Eric Caruso <ejcaruso@google.com>, Arnd Bergmann <arnd@arndb.de>,
	devicetree@vger.kernel.org, Dan Williams <dcbw@redhat.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
	Rob Herring <robh+dt@kernel.org>,
	Bjorn Andersson <bjorn.andersson@linaro.org>,
	Siddharth Gupta <sidgup@codeaurora.org>,
	Andy Gross <agross@kernel.org>, Evan Green <evgreen@google.com>,
	linux-arm-kernel@lists.infradead.org,
	linux-arm-msm@vger.kernel.org,
	Subash Abhinov Kasiviswanathan <subashab@codeaurora.org>,
	Johannes Berg <johannes@sipsolutions.net>,
	linux-soc@vger.kernel.org, David Miller <davem@davemloft.net>,
	Chaitanya Pratapa <cpratapa@codeaurora.org>
Subject: Re: [PATCH v2 01/17] remoteproc: add IPA notification to q6v5 driver
Date: Fri, 6 Mar 2020 07:29:23 -0600	[thread overview]
Message-ID: <5548579d-179d-b099-afa9-6b76e9fa5a89@linaro.org> (raw)
In-Reply-To: <20200306114941.GO184088@unreal>

On 3/6/20 5:49 AM, Leon Romanovsky wrote:
> On Thu, Mar 05, 2020 at 10:28:15PM -0600, Alex Elder wrote:
>> Set up a subdev in the q6v5 modem remoteproc driver that generates
>> event notifications for the IPA driver to use for initialization and
>> recovery following a modem shutdown or crash.

. . .

>> diff --git a/include/linux/remoteproc/qcom_q6v5_ipa_notify.h b/include/linux/remoteproc/qcom_q6v5_ipa_notify.h
>> new file mode 100644
>> index 000000000000..0820edc0ab7d
>> --- /dev/null
>> +++ b/include/linux/remoteproc/qcom_q6v5_ipa_notify.h
>> @@ -0,0 +1,82 @@
>> +/* SPDX-License-Identifier: GPL-2.0 */
>> +
>> +/* Copyright (C) 2019 Linaro Ltd. */
>> +
>> +#ifndef __QCOM_Q6V5_IPA_NOTIFY_H__
>> +#define __QCOM_Q6V5_IPA_NOTIFY_H__
>> +
>> +#if IS_ENABLED(CONFIG_QCOM_Q6V5_IPA_NOTIFY)
> 
> Why don't you put this guard in the places where such include is called?
> Or the best variant is to ensure that this include is compiled in only
> in CONFIG_QCOM_Q6V5_IPA_NOTIFY flows.

I did it this way so the no-op definitions resided in the same header
file if the config option is not enabled.  And the no-ops were there
so the calling code didn't have to use #ifdef.

I have no objection to what you suggest.  I did a quick scan for other
examples like this for guidance and found lots of examples of doing it
the way I did.

So I'm happy to change it, but would like an additional request to do
so before I do that work.

Thanks.

					-Alex

> That is more common way to guard internal header files.
> 
> Thanks
> 


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

  reply	other threads:[~2020-03-06 13:30 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-06  4:28 [PATCH v2 00/17] net: introduce Qualcomm IPA driver (UPDATED) Alex Elder
2020-03-06  4:28 ` Alex Elder
2020-03-06  4:28 ` [PATCH v2 01/17] remoteproc: add IPA notification to q6v5 driver Alex Elder
2020-03-06  4:28   ` Alex Elder
2020-03-06 11:49   ` Leon Romanovsky
2020-03-06 11:49     ` Leon Romanovsky
2020-03-06 13:29     ` Alex Elder [this message]
2020-03-06 13:29       ` Alex Elder
2020-03-06  4:28 ` [PATCH v2 02/17] dt-bindings: soc: qcom: add IPA bindings Alex Elder
2020-03-06  4:28   ` Alex Elder
2020-03-06  4:28 ` [PATCH v2 03/17] soc: qcom: ipa: main code Alex Elder
2020-03-06  4:28   ` Alex Elder
2020-03-06  4:28 ` [PATCH v2 04/17] soc: qcom: ipa: configuration data Alex Elder
2020-03-06  4:28   ` Alex Elder
2020-03-06  4:28 ` [PATCH v2 05/17] soc: qcom: ipa: clocking, interrupts, and memory Alex Elder
2020-03-06  4:28   ` Alex Elder
2020-03-06  4:28 ` [PATCH v2 06/17] soc: qcom: ipa: GSI headers Alex Elder
2020-03-06  4:28   ` Alex Elder
2020-03-06  4:28 ` [PATCH v2 07/17] soc: qcom: ipa: the generic software interface Alex Elder
2020-03-06  4:28   ` Alex Elder
2020-03-06  4:28 ` [PATCH v2 08/17] soc: qcom: ipa: IPA interface to GSI Alex Elder
2020-03-06  4:28   ` Alex Elder
2020-03-06  4:28 ` [PATCH v2 09/17] soc: qcom: ipa: GSI transactions Alex Elder
2020-03-06  4:28   ` Alex Elder
2020-03-06  4:28 ` [PATCH v2 10/17] soc: qcom: ipa: IPA endpoints Alex Elder
2020-03-06  4:28   ` Alex Elder
2020-03-06  4:28 ` [PATCH v2 11/17] soc: qcom: ipa: filter and routing tables Alex Elder
2020-03-06  4:28   ` Alex Elder
2020-03-06  4:28 ` [PATCH v2 12/17] soc: qcom: ipa: immediate commands Alex Elder
2020-03-06  4:28   ` Alex Elder
2020-03-06  4:28 ` [PATCH v2 13/17] soc: qcom: ipa: modem and microcontroller Alex Elder
2020-03-06  4:28   ` Alex Elder
2020-03-06  4:28 ` [PATCH v2 14/17] soc: qcom: ipa: AP/modem communications Alex Elder
2020-03-06  4:28   ` Alex Elder
2020-03-06  4:28 ` [PATCH v2 15/17] soc: qcom: ipa: support build of IPA code Alex Elder
2020-03-06  4:28   ` Alex Elder
2020-03-11 10:54   ` Jon Hunter
2020-03-11 10:54     ` Jon Hunter
2020-03-11 12:33     ` Alex Elder
2020-03-11 12:33       ` Alex Elder
2020-03-06  4:28 ` [PATCH v2 16/17] MAINTAINERS: add entry for the Qualcomm IPA driver Alex Elder
2020-03-06  4:28   ` Alex Elder
2020-03-06  4:28 ` [PATCH v2 17/17] arm64: dts: sdm845: add IPA information Alex Elder
2020-03-06  4:28   ` Alex Elder
2020-03-11 10:49   ` Jon Hunter
2020-03-11 10:49     ` Jon Hunter
2020-03-11 14:39     ` Alex Elder
2020-03-11 14:39       ` Alex Elder
2020-03-11 19:02       ` Bjorn Andersson
2020-03-11 19:02         ` Bjorn Andersson
2020-03-09  5:09 ` [PATCH v2 00/17] net: introduce Qualcomm IPA driver (UPDATED) David Miller
2020-03-09  5:09   ` David Miller
2020-03-09 16:54 ` Dave Taht
2020-03-09 16:54   ` Dave Taht
2020-03-12  3:09   ` Alex Elder
2020-03-12  3:09     ` Alex Elder
2020-04-29 23:17 ` Evan Green
2020-04-29 23:17   ` Evan Green

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=5548579d-179d-b099-afa9-6b76e9fa5a89@linaro.org \
    --to=elder@linaro.org \
    --cc=agross@kernel.org \
    --cc=arnd@arndb.de \
    --cc=bjorn.andersson@linaro.org \
    --cc=cpratapa@codeaurora.org \
    --cc=davem@davemloft.net \
    --cc=dcbw@redhat.com \
    --cc=devicetree@vger.kernel.org \
    --cc=ejcaruso@google.com \
    --cc=evgreen@google.com \
    --cc=johannes@sipsolutions.net \
    --cc=leon@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-soc@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=netdev@vger.kernel.org \
    --cc=ohad@wizery.com \
    --cc=robh+dt@kernel.org \
    --cc=sidgup@codeaurora.org \
    --cc=subashab@codeaurora.org \
    --cc=syadagir@codeaurora.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.