Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1433789 > unrolled thread

Re: [PATCH 06/11] staging: fsl-mc: make fsl_mc_is_root_dprc() global

Started byMatthias Brugger <mbrugger@suse.com>
First post2016-06-29 16:20 +0200
Last post2016-06-29 17:50 +0200
Articles 3 — 2 participants

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: [PATCH 06/11] staging: fsl-mc: make fsl_mc_is_root_dprc() global Matthias Brugger <mbrugger@suse.com> - 2016-06-29 16:20 +0200
    RE: [PATCH 06/11] staging: fsl-mc: make fsl_mc_is_root_dprc() global Stuart Yoder <stuart.yoder@nxp.com> - 2016-06-29 16:40 +0200
      Re: [PATCH 06/11] staging: fsl-mc: make fsl_mc_is_root_dprc() global Matthias Brugger <mbrugger@suse.com> - 2016-06-29 17:50 +0200

#1433789 — Re: [PATCH 06/11] staging: fsl-mc: make fsl_mc_is_root_dprc() global

FromMatthias Brugger <mbrugger@suse.com>
Date2016-06-29 16:20 +0200
SubjectRe: [PATCH 06/11] staging: fsl-mc: make fsl_mc_is_root_dprc() global
Message-ID<rPovo-5ep-29@gated-at.bofh.it>
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?

Regards,
Matthias

>    * Add a newly discovered MC object device to be visible in Linux
>    */
>   int fsl_mc_device_add(struct dprc_obj_desc *obj_desc,
> diff --git a/drivers/staging/fsl-mc/include/mc.h b/drivers/staging/fsl-mc/include/mc.h
> index a9a9d23..853cbf3 100644
> --- a/drivers/staging/fsl-mc/include/mc.h
> +++ b/drivers/staging/fsl-mc/include/mc.h
> @@ -207,6 +207,8 @@ int __must_check fsl_mc_allocate_irqs(struct fsl_mc_device *mc_dev);
>
>   void fsl_mc_free_irqs(struct fsl_mc_device *mc_dev);
>
> +bool fsl_mc_is_root_dprc(struct device *dev);
> +
>   extern struct bus_type fsl_mc_bus_type;
>
>   #endif /* _FSL_MC_H_ */
>

[toc] | [next] | [standalone]


#1433802

FromStuart Yoder <stuart.yoder@nxp.com>
Date2016-06-29 16:40 +0200
Message-ID<rPoOK-5l8-17@gated-at.bofh.it>
In reply to#1433789

> -----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.

Stuart

[toc] | [prev] | [next] | [standalone]


#1433867

FromMatthias Brugger <mbrugger@suse.com>
Date2016-06-29 17:50 +0200
Message-ID<rPpUu-5Yx-13@gated-at.bofh.it>
In reply to#1433802

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>

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web