[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Xen-devel] [PATCH v12 15/23] x86: refactor psr: CDP: implement set value callback function.
- To: "Yi Sun" <yi.y.sun@xxxxxxxxxxxxxxx>
- From: "Jan Beulich" <JBeulich@xxxxxxxx>
- Date: Mon, 03 Jul 2017 07:02:56 -0600
- Cc: kevin.tian@xxxxxxxxx, wei.liu2@xxxxxxxxxx, he.chen@xxxxxxxxxxxxxxx, andrew.cooper3@xxxxxxxxxx, dario.faggioli@xxxxxxxxxx, ian.jackson@xxxxxxxxxxxxx, mengxu@xxxxxxxxxxxxx, xen-devel@xxxxxxxxxxxxxxxxxxxx, chao.p.peng@xxxxxxxxxxxxxxx, roger.pau@xxxxxxxxxx
- Delivery-date: Mon, 03 Jul 2017 13:03:10 +0000
- List-id: Xen developer discussion <xen-devel.lists.xen.org>
>>> On 03.07.17 at 14:52, <yi.y.sun@xxxxxxxxxxxxxxx> wrote:
> Ok. Then, how about below change? Thanks!
> int ret = 0;
> for ( i = 0; i < props->cos_num; i++ )
> {
> if ( type == props->type[i] )
> {
> val[i] = new_val;
> ret = 0;
> break;
> }
> else if ( type == props->alt_type )
> val[i] = new_val;
> else
> ret = -EINVAL;
> }
This looks okay to me.
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
https://lists.xen.org/xen-devel
|