From: Ming Lei <ming.lei@redhat.com>
To: Minwoo Im <minwoo.im.dev@gmail.com>
Cc: linux-kernel@vger.kernel.org, Minwoo Im <minwoo.im@samsung.com>,
Thomas Gleixner <tglx@linutronix.de>,
linux-block@vger.kernel.org
Subject: Re: [PATCH] genirq/affinity: remove unused arg when building aff mask
Date: Mon, 3 Jun 2019 15:41:13 +0800 [thread overview]
Message-ID: <20190603074112.GB11812@ming.t460p> (raw)
In-Reply-To: <20190602112117.31839-1-minwoo.im.dev@gmail.com>
On Sun, Jun 02, 2019 at 08:21:17PM +0900, Minwoo Im wrote:
> When building affinity masks, the struct irq_affinity *affd is not
> needed because irq_create_affinity_masks() has already given a cursored
> current vector after pre_vectors via "curvec".
>
> This patch removes unused argument for irq_build_affinity_masks() and
> __irq_build_affinity_masks(). No functions changes are included.
>
> Cc: Thomas Gleixner <tglx@linutronix.de>
> Cc: Ming Lei <ming.lei@redhat.com>
> Cc: linux-block@vger.kernel.org
> Signed-off-by: Minwoo Im <minwoo.im.dev@gmail.com>
> ---
> kernel/irq/affinity.c | 12 +++++-------
> 1 file changed, 5 insertions(+), 7 deletions(-)
>
> diff --git a/kernel/irq/affinity.c b/kernel/irq/affinity.c
> index f18cd5aa33e8..4352b08ae48d 100644
> --- a/kernel/irq/affinity.c
> +++ b/kernel/irq/affinity.c
> @@ -94,8 +94,7 @@ static int get_nodes_in_cpumask(cpumask_var_t *node_to_cpumask,
> return nodes;
> }
>
> -static int __irq_build_affinity_masks(const struct irq_affinity *affd,
> - unsigned int startvec,
> +static int __irq_build_affinity_masks(unsigned int startvec,
> unsigned int numvecs,
> unsigned int firstvec,
> cpumask_var_t *node_to_cpumask,
> @@ -171,8 +170,7 @@ static int __irq_build_affinity_masks(const struct irq_affinity *affd,
> * 1) spread present CPU on these vectors
> * 2) spread other possible CPUs on these vectors
> */
> -static int irq_build_affinity_masks(const struct irq_affinity *affd,
> - unsigned int startvec, unsigned int numvecs,
> +static int irq_build_affinity_masks(unsigned int startvec, unsigned int numvecs,
> unsigned int firstvec,
> struct irq_affinity_desc *masks)
> {
> @@ -197,7 +195,7 @@ static int irq_build_affinity_masks(const struct irq_affinity *affd,
> build_node_to_cpumask(node_to_cpumask);
>
> /* Spread on present CPUs starting from affd->pre_vectors */
> - nr_present = __irq_build_affinity_masks(affd, curvec, numvecs,
> + nr_present = __irq_build_affinity_masks(curvec, numvecs,
> firstvec, node_to_cpumask,
> cpu_present_mask, nmsk, masks);
>
> @@ -212,7 +210,7 @@ static int irq_build_affinity_masks(const struct irq_affinity *affd,
> else
> curvec = firstvec + nr_present;
> cpumask_andnot(npresmsk, cpu_possible_mask, cpu_present_mask);
> - nr_others = __irq_build_affinity_masks(affd, curvec, numvecs,
> + nr_others = __irq_build_affinity_masks(curvec, numvecs,
> firstvec, node_to_cpumask,
> npresmsk, nmsk, masks);
> put_online_cpus();
> @@ -295,7 +293,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(affd, curvec, this_vecs,
> + ret = irq_build_affinity_masks(curvec, this_vecs,
> curvec, masks);
> if (ret) {
> kfree(masks);
> --
> 2.21.0
>
Looks fine:
Reviewed-by: Ming Lei <ming.lei@redhat.com>
Thanks,
Ming
next prev parent reply other threads:[~2019-06-03 7:41 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-06-02 11:21 Minwoo Im
2019-06-03 7:41 ` Ming Lei [this message]
2019-06-12 12:33 ` [tip:irq/core] genirq/affinity: Remove unused argument from [__]irq_build_affinity_masks() tip-bot for Minwoo Im
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20190603074112.GB11812@ming.t460p \
--to=ming.lei@redhat.com \
--cc=linux-block@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=minwoo.im.dev@gmail.com \
--cc=minwoo.im@samsung.com \
--cc=tglx@linutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®