The dca_ops structure is never modified, so declare it as const. Done with the help of Coccinelle.
Showing the changes to drivers/dca (1 of 3 files). Show all
Unified · Split
| @@ -321,7 +321,8 @@ EXPORT_SYMBOL_GPL(dca_get_tag); · 320 unmodified lines | ||
| 321 | 321 | * @ops - pointer to struct of dca operation function pointers |
| 322 | 322 | * @priv_size - size of extra mem to be added for provider's needs |
| 323 | 323 | */ |
| 324 | −struct dca_provider *alloc_dca_provider(struct dca_ops *ops, int priv_size) | |
| 324 | +struct dca_provider *alloc_dca_provider(const struct dca_ops *ops, | |
| 325 | + int priv_size) | |
| 325 | 326 | { |
| 326 | 327 | struct dca_provider *dca; |
| 327 | 328 | int alloc_size; |