020-0020-crypto-crypto4xx-fix-various-warnings.patch 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. From 64e1062b2371cb8d6126d4e970832365a1a84562 Mon Sep 17 00:00:00 2001
  2. From: Christian Lamparter <[email protected]>
  3. Date: Wed, 4 Oct 2017 01:00:12 +0200
  4. Subject: [PATCH 20/25] crypto: crypto4xx - fix various warnings
  5. crypto4xx_core.c:179:6: warning: symbol 'crypto4xx_free_state_record'
  6. was not declared. Should it be static?
  7. crypto4xx_core.c:331:5: warning: symbol 'crypto4xx_get_n_gd'
  8. was not declared. Should it be static?
  9. crypto4xx_core.c:652:6: warning: symbol 'crypto4xx_return_pd'
  10. was not declared. Should it be static?
  11. crypto4xx_return_pd() is not used by anything. Therefore it is removed.
  12. Signed-off-by: Christian Lamparter <[email protected]>
  13. Signed-off-by: Herbert Xu <[email protected]>
  14. ---
  15. drivers/crypto/amcc/crypto4xx_core.c | 16 +++-------------
  16. 1 file changed, 3 insertions(+), 13 deletions(-)
  17. --- a/drivers/crypto/amcc/crypto4xx_core.c
  18. +++ b/drivers/crypto/amcc/crypto4xx_core.c
  19. @@ -176,7 +176,7 @@ u32 crypto4xx_alloc_state_record(struct
  20. return 0;
  21. }
  22. -void crypto4xx_free_state_record(struct crypto4xx_ctx *ctx)
  23. +static void crypto4xx_free_state_record(struct crypto4xx_ctx *ctx)
  24. {
  25. if (ctx->state_record != NULL)
  26. dma_free_coherent(ctx->dev->core_dev->device,
  27. @@ -322,10 +322,11 @@ static inline void crypto4xx_destroy_gdr
  28. * when this function is called.
  29. * preemption or interrupt must be disabled
  30. */
  31. -u32 crypto4xx_get_n_gd(struct crypto4xx_device *dev, int n)
  32. +static u32 crypto4xx_get_n_gd(struct crypto4xx_device *dev, int n)
  33. {
  34. u32 retval;
  35. u32 tmp;
  36. +
  37. if (n >= PPC4XX_NUM_GD)
  38. return ERING_WAS_FULL;
  39. @@ -616,17 +617,6 @@ static void crypto4xx_stop_all(struct cr
  40. kfree(core_dev);
  41. }
  42. -void crypto4xx_return_pd(struct crypto4xx_device *dev,
  43. - u32 pd_entry, struct ce_pd *pd,
  44. - struct pd_uinfo *pd_uinfo)
  45. -{
  46. - /* irq should be already disabled */
  47. - dev->pdr_head = pd_entry;
  48. - pd->pd_ctl.w = 0;
  49. - pd->pd_ctl_len.w = 0;
  50. - pd_uinfo->state = PD_ENTRY_FREE;
  51. -}
  52. -
  53. static u32 get_next_gd(u32 current)
  54. {
  55. if (current != PPC4XX_LAST_GD)