Skip to content

Commit

Permalink
genirq/affinity: Remove the 'firstvec' parameter from irq_build_affin…
Browse files Browse the repository at this point in the history
…ity_masks

[ Upstream commit cdf07f0 ]

The 'firstvec' parameter is always same with the parameter of
'startvec', so use 'startvec' directly inside irq_build_affinity_masks().

Signed-off-by: Ming Lei <ming.lei@redhat.com>
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: John Garry <john.g.garry@oracle.com>
Reviewed-by: Jens Axboe <axboe@kernel.dk>
Link: https://lore.kernel.org/r/20221227022905.352674-2-ming.lei@redhat.com
Stable-dep-of: 0263f92 ("lib/group_cpus.c: avoid acquiring cpu hotplug lock in group_cpus_evenly")
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Ming Lei authored and gregkh committed Jan 10, 2024
1 parent f4fe764 commit a1dcd17
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions kernel/irq/affinity.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,10 +337,10 @@ static int __irq_build_affinity_masks(unsigned int startvec,
* 2) spread other possible CPUs on these vectors
*/
static int irq_build_affinity_masks(unsigned int startvec, unsigned int numvecs,
unsigned int firstvec,
struct irq_affinity_desc *masks)
{
unsigned int curvec = startvec, nr_present = 0, nr_others = 0;
unsigned int firstvec = startvec;
cpumask_var_t *node_to_cpumask;
cpumask_var_t nmsk, npresmsk;
int ret = -ENOMEM;
Expand Down Expand Up @@ -463,8 +463,7 @@ irq_create_affinity_masks(unsigned int nvecs, struct irq_affinity *affd)
unsigned int this_vecs = affd->set_size[i];
int ret;

ret = irq_build_affinity_masks(curvec, this_vecs,
curvec, masks);
ret = irq_build_affinity_masks(curvec, this_vecs, masks);
if (ret) {
kfree(masks);
return NULL;
Expand Down

0 comments on commit a1dcd17

Please sign in to comment.