|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH v2 23/30] xen+tools: Export maximum host and guest cpu featuresets via SYSCTL
>>> On 17.02.16 at 13:17, <andrew.cooper3@xxxxxxxxxx> wrote:
> On 17/02/16 08:30, Jan Beulich wrote:
>>>>> On 05.02.16 at 14:42, <andrew.cooper3@xxxxxxxxxx> wrote:
>>> @@ -190,6 +191,71 @@ long arch_do_sysctl(
>>> }
>>> break;
>>>
>>> + case XEN_SYSCTL_get_cpu_featureset:
>>> + {
>>> + const uint32_t *featureset;
>>> + unsigned int nr;
>>> +
>>> + /* Request for maximum number of features? */
>>> + if ( guest_handle_is_null(sysctl->u.cpu_featureset.features) )
>>> + {
>>> + sysctl->u.cpu_featureset.nr_features = FSCAPINTS;
>>> + if ( __copy_field_to_guest(u_sysctl, sysctl,
>>> + u.cpu_featureset.nr_features) )
>>> + ret = -EFAULT;
>>> + break;
>>> + }
>>> +
>>> + /* Clip the number of entries. */
>>> + nr = sysctl->u.cpu_featureset.nr_features;
>>> + if ( nr > FSCAPINTS )
>>> + nr = FSCAPINTS;
>> min() (perhaps even allowing to obviate the comment)?
>
> They are different types, and you specifically objected to min_t() before.
I commonly object to min_t() when min() can reasonably be used,
but I certainly prefer min_t() over some form of open coding. Apart
from that I suppose FSCAPINTS could easily be added a U suffix?
Jan
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |