openwrt/target/linux/layerscape/patches-4.4/7204-fsl-dpaa2-eth-dpni-Clear-compiler-warnings.patch

39 lines
1.4 KiB
Diff
Raw Normal View History

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