> -----Original Message----- > From: Wood Scott-B07421 > Sent: Tuesday, July 02, 2013 7:59 AM > To: Jia Hongtao-B38951 > Cc: linuxppc-dev@lists.ozlabs.org; Wood Scott-B07421; > ga...@kernel.crashing.org; Li Yang-R58472; Jia Hongtao-B38951 > Subject: Re: [PATCH V6] powerpc/MPIC: Add get_version API both for > internal and external use > > On 07/01/2013 12:26:06 AM, Jia Hongtao wrote: > > From: Hongtao Jia <hongtao....@freescale.com> > > > > MPIC version is useful information for both mpic_alloc() and > > mpic_init(). > > The patch provide an API to get MPIC version for reusing the code. > > Also, some other IP block may need MPIC version for their own use. > > The API for external use is also provided. > > > > Signed-off-by: Jia Hongtao <hongtao....@freescale.com> > > Signed-off-by: Li Yang <le...@freescale.com> > > --- > > V6: > > * Fix compile error on mpc83xx. > > I already applied V5 before realizing that it was this patch that you > updated, rather than the MSI patch that depends on it. There is no > compile error until the MSI patch that starts using this (which I haven't > yet applied, due to the error). Could you send a followup patch that > just adds the stub?
Yep, sure. > > > +/* Get the version of primary MPIC */ #ifdef CONFIG_MPIC extern u32 > > +fsl_mpic_primary_get_version(void); > > +#else > > +static inline u32 fsl_mpic_primary_get_version(void) > > +{ > > + return -ENOTSUPP; > > +} > > +#endif > [snip] > > +static u32 fsl_mpic_get_version(struct mpic *mpic) { > > + u32 brr1; > > + > > + if (!(mpic->flags & MPIC_FSL)) > > + return 0; > > In one case, calling this without having an FSL MPIC returns -ENOTSUPP, > and in another case it returns 0... Shouldn't it be consistent? > > Also returning a negative number as a u32 is not very nice. > > -Scott My mistake. Will be fixed. Thanks. -Hongtao _______________________________________________ Linuxppc-dev mailing list Linuxppc-dev@lists.ozlabs.org https://lists.ozlabs.org/listinfo/linuxppc-dev