linux-crypto.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] padata: Remove unused padata_remove_cpu
@ 2019-11-19 22:32 Herbert Xu
  2019-11-19 22:51 ` Daniel Jordan
  2019-11-27 23:37 ` Daniel Jordan
  0 siblings, 2 replies; 5+ messages in thread
From: Herbert Xu @ 2019-11-19 22:32 UTC (permalink / raw)
  To: Linux Crypto Mailing List, Steffen Klassert, Daniel Jordan, Eric Biggers

The function padata_remove_cpu was supposed to have been removed
along with padata_add_cpu but somehow it remained behind.  Let's
kill it now as it doesn't even have a prototype anymore.

Fixes: 815613da6a67 ("kernel/padata.c: removed unused code")
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

diff --git a/kernel/padata.c b/kernel/padata.c
index da56a235a255..fc00f7e64133 100644
--- a/kernel/padata.c
+++ b/kernel/padata.c
@@ -718,41 +718,6 @@ static int __padata_remove_cpu(struct padata_instance *pinst, int cpu)
 	return 0;
 }
 
- /**
- * padata_remove_cpu - remove a cpu from the one or both(serial and parallel)
- *                     padata cpumasks.
- *
- * @pinst: padata instance
- * @cpu: cpu to remove
- * @mask: bitmask specifying from which cpumask @cpu should be removed
- *        The @mask may be any combination of the following flags:
- *          PADATA_CPU_SERIAL   - serial cpumask
- *          PADATA_CPU_PARALLEL - parallel cpumask
- */
-int padata_remove_cpu(struct padata_instance *pinst, int cpu, int mask)
-{
-	int err;
-
-	if (!(mask & (PADATA_CPU_SERIAL | PADATA_CPU_PARALLEL)))
-		return -EINVAL;
-
-	mutex_lock(&pinst->lock);
-
-	get_online_cpus();
-	if (mask & PADATA_CPU_SERIAL)
-		cpumask_clear_cpu(cpu, pinst->cpumask.cbcpu);
-	if (mask & PADATA_CPU_PARALLEL)
-		cpumask_clear_cpu(cpu, pinst->cpumask.pcpu);
-
-	err = __padata_remove_cpu(pinst, cpu);
-	put_online_cpus();
-
-	mutex_unlock(&pinst->lock);
-
-	return err;
-}
-EXPORT_SYMBOL(padata_remove_cpu);
-
 static inline int pinst_has_cpu(struct padata_instance *pinst, int cpu)
 {
 	return cpumask_test_cpu(cpu, pinst->cpumask.pcpu) ||
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] padata: Remove unused padata_remove_cpu
  2019-11-19 22:32 [PATCH] padata: Remove unused padata_remove_cpu Herbert Xu
@ 2019-11-19 22:51 ` Daniel Jordan
  2019-11-20  1:10   ` Herbert Xu
  2019-11-27 23:37 ` Daniel Jordan
  1 sibling, 1 reply; 5+ messages in thread
From: Daniel Jordan @ 2019-11-19 22:51 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Linux Crypto Mailing List, Steffen Klassert, Daniel Jordan, Eric Biggers

On Wed, Nov 20, 2019 at 06:32:50AM +0800, Herbert Xu wrote:
> The function padata_remove_cpu was supposed to have been removed
> along with padata_add_cpu but somehow it remained behind.  Let's
> kill it now as it doesn't even have a prototype anymore.

Documentation/padata.txt still has a reference to this function that should be
removed.


I'm just now getting back to this series that I posted--admittedly a long time
ago!  :)

    https://lore.kernel.org/linux-crypto/20190828221425.22701-1-daniel.m.jordan@oracle.com/

Do you plan on posting other fixes in this area?  Asking so I know which to
work on further.  Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] padata: Remove unused padata_remove_cpu
  2019-11-19 22:51 ` Daniel Jordan
@ 2019-11-20  1:10   ` Herbert Xu
  2019-11-20 18:56     ` Daniel Jordan
  0 siblings, 1 reply; 5+ messages in thread
From: Herbert Xu @ 2019-11-20  1:10 UTC (permalink / raw)
  To: Daniel Jordan; +Cc: Linux Crypto Mailing List, Steffen Klassert, Eric Biggers

On Tue, Nov 19, 2019 at 05:51:01PM -0500, Daniel Jordan wrote:
> On Wed, Nov 20, 2019 at 06:32:50AM +0800, Herbert Xu wrote:
> > The function padata_remove_cpu was supposed to have been removed
> > along with padata_add_cpu but somehow it remained behind.  Let's
> > kill it now as it doesn't even have a prototype anymore.
> 
> Documentation/padata.txt still has a reference to this function that should be
> removed.

It also has references to all the other functions that have long
disappeared, such as padata_add_cpu.  Would you like to send a
patch to remove all of them?

> Do you plan on posting other fixes in this area?  Asking so I know which to
> work on further.  Thanks.

Not at this point.  So feel free to rebase your work on top of these
patches.

Thanks,
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] padata: Remove unused padata_remove_cpu
  2019-11-20  1:10   ` Herbert Xu
@ 2019-11-20 18:56     ` Daniel Jordan
  0 siblings, 0 replies; 5+ messages in thread
From: Daniel Jordan @ 2019-11-20 18:56 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Daniel Jordan, Linux Crypto Mailing List, Steffen Klassert, Eric Biggers

On Wed, Nov 20, 2019 at 09:10:15AM +0800, Herbert Xu wrote:
> On Tue, Nov 19, 2019 at 05:51:01PM -0500, Daniel Jordan wrote:
> > On Wed, Nov 20, 2019 at 06:32:50AM +0800, Herbert Xu wrote:
> > > The function padata_remove_cpu was supposed to have been removed
> > > along with padata_add_cpu but somehow it remained behind.  Let's
> > > kill it now as it doesn't even have a prototype anymore.
> > 
> > Documentation/padata.txt still has a reference to this function that should be
> > removed.
> 
> It also has references to all the other functions that have long
> disappeared, such as padata_add_cpu.  Would you like to send a
> patch to remove all of them?

Ok, sure.

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] padata: Remove unused padata_remove_cpu
  2019-11-19 22:32 [PATCH] padata: Remove unused padata_remove_cpu Herbert Xu
  2019-11-19 22:51 ` Daniel Jordan
@ 2019-11-27 23:37 ` Daniel Jordan
  1 sibling, 0 replies; 5+ messages in thread
From: Daniel Jordan @ 2019-11-27 23:37 UTC (permalink / raw)
  To: Herbert Xu
  Cc: Linux Crypto Mailing List, Steffen Klassert, Daniel Jordan, Eric Biggers

On Wed, Nov 20, 2019 at 06:32:50AM +0800, Herbert Xu wrote:
> The function padata_remove_cpu was supposed to have been removed
> along with padata_add_cpu but somehow it remained behind.  Let's
> kill it now as it doesn't even have a prototype anymore.
> 
> Fixes: 815613da6a67 ("kernel/padata.c: removed unused code")
> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Reviewed-by: Daniel Jordan <daniel.m.jordan@oracle.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-11-27 23:37 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-19 22:32 [PATCH] padata: Remove unused padata_remove_cpu Herbert Xu
2019-11-19 22:51 ` Daniel Jordan
2019-11-20  1:10   ` Herbert Xu
2019-11-20 18:56     ` Daniel Jordan
2019-11-27 23:37 ` Daniel Jordan

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).