[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [XEN PATCH v2] xen/sched: mechanical renaming to address MISRA C:2012 Rule 5.3
On 25/07/23 16:52, Jan Beulich wrote: On 25.07.2023 11:08, Nicola Vetrini wrote:@@ -99,14 +99,15 @@ static void sched_set_affinity( struct sched_unit *unit, const cpumask_t *hard, const cpumask_t *soft);static struct sched_resource *cf_check-sched_idle_res_pick(const struct scheduler *ops, const struct sched_unit *unit) +sched_idle_res_pick( + const struct scheduler *ops, const struct sched_unit *unit) { return unit->res; }static void *cf_check-sched_idle_alloc_udata(const struct scheduler *ops, struct sched_unit *unit, - void *dd) +sched_idle_alloc_udata( + const struct scheduler *ops, struct sched_unit *unit, void *dd) { /* Any non-NULL pointer is fine here. */ return ZERO_BLOCK_PTR;These look like stray changes, presumably resulting from you not fully undoing earlier changes. You're right, they were the byproduct of an earlier edit to this patch. --- a/xen/common/sched/credit2.c +++ b/xen/common/sched/credit2.c @@ -3809,7 +3809,8 @@ csched2_dump(const struct scheduler *ops) struct list_head *iter_sdom; struct csched2_private *prv = csched2_priv(ops); unsigned long flags; - unsigned int j, loop; + unsigned int loop; + int j;This looks like a stray change too, just that it's unclear where it is coming from. I thought I added a note to the commit, but I probably did some mistake. That's why I changed it: Note: local variable 'j' in xen/common/sched/credit2.c:3888' should probably be unsigned as well, but I saw while editing the patch that it's used as a parameter to 'dump_pcpu', which takes an int. Changing the types of parameters used in these calls is probably a good target for another patch, as it's not relevant to Rule 5.3 @@ -3884,7 +3885,7 @@ csched2_dump(const struct scheduler *ops) list_for_each_entry ( rqd, &prv->rql, rql ) { struct list_head *iter, *runq = &rqd->runq; - int loop = 0; + loop = 0;/* We need the lock to scan the runqueue. */spin_lock(&rqd->lock);With the switch from declaration to statement, a blank line wants inserting (to separate the remaining declaration from the statements). Ok -- Nicola Vetrini, BSc Software Engineer, BUGSENG srl (https://bugseng.com)
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |