[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <BY1PR03MB145248744B7292B3D8B5FB6CFC230@BY1PR03MB1452.namprd03.prod.outlook.com>
Date: Mon, 26 Oct 2015 16:02:51 +0000
From: Lijun Pan <Lijun.Pan@...escale.com>
To: Greg KH <gregkh@...uxfoundation.org>
CC: "arnd@...db.de" <arnd@...db.de>,
"devel@...verdev.osuosl.org" <devel@...verdev.osuosl.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
Stuart Yoder <stuart.yoder@...escale.com>,
Katz Itai <itai.katz@...escale.com>,
Jose Rivera <German.Rivera@...escale.com>,
Li Leo <LeoLi@...escale.com>,
Scott Wood <scottwood@...escale.com>,
"agraf@...e.de" <agraf@...e.de>,
Hamciuc Bogdan <bhamciu1@...escale.com>,
Marginean Alexandru <R89243@...escale.com>,
"Sharma Bhupesh" <bhupesh.sharma@...escale.com>,
Erez Nir <nir.erez@...escale.com>,
Richard Schmitt <richard.schmitt@...escale.com>,
"dan.carpenter@...cle.com" <dan.carpenter@...cle.com>
Subject: RE: [PATCH 2/5] staging: fsl-mc: define a macro to differentiate root
dprc
> -----Original Message-----
> From: Greg KH [mailto:gregkh@...uxfoundation.org]
> Sent: Sunday, October 25, 2015 7:13 PM
> To: Pan Lijun-B44306 <Lijun.Pan@...escale.com>
> Cc: arnd@...db.de; devel@...verdev.osuosl.org; linux-
> kernel@...r.kernel.org; Yoder Stuart-B08248 <stuart.yoder@...escale.com>;
> katz Itai-RM05202 <itai.katz@...escale.com>; Rivera Jose-B46482
> <German.Rivera@...escale.com>; Li Yang-Leo-R58472 <LeoLi@...escale.com>;
> Wood Scott-B07421 <scottwood@...escale.com>; agraf@...e.de; Hamciuc
> Bogdan-BHAMCIU1 <bhamciu1@...escale.com>; Marginean Alexandru-R89243
> <R89243@...escale.com>; Sharma Bhupesh-B45370
> <bhupesh.sharma@...escale.com>; Erez Nir-RM30794
> <nir.erez@...escale.com>; Schmitt Richard-B43082
> <richard.schmitt@...escale.com>; dan.carpenter@...cle.com
> Subject: Re: [PATCH 2/5] staging: fsl-mc: define a macro to differentiate root
> dprc
>
> On Sun, Oct 25, 2015 at 05:41:20PM -0500, Lijun Pan wrote:
> > Define is_root_dprc(dev) to tell whether a device is root dprc or not
> > via platform_bus_type.
> >
> > Signed-off-by: Lijun Pan <Lijun.Pan@...escale.com>
> > ---
> > drivers/staging/fsl-mc/include/mc.h | 10 ++++++++++
> > 1 file changed, 10 insertions(+)
> >
> > diff --git a/drivers/staging/fsl-mc/include/mc.h
> > b/drivers/staging/fsl-mc/include/mc.h
> > index a933291..483763e 100644
> > --- a/drivers/staging/fsl-mc/include/mc.h
> > +++ b/drivers/staging/fsl-mc/include/mc.h
> > @@ -14,6 +14,7 @@
> > #include <linux/device.h>
> > #include <linux/mod_devicetable.h>
> > #include <linux/list.h>
> > +#include <linux/platform_device.h>
> > #include "../include/dprc.h"
> >
> > #define FSL_MC_VENDOR_FREESCALE 0x1957
> > @@ -109,6 +110,15 @@ struct fsl_mc_resource {
> > #define FSL_MC_IS_DPRC 0x0001
> >
> > /**
> > + * root dprc's parent is a platform device
> > + * that platform device's bus type is platform_bus_type.
> > + */
> > +#define is_root_dprc(dev) \
> > + ((to_fsl_mc_device(dev)->flags & FSL_MC_IS_DPRC) && \
> > + ((dev)->bus == &fsl_mc_bus_type) && \
> > + ((dev)->parent->bus == &platform_bus_type))
> > +
>
> It's best to make this type of thing a static inline function, to ensure you get the
> correct typechecking.
>
I will take your suggestion and make changes in patch v2.
Lijun
> thanks,
>
> greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists