Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108629055
D18094.id50974.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D18094.id50974.diff
View Options
Index: head/sys/dev/sfxge/common/ef10_nvram.c
===================================================================
--- head/sys/dev/sfxge/common/ef10_nvram.c
+++ head/sys/dev/sfxge/common/ef10_nvram.c
@@ -2210,6 +2210,7 @@
size_t parttbl_rows = 0;
unsigned int i;
+ EFSYS_ASSERT3U(type, !=, EFX_NVRAM_INVALID);
EFSYS_ASSERT3U(type, <, EFX_NVRAM_NTYPES);
EFSYS_ASSERT(partnp != NULL);
Index: head/sys/dev/sfxge/common/efx_nvram.c
===================================================================
--- head/sys/dev/sfxge/common/efx_nvram.c
+++ head/sys/dev/sfxge/common/efx_nvram.c
@@ -167,8 +167,6 @@
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NVRAM);
- EFSYS_ASSERT3U(type, <, EFX_NVRAM_NTYPES);
-
if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0)
goto fail1;
@@ -201,8 +199,6 @@
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NVRAM);
- EFSYS_ASSERT3U(type, <, EFX_NVRAM_NTYPES);
-
if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0)
goto fail1;
@@ -233,9 +229,6 @@
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NVRAM);
- EFSYS_ASSERT3U(type, <, EFX_NVRAM_NTYPES);
- EFSYS_ASSERT3U(type, !=, EFX_NVRAM_INVALID);
-
if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0)
goto fail1;
@@ -271,9 +264,6 @@
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NVRAM);
- EFSYS_ASSERT3U(type, <, EFX_NVRAM_NTYPES);
- EFSYS_ASSERT3U(type, !=, EFX_NVRAM_INVALID);
-
if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0)
goto fail1;
@@ -312,9 +302,6 @@
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NVRAM);
- EFSYS_ASSERT3U(type, <, EFX_NVRAM_NTYPES);
- EFSYS_ASSERT3U(type, !=, EFX_NVRAM_INVALID);
-
if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0)
goto fail1;
@@ -348,9 +335,6 @@
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NVRAM);
- EFSYS_ASSERT3U(type, <, EFX_NVRAM_NTYPES);
- EFSYS_ASSERT3U(type, !=, EFX_NVRAM_INVALID);
-
if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0)
goto fail1;
@@ -389,9 +373,6 @@
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NVRAM);
- EFSYS_ASSERT3U(type, <, EFX_NVRAM_NTYPES);
- EFSYS_ASSERT3U(type, !=, EFX_NVRAM_INVALID);
-
if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0)
goto fail1;
@@ -424,9 +405,6 @@
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NVRAM);
- EFSYS_ASSERT3U(type, <, EFX_NVRAM_NTYPES);
- EFSYS_ASSERT3U(type, !=, EFX_NVRAM_INVALID);
-
if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0)
goto fail1;
@@ -470,8 +448,6 @@
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NVRAM);
- EFSYS_ASSERT3U(type, <, EFX_NVRAM_NTYPES);
-
if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0)
goto fail1;
@@ -510,9 +486,6 @@
EFSYS_ASSERT3U(enp->en_magic, ==, EFX_NIC_MAGIC);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_PROBE);
EFSYS_ASSERT3U(enp->en_mod_flags, &, EFX_MOD_NVRAM);
-
- EFSYS_ASSERT3U(type, <, EFX_NVRAM_NTYPES);
-
if ((rc = envop->envo_type_to_partn(enp, type, &partn)) != 0)
goto fail1;
Index: head/sys/dev/sfxge/common/siena_nvram.c
===================================================================
--- head/sys/dev/sfxge/common/siena_nvram.c
+++ head/sys/dev/sfxge/common/siena_nvram.c
@@ -245,6 +245,7 @@
efx_mcdi_iface_t *emip = &(enp->en_mcdi.em_emip);
unsigned int i;
+ EFSYS_ASSERT3U(type, !=, EFX_NVRAM_INVALID);
EFSYS_ASSERT3U(type, <, EFX_NVRAM_NTYPES);
EFSYS_ASSERT(partnp != NULL);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Jan 27, 11:47 PM (9 h, 32 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16223752
Default Alt Text
D18094.id50974.diff (3 KB)
Attached To
Mode
D18094: sfxge(4): remove duplicate NVRAM asserts
Attached
Detach File
Event Timeline
Log In to Comment