From: Matthias Brugger <mbrugger@suse.com>
To: Stuart Yoder <stuart.yoder@nxp.com>,
"gregkh@linuxfoundation.org" <gregkh@linuxfoundation.org>
Cc: "devel@driverdev.osuosl.org" <devel@driverdev.osuosl.org>,
"agraf@suse.de" <agraf@suse.de>, "arnd@arndb.de" <arnd@arndb.de>,
Jose Rivera <german.rivera@nxp.com>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Yang-Leo Li <leoyang.li@nxp.com>
Subject: Re: [PATCH 06/11] staging: fsl-mc: make fsl_mc_is_root_dprc() global
Date: Wed, 29 Jun 2016 17:01:52 +0200 [thread overview]
Message-ID: <5773E2E0.4050802@suse.com> (raw)
In-Reply-To: <HE1PR04MB1641CA8B7550E05BE9AC93938D230@HE1PR04MB1641.eurprd04.prod.outlook.com>
On 29/06/16 16:25, Stuart Yoder wrote:
>
>
>> -----Original Message-----
>> From: Matthias Brugger [mailto:mbrugger@suse.com]
>> Sent: Wednesday, June 29, 2016 9:17 AM
>> To: Stuart Yoder <stuart.yoder@nxp.com>; gregkh@linuxfoundation.org
>> Cc: devel@driverdev.osuosl.org; agraf@suse.de; arnd@arndb.de; Jose Rivera <german.rivera@nxp.com>;
>> linux-kernel@vger.kernel.org; Yang-Leo Li <leoyang.li@nxp.com>
>> Subject: Re: [PATCH 06/11] staging: fsl-mc: make fsl_mc_is_root_dprc() global
>>
>> On 22/06/16 23:40, Stuart Yoder wrote:
>>> make fsl_mc_is_root_dprc() global so that the dprc driver
>>> can use it
>>>
>>> Signed-off-by: Stuart Yoder <stuart.yoder@nxp.com>
>>> ---
>>> drivers/staging/fsl-mc/bus/mc-bus.c | 28 +++++++++++++---------------
>>> drivers/staging/fsl-mc/include/mc.h | 2 ++
>>> 2 files changed, 15 insertions(+), 15 deletions(-)
>>>
>>> diff --git a/drivers/staging/fsl-mc/bus/mc-bus.c b/drivers/staging/fsl-mc/bus/mc-bus.c
>>> index e975adc..a49186e 100644
>>> --- a/drivers/staging/fsl-mc/bus/mc-bus.c
>>> +++ b/drivers/staging/fsl-mc/bus/mc-bus.c
>>> @@ -24,8 +24,6 @@
>>>
>>> static struct kmem_cache *mc_dev_cache;
>>>
>>> -static bool fsl_mc_is_root_dprc(struct device *dev);
>>> -
>>> /**
>>> * fsl_mc_bus_match - device to driver matching callback
>>> * @dev: the MC object device structure to match against
>>> @@ -247,19 +245,6 @@ static void fsl_mc_get_root_dprc(struct device *dev,
>>> }
>>> }
>>>
>>> -/**
>>> - * fsl_mc_is_root_dprc - function to check if a given device is a root dprc
>>> - */
>>> -static bool fsl_mc_is_root_dprc(struct device *dev)
>>> -{
>>> - struct device *root_dprc_dev;
>>> -
>>> - fsl_mc_get_root_dprc(dev, &root_dprc_dev);
>>> - if (!root_dprc_dev)
>>> - return false;
>>> - return dev == root_dprc_dev;
>>> -}
>>> -
>>> static int get_dprc_attr(struct fsl_mc_io *mc_io,
>>> int container_id, struct dprc_attributes *attr)
>>> {
>>> @@ -424,6 +409,19 @@ error_cleanup_regions:
>>> }
>>>
>>> /**
>>> + * fsl_mc_is_root_dprc - function to check if a given device is a root dprc
>>> + */
>>> +bool fsl_mc_is_root_dprc(struct device *dev)
>>> +{
>>> + struct device *root_dprc_dev;
>>> +
>>> + fsl_mc_get_root_dprc(dev, &root_dprc_dev);
>>> + if (!root_dprc_dev)
>>> + return false;
>>> + return dev == root_dprc_dev;
>>> +}
>>> +
>>> +/**
>>
>> Is there any reason why apart from deleting "static" you move
>> fsl_mc_is_root to a different line?
>
> I moved it just to keep internal consistency inside the source file where all the
> static functions were grouped together in the first part of the file, and public
> functions were in the second part.
>
Ok, thanks for clarification.
Reviewed-by: Matthias Brugger <mbrugger@suse.com>
next prev parent reply other threads:[~2016-06-29 15:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-22 21:40 [PATCH 00/11] staging: fsl-mc: module loading support, fixes, and cleanup Stuart Yoder
2016-06-22 21:40 ` [PATCH 01/11] staging: fsl-mc: add support for the modalias sysfs attribute Stuart Yoder
2016-06-22 21:40 ` [PATCH 02/11] staging: fsl-mc: implement uevent callback and set the modalias Stuart Yoder
2016-06-22 21:40 ` [PATCH 03/11] staging: fsl-mc: clean up the device id struct Stuart Yoder
2016-06-29 15:03 ` Matthias Brugger
2016-06-22 21:40 ` [PATCH 04/11] staging: fsl-mc: add support for device table matching Stuart Yoder
2016-06-22 21:40 ` [PATCH 05/11] staging: fsl-mc: export mc_get_version Stuart Yoder
2016-06-22 21:40 ` [PATCH 06/11] staging: fsl-mc: make fsl_mc_is_root_dprc() global Stuart Yoder
2016-06-29 14:17 ` Matthias Brugger
2016-06-29 14:25 ` Stuart Yoder
2016-06-29 15:01 ` Matthias Brugger [this message]
2016-06-22 21:40 ` [PATCH 07/11] staging: fsl-mc: fix asymmetry in destroy of mc_io Stuart Yoder
2016-06-22 21:40 ` [PATCH 08/11] staging: fsl-mc: dprc: add missing irq free Stuart Yoder
2016-06-22 21:40 ` [PATCH 09/11] staging: fsl-mc: dprc: fix ordering problem freeing resources in remove of dprc Stuart Yoder
2016-06-22 21:40 ` [PATCH 10/11] staging: fsl-mc: properly set hwirq in msi set_desc Stuart Yoder
2016-06-22 21:40 ` [PATCH 11/11] staging: fsl-mc: convert mc command build/parse to use C structs Stuart Yoder
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=5773E2E0.4050802@suse.com \
--to=mbrugger@suse.com \
--cc=agraf@suse.de \
--cc=arnd@arndb.de \
--cc=devel@driverdev.osuosl.org \
--cc=german.rivera@nxp.com \
--cc=gregkh@linuxfoundation.org \
--cc=leoyang.li@nxp.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stuart.yoder@nxp.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;
as well as URLs for NNTP newsgroup(s).