|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [PATCH 5/6] xen/credit2: Clean up trace handling
On 17.09.2021 10:45, Andrew Cooper wrote:
> There is no need for bitfields anywhere - use more sensible types. There is
> also no need to cast 'd' to (unsigned char *) before passing it to a function
> taking void *.
>
> No functional change.
>
> Signed-off-by: Andrew Cooper <andrew.cooper3@xxxxxxxxxx>
Reviewed-by: Jan Beulich <jbeulich@xxxxxxxx>
with (nit) ...
> @@ -1888,18 +1883,17 @@ void burn_credits(struct csched2_runqueue_data *rqd,
> if ( unlikely(tb_init_done) )
> {
> struct {
> - unsigned unit:16, dom:16;
> - int credit, budget;
> - int delta;
> - } d;
> - d.dom = svc->unit->domain->domain_id;
> - d.unit = svc->unit->unit_id;
> - d.credit = svc->credit;
> - d.budget = has_cap(svc) ? svc->budget : INT_MIN;
> - d.delta = delta;
> - __trace_var(TRC_CSCHED2_CREDIT_BURN, 1,
> - sizeof(d),
> - (unsigned char *)&d);
> + uint16_t unit, dom;
> + uint32_t credit, budget, delta;
> + } d = {
> + .unit = svc->unit->unit_id,
> + .dom = svc->unit->domain->domain_id,
> + .credit = svc->credit,
> + .budget = has_cap(svc) ? svc->budget : INT_MIN,
... a stray blank removed here.
Jan
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |