Re: [PATCH 2/5] genirq/affinity: move actual irq vector spread into one helper
From: Christoph Hellwig
Date: Fri Mar 02 2018 - 18:07:43 EST
On Tue, Feb 06, 2018 at 08:17:39PM +0800, Ming Lei wrote:
> No functional change, just prepare for converting to 2-stage
> irq vector spread.
>
> Cc: Thomas Gleixner <tglx@xxxxxxxxxxxxx>
> Cc: Christoph Hellwig <hch@xxxxxx>
> Signed-off-by: Ming Lei <ming.lei@xxxxxxxxxx>
> ---
> kernel/irq/affinity.c | 99 +++++++++++++++++++++++++++++----------------------
> 1 file changed, 56 insertions(+), 43 deletions(-)
>
> diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c
> index 4b1c4763212d..6af3f6727f63 100644
> --- a/kernel/irq/affinity.c
> +++ b/kernel/irq/affinity.c
> @@ -79,7 +79,7 @@ static void build_node_to_cpumask(cpumask_var_t *masks)
> cpumask_set_cpu(cpu, masks[cpu_to_node(cpu)]);
> }
>
> -static int get_nodes_in_cpumask(cpumask_var_t *node_to_cpumask,
> +static int get_nodes_in_cpumask(const cpumask_var_t *node_to_cpumask,
> const struct cpumask *mask, nodemask_t *nodemsk)
Maybe you can split all your constifications into a separate prep patch?
> +int irq_build_affinity_masks(int nvecs, const struct irq_affinity *affd,
> + const cpumask_var_t *node_to_cpumask,
> + const struct cpumask *cpu_mask,
> + struct cpumask *nmsk,
> + struct cpumask *masks)
static?
Otherwise looks fine:
Reviewed-by: Christoph Hellwig <hch@xxxxxx>