[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v9 08/25] x86: refactor psr: L3 CAT: implement get value flow.
>>> On 28.03.17 at 04:13, <yi.y.sun@xxxxxxxxxxxxxxx> wrote: > On 17-03-27 07:34:43, Jan Beulich wrote: >> >>> On 27.03.17 at 14:59, <yi.y.sun@xxxxxxxxxxxxxxx> wrote: >> > On 17-03-27 03:23:08, Jan Beulich wrote: >> >> >>> On 16.03.17 at 12:07, <yi.y.sun@xxxxxxxxxxxxxxx> wrote: >> >> > @@ -504,21 +515,30 @@ static struct psr_socket_info >> >> > *get_socket_info(unsigned int socket) >> >> > return socket_info + socket; >> >> > } >> >> > >> >> > -int psr_get_info(unsigned int socket, enum cbm_type type, >> >> > - uint32_t data[], unsigned int array_len) >> >> > +static const struct feat_node * psr_get_feat(unsigned int socket, >> >> > + enum cbm_type type) >> >> > { >> >> > const struct psr_socket_info *info = get_socket_info(socket); >> >> > const struct feat_node *feat; >> >> > enum psr_feat_type feat_type; >> >> > >> >> > if ( IS_ERR(info) ) >> >> > - return PTR_ERR(info); >> >> > + return NULL; >> >> >> >> You're losing the error information here - is that intentional? >> >> >> > This function returns the 'struct feat_node *' object. If error happens, it >> > returns NULL. The caller handles the error. >> >> You didn't understand: Your callee has handed you error >> information (a -E... value encoded as a pointer), which you >> discard. >> > Thanks for explanation! I will modify the type of 'psr_get_feat' to be able to > return such error back. Why would you need to modify its type? Just pass on the error indicator, instead of returning NULL. It's the caller(s) who need(s) to change. Jan _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx https://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |