Messages in this thread | | | Date | Fri, 19 Jun 2020 19:30:55 +0200 | From | Peter Zijlstra <> | Subject | Re: [PATCH 1/2] sched/uclamp: Fix initialization of strut uclamp_rq |
| |
On Thu, Jun 18, 2020 at 08:55:24PM +0100, Qais Yousef wrote:
> + for_each_clamp_id(clamp_id) { > + memset(uc_rq[clamp_id].bucket, > + 0, > + sizeof(struct uclamp_bucket)*UCLAMP_BUCKETS); > + > + uc_rq[clamp_id].value = uclamp_none(clamp_id);
I think you can replace all that with:
*uc_rq = (struct uclamp_rq){ .value = uclamp_none(clamp_id), };
it's shorter and is free or weird line-breaks :-)
> + }
| |