[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v10 07/25] x86: refactor psr: L3 CAT: implement get hw info flow.
>>> On 06.04.17 at 08:05, <yi.y.sun@xxxxxxxxxxxxxxx> wrote: > On 17-04-05 09:37:44, Jan Beulich wrote: >> >>> On 01.04.17 at 15:53, <yi.y.sun@xxxxxxxxxxxxxxx> wrote: >> > @@ -183,6 +187,22 @@ static bool feat_init_done(const struct >> > psr_socket_info *info) >> > return false; >> > } >> > >> > +static enum psr_feat_type psr_cbm_type_to_feat_type(enum cbm_type type) >> > +{ >> > + enum psr_feat_type feat_type; >> > + >> > + switch ( type ) >> > + { >> > + case PSR_CBM_TYPE_L3: >> > + feat_type = PSR_SOCKET_L3_CAT; >> > + break; >> > + default: >> > + ASSERT_UNREACHABLE(); >> > + } >> > + >> > + return feat_type; >> >> I'm pretty certain this will (validly) produce an uninitialized variable >> warning at least in a non-debug build. Not how I did say "add >> ASSERT_UNREACHABLE()" in the v9 review. >> > Do you mean to init feat_type to 'PSR_SOCKET_MAX_FEAT' and then check it > at the end of function using ASSERT? That's a (less desirable) option, but what I really mean is take v9 code and _add_ ASSERT_UNREACHABLE() first thing in the default case. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |