Re: [PATCH] sparc: convert old cpumask API into new one

From: KOSAKI Motohiro
Date: Thu Apr 28 2011 - 11:31:55 EST


> On Thu, Apr 28, 2011 at 12:14 PM, KOSAKI Motohiro
> <kosaki.motohiro@xxxxxxxxxxxxxx> wrote:
> > Adapt new API. Almost change is trivial, most important change are to
> > remove following like =operator.
> >
> > Âcpumask_t cpu_mask = *mm_cpumask(mm);
>
> Could you note that you are changing this to:
>
> cpumask_t cpu_mask;
> cpumask_copy(&cpu_mask, mm_cpumask(mm));
>
> > Âcpus_allowed = current->cpus_allowed;
>
> And this to:
>
> cpumask_copy(&cpus_allowed, tsk_cpus_allowed(current));

The code explain it clearly?


> > diff --git a/arch/sparc/kernel/of_device_64.c b/arch/sparc/kernel/of_device_64.c
> > index 5c14968..3bb2eac 100644
> > --- a/arch/sparc/kernel/of_device_64.c
> > +++ b/arch/sparc/kernel/of_device_64.c
> > @@ -622,8 +622,9 @@ static unsigned int __init build_one_device_irq(struct platform_device *op,
> > Âout:
> > Â Â Â Ânid = of_node_to_nid(dp);
> > Â Â Â Âif (nid != -1) {
> > - Â Â Â Â Â Â Â cpumask_t numa_mask = *cpumask_of_node(nid);
> > + Â Â Â Â Â Â Â cpumask_t numa_mask;
> >
> please, could you remove the extra blank line?
>
> > + Â Â Â Â Â Â Â cpumask_copy(&numa_mask, cpumask_of_node(nid));
> > Â Â Â Â Â Â Â Âirq_set_affinity(irq, &numa_mask);

Why? one blank line between declaration and statement is standard coding style.



--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/