|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 04/10] xen: credit2: make accessor helpers inline functions instead of macros
On Thu, 2017-02-09 at 07:36 -0700, Jan Beulich wrote:
> > > > On 09.02.17 at 14:58, <dario.faggioli@xxxxxxxxxx> wrote:
> > +/* CPU to runq_id macro */
> > +static always_inline int c2r(const struct scheduler *ops, unsigned
> > cpu)
> > +{
> > + return (csched2_priv(ops))->runq_map[(cpu)];
>
> Any reason for having the (pointless) parentheses here but not ...
> > +/* CPU to runqueue struct macro */
> > +static always_inline
> > +struct csched2_runqueue_data *c2rqd(const struct scheduler *ops,
> > unsigned cpu)
> > +{
> > + return &csched2_priv(ops)->rqd[c2r(ops, cpu)];
>
> ... here?
>
Nope. I'll get rid of them from above.
> Also I'm not sure whether the sched*.c files are an exception, but
> generally we don't use plain "unsigned" but always "unsigned int".
>
Yes, in sched_credit.c and sched_credit2.c there are a few unsigned.
But I'm happy to use "unsigned int" for new code, such as here.
Thanks and Regards,
Dario
--
<<This happens because I choose it to happen!>> (Raistlin Majere)
-----------------------------------------------------------------
Dario Faggioli, Ph.D, http://about.me/dario.faggioli
Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK)Attachment:
signature.asc _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |