Commit e6cc11707661770ca2bd4db4b0256d28f48e7541

Authored by Steffen Klassert
Committed by Herbert Xu
1 parent cc74f4bc11

padata: Rename padata_alloc functions

We rename padata_alloc to padata_alloc_possible because this
function allocates a padata_instance and uses the cpu_possible
mask for parallel and serial workers. Also we rename __padata_alloc
to padata_alloc to avoid to export underlined functions. Underlined
functions are considered to be private to padata. Users are updated
accordingly.

Signed-off-by: Steffen Klassert <steffen.klassert@secunet.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>

Showing 3 changed files with 18 additions and 17 deletions Side-by-side Diff

... ... @@ -457,7 +457,7 @@
457 457 if (!pcrypt->wq)
458 458 goto err;
459 459  
460   - pcrypt->pinst = padata_alloc(pcrypt->wq);
  460 + pcrypt->pinst = padata_alloc_possible(pcrypt->wq);
461 461 if (!pcrypt->pinst)
462 462 goto err_destroy_workqueue;
463 463  
include/linux/padata.h
... ... @@ -165,10 +165,11 @@
165 165 #define PADATA_INVALID 4
166 166 };
167 167  
168   -extern struct padata_instance *padata_alloc(struct workqueue_struct *wq);
169   -extern struct padata_instance *__padata_alloc(struct workqueue_struct *wq,
170   - const struct cpumask *pcpumask,
171   - const struct cpumask *cbcpumask);
  168 +extern struct padata_instance *padata_alloc_possible(
  169 + struct workqueue_struct *wq);
  170 +extern struct padata_instance *padata_alloc(struct workqueue_struct *wq,
  171 + const struct cpumask *pcpumask,
  172 + const struct cpumask *cbcpumask);
172 173 extern void padata_free(struct padata_instance *pinst);
173 174 extern int padata_do_parallel(struct padata_instance *pinst,
174 175 struct padata_priv *padata, int cb_cpu);
... ... @@ -1060,29 +1060,29 @@
1060 1060 };
1061 1061  
1062 1062 /**
1063   - * padata_alloc - Allocate and initialize padata instance.
1064   - * Use default cpumask(cpu_possible_mask)
1065   - * for serial and parallel workes.
  1063 + * padata_alloc_possible - Allocate and initialize padata instance.
  1064 + * Use the cpu_possible_mask for serial and
  1065 + * parallel workers.
1066 1066 *
1067 1067 * @wq: workqueue to use for the allocated padata instance
1068 1068 */
1069   -struct padata_instance *padata_alloc(struct workqueue_struct *wq)
  1069 +struct padata_instance *padata_alloc_possible(struct workqueue_struct *wq)
1070 1070 {
1071   - return __padata_alloc(wq, cpu_possible_mask, cpu_possible_mask);
  1071 + return padata_alloc(wq, cpu_possible_mask, cpu_possible_mask);
1072 1072 }
1073   -EXPORT_SYMBOL(padata_alloc);
  1073 +EXPORT_SYMBOL(padata_alloc_possible);
1074 1074  
1075 1075 /**
1076   - * __padata_alloc - allocate and initialize a padata instance
1077   - * and specify cpumasks for serial and parallel workers.
  1076 + * padata_alloc - allocate and initialize a padata instance and specify
  1077 + * cpumasks for serial and parallel workers.
1078 1078 *
1079 1079 * @wq: workqueue to use for the allocated padata instance
1080 1080 * @pcpumask: cpumask that will be used for padata parallelization
1081 1081 * @cbcpumask: cpumask that will be used for padata serialization
1082 1082 */
1083   -struct padata_instance *__padata_alloc(struct workqueue_struct *wq,
1084   - const struct cpumask *pcpumask,
1085   - const struct cpumask *cbcpumask)
  1083 +struct padata_instance *padata_alloc(struct workqueue_struct *wq,
  1084 + const struct cpumask *pcpumask,
  1085 + const struct cpumask *cbcpumask)
1086 1086 {
1087 1087 struct padata_instance *pinst;
1088 1088 struct parallel_data *pd = NULL;
... ... @@ -1138,7 +1138,7 @@
1138 1138 err:
1139 1139 return NULL;
1140 1140 }
1141   -EXPORT_SYMBOL(__padata_alloc);
  1141 +EXPORT_SYMBOL(padata_alloc);
1142 1142  
1143 1143 /**
1144 1144 * padata_free - free a padata instance