[17/38] net/sfc/base: make NIC pointer const in NIC config get

Message ID 1549556983-10896-18-git-send-email-arybchenko@solarflare.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series net/sfc: update base driver |

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Andrew Rybchenko Feb. 7, 2019, 4:29 p.m. UTC
  From: Igor Romanov <igor.romanov@oktetlabs.ru>

The change is needed for the functions that accept const efx_nic_t
pointer and have to get efx_nic_cfg_t.

Signed-off-by: Igor Romanov <igor.romanov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/base/efx.h     | 2 +-
 drivers/net/sfc/base/efx_nic.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
  

Patch

diff --git a/drivers/net/sfc/base/efx.h b/drivers/net/sfc/base/efx.h
index d8914aa7c..8aa03b538 100644
--- a/drivers/net/sfc/base/efx.h
+++ b/drivers/net/sfc/base/efx.h
@@ -1409,7 +1409,7 @@  typedef struct efx_nic_cfg_s {
 
 extern			const efx_nic_cfg_t *
 efx_nic_cfg_get(
-	__in		efx_nic_t *enp);
+	__in		const efx_nic_t *enp);
 
 /* RxDPCPU firmware id values by which FW variant can be identified */
 #define	EFX_RXDP_FULL_FEATURED_FW_ID	0x0
diff --git a/drivers/net/sfc/base/efx_nic.c b/drivers/net/sfc/base/efx_nic.c
index 52108a5b8..3ec5cbc07 100644
--- a/drivers/net/sfc/base/efx_nic.c
+++ b/drivers/net/sfc/base/efx_nic.c
@@ -595,7 +595,7 @@  efx_nic_reset(
 
 			const efx_nic_cfg_t *
 efx_nic_cfg_get(
-	__in		efx_nic_t *enp)
+	__in		const efx_nic_t *enp)
 {
 	EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
 	EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);