7204-fsl-dpaa2-eth-dpni-Clear-compiler-warnings.patch 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. From 9a38e2ce3b46a2bdc90b4ad190a26f9418909450 Mon Sep 17 00:00:00 2001
  2. From: Bogdan Hamciuc <bogdan.hamciuc@nxp.com>
  3. Date: Tue, 29 Mar 2016 13:23:50 +0300
  4. Subject: [PATCH 204/226] fsl-dpaa2: eth: dpni: Clear compiler warnings
  5. MIME-Version: 1.0
  6. Content-Type: text/plain; charset=UTF-8
  7. Content-Transfer-Encoding: 8bit
  8. Clear two warnings given by -Wcast-qual:
  9. warning: cast discards ‘__attribute__((const))’ qualifier from pointer
  10. target type
  11. Signed-off-by: Bogdan Hamciuc <bogdan.hamciuc@nxp.com>
  12. (cherry picked from commit 96d14f291c2750e8b09268cecb84bfe7f013294d)
  13. ---
  14. drivers/staging/fsl-dpaa2/ethernet/dpni.c | 4 ++--
  15. 1 file changed, 2 insertions(+), 2 deletions(-)
  16. --- a/drivers/staging/fsl-dpaa2/ethernet/dpni.c
  17. +++ b/drivers/staging/fsl-dpaa2/ethernet/dpni.c
  18. @@ -128,7 +128,7 @@ int dpni_prepare_extended_cfg(const stru
  19. int dpni_extract_extended_cfg(struct dpni_extended_cfg *cfg,
  20. const uint8_t *ext_cfg_buf)
  21. {
  22. - uint64_t *ext_params = (uint64_t *)ext_cfg_buf;
  23. + const uint64_t *ext_params = (const uint64_t *)ext_cfg_buf;
  24. DPNI_EXT_EXTENDED_CFG(ext_params, cfg);
  25. @@ -1651,7 +1651,7 @@ void dpni_prepare_early_drop(const struc
  26. void dpni_extract_early_drop(struct dpni_early_drop_cfg *cfg,
  27. const uint8_t *early_drop_buf)
  28. {
  29. - uint64_t *ext_params = (uint64_t *)early_drop_buf;
  30. + const uint64_t *ext_params = (const uint64_t *)early_drop_buf;
  31. DPNI_EXT_EARLY_DROP(ext_params, cfg);
  32. }