From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dario Faggioli Subject: Re: [PATCH v2 04/10] xen: credit2: make accessor helpers inline functions instead of macros Date: Thu, 9 Feb 2017 16:33:00 +0100 Message-ID: <1486654380.3042.39.camel@citrix.com> References: <148664844741.595.10506268024432565895.stgit@Solace.fritz.box> <148664872587.595.4960352148914014602.stgit@Solace.fritz.box> <589C8C740200007800138423@prv-mh.provo.novell.com> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============9093451340109047426==" Return-path: Received: from mail6.bemta6.messagelabs.com ([193.109.254.103]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cbqju-0006BW-P1 for xen-devel@lists.xenproject.org; Thu, 09 Feb 2017 15:34:30 +0000 In-Reply-To: <589C8C740200007800138423@prv-mh.provo.novell.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" To: Jan Beulich Cc: George Dunlap , xen-devel@lists.xenproject.org, Anshul Makkar List-Id: xen-devel@lists.xenproject.org --===============9093451340109047426== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="=-CXriyvQcEOjcm7iwuCWF" --=-CXriyvQcEOjcm7iwuCWF Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Thu, 2017-02-09 at 07:36 -0700, Jan Beulich wrote: > > > > On 09.02.17 at 14:58, wrote: > > +/* CPU to runq_id macro */ > > +static always_inline int c2r(const struct scheduler *ops, unsigned > > cpu) > > +{ > > +=C2=A0=C2=A0=C2=A0=C2=A0return (csched2_priv(ops))->runq_map[(cpu)]; >=20 > 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) > > +{ > > +=C2=A0=C2=A0=C2=A0=C2=A0return &csched2_priv(ops)->rqd[c2r(ops, cpu)]; >=20 > ... here? >=20 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". >=20 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 --=20 <> (Raistlin Majere) ----------------------------------------------------------------- Dario Faggioli, Ph.D, http://about.me/dario.faggioli Senior Software Engineer, Citrix Systems R&D Ltd., Cambridge (UK) --=-CXriyvQcEOjcm7iwuCWF Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAABCAAGBQJYnIusAAoJEBZCeImluHPu+vYQAN2a2pXvVDqyL6+Exwug28pE tRBDNCq2B8GqAbrLV+6AK7KYSkLMkHia5CecaS4lwy2SzaiKpmWT5BPcW57niyGA MjqdRxDgO41JdCBDU6DlUt9XigCy/IA5ci+xdESazMPp6AvhGjgwIkzgg++lI2MP gzKSxeMKhWpHvw83sUkunAbWm3+Bvsfm/+et7q8eli6h9VOHg7srZNCTKNLRz0d1 JzOVOsjzeqf808HQ/XUXv9ayD6rAGM3Vlx2RkIN/4GFWNiBaSwVpynq+KrfZgQH7 O4DOn1rohWBT41p4YmcTc/NIiT4ELBkYJMkqqmk5tRmWPWvyp3EbngJQX6q07gxn oe7y6oafk2vHslnX7HvFkOxRohSZ5g5l5qEH64ypih0Eamvd2aZjsGYu2vZbF4rq ngoXhBCgGAN5qNzbkehrFnfZCf5SBmfC+IWdUKWoTurvklXMe1+CI+7C0tK72q/l UTqAEZGRSrcCH420eb3f9kv41bUQBbX1Sm0fXJK6TTTm1d5BXPzEV4t/N58sHu+Z JZ6sBM4wyrpMDuOhsp76w3wt9vzRMAjvMbHRfmzTbOte6j089Vea6tiaKX3hWxY0 J5wd3a8KO2z4zTBJzyLRv9jM6lVmwXbkAxQKTldOtLTfxqywBpA+0CDpqb1guQWP 4G1d2S0/GdBfYgEUcHt5 =kxyx -----END PGP SIGNATURE----- --=-CXriyvQcEOjcm7iwuCWF-- --===============9093451340109047426== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KWGVuLWRldmVs IG1haWxpbmcgbGlzdApYZW4tZGV2ZWxAbGlzdHMueGVuLm9yZwpodHRwczovL2xpc3RzLnhlbi5v cmcveGVuLWRldmVsCg== --===============9093451340109047426==--