>>> Yi Sun <yi.y....@linux.intel.com> 07/15/17 2:48 AM >>> >static int write_psr_msrs(unsigned int socket, unsigned int cos, >const uint32_t val[], unsigned int array_len, >enum psr_feat_type feat_type) >{ >- return -ENOENT; >+ int ret; >+ struct psr_socket_info *info = get_socket_info(socket); >+ struct cos_write_info data = >+ { >+ .cos = cos, >+ .feature = info->features[feat_type], >+ .props = feat_props[feat_type], >+ }; >+ >+ if ( cos > info->features[feat_type]->cos_max ) >+ return -EINVAL; >+ >+ /* Skip to the feature's value head. */ >+ ret = skip_prior_features(&array_len, feat_type); >+ if ( ret < 0 ) >+ return ret; >+ else >+ val += ret;
With this (again pointless) else removed, Reviewed-by: Jan Beulich <jbeul...@suse.com> Jan _______________________________________________ Xen-devel mailing list Xen-devel@lists.xen.org https://lists.xen.org/xen-devel