svn commit: r345186 - in stable/11/sys: conf dev/fxp modules/fxp
Mark Johnston
markj at FreeBSD.org
Fri Mar 15 15:16:33 UTC 2019
Author: markj
Date: Fri Mar 15 15:16:31 2019
New Revision: 345186
URL: https://svnweb.freebsd.org/changeset/base/345186
Log:
MFC r342214:
Remove a use of a negative array index from fxp(4).
Modified:
stable/11/sys/conf/files
stable/11/sys/conf/kern.mk
stable/11/sys/dev/fxp/if_fxp.c
stable/11/sys/dev/fxp/if_fxpreg.h
stable/11/sys/modules/fxp/Makefile
Directory Properties:
stable/11/ (props changed)
Modified: stable/11/sys/conf/files
==============================================================================
--- stable/11/sys/conf/files Fri Mar 15 14:49:27 2019 (r345185)
+++ stable/11/sys/conf/files Fri Mar 15 15:16:31 2019 (r345186)
@@ -1733,8 +1733,7 @@ dev/firewire/sbp.c optional sbp
dev/firewire/sbp_targ.c optional sbp_targ
dev/flash/at45d.c optional at45d
dev/flash/mx25l.c optional mx25l
-dev/fxp/if_fxp.c optional fxp \
- compile-with "${NORMAL_C} ${NO_WARRAY_BOUNDS}"
+dev/fxp/if_fxp.c optional fxp
dev/fxp/inphy.c optional fxp
dev/gem/if_gem.c optional gem
dev/gem/if_gem_pci.c optional gem pci
Modified: stable/11/sys/conf/kern.mk
==============================================================================
--- stable/11/sys/conf/kern.mk Fri Mar 15 14:49:27 2019 (r345185)
+++ stable/11/sys/conf/kern.mk Fri Mar 15 15:16:31 2019 (r345186)
@@ -24,7 +24,6 @@ NO_WSELF_ASSIGN= -Wno-self-assign
NO_WUNNEEDED_INTERNAL_DECL= -Wno-unneeded-internal-declaration
NO_WSOMETIMES_UNINITIALIZED= -Wno-error-sometimes-uninitialized
NO_WCAST_QUAL= -Wno-cast-qual
-NO_WARRAY_BOUNDS= -Wno-error-array-bounds
# Several other warnings which might be useful in some cases, but not severe
# enough to error out the whole kernel build. Display them anyway, so there is
# some incentive to fix them eventually.
Modified: stable/11/sys/dev/fxp/if_fxp.c
==============================================================================
--- stable/11/sys/dev/fxp/if_fxp.c Fri Mar 15 14:49:27 2019 (r345185)
+++ stable/11/sys/dev/fxp/if_fxp.c Fri Mar 15 15:16:31 2019 (r345186)
@@ -1623,7 +1623,7 @@ fxp_encap(struct fxp_softc *sc, struct mbuf **m_head)
cbp->tbd_number = nseg;
/* Configure TSO. */
if (m->m_pkthdr.csum_flags & CSUM_TSO) {
- cbp->tbd[-1].tb_size = htole32(m->m_pkthdr.tso_segsz << 16);
+ cbp->tbdtso.tb_size = htole32(m->m_pkthdr.tso_segsz << 16);
cbp->tbd[1].tb_size |= htole32(tcp_payload << 16);
cbp->ipcb_ip_schedule |= FXP_IPCB_LARGESEND_ENABLE |
FXP_IPCB_IP_CHECKSUM_ENABLE |
Modified: stable/11/sys/dev/fxp/if_fxpreg.h
==============================================================================
--- stable/11/sys/dev/fxp/if_fxpreg.h Fri Mar 15 14:49:27 2019 (r345185)
+++ stable/11/sys/dev/fxp/if_fxpreg.h Fri Mar 15 15:16:31 2019 (r345186)
@@ -279,10 +279,15 @@ struct fxp_cb_tx {
uint16_t cb_status;
uint16_t cb_command;
uint32_t link_addr;
- uint32_t tbd_array_addr;
- uint16_t byte_count;
- uint8_t tx_threshold;
- uint8_t tbd_number;
+ union {
+ struct {
+ uint32_t tbd_array_addr;
+ uint16_t byte_count;
+ uint8_t tx_threshold;
+ uint8_t tbd_number;
+ };
+ struct fxp_tbd tbdtso;
+ };
/*
* The following structure isn't actually part of the TxCB,
Modified: stable/11/sys/modules/fxp/Makefile
==============================================================================
--- stable/11/sys/modules/fxp/Makefile Fri Mar 15 14:49:27 2019 (r345185)
+++ stable/11/sys/modules/fxp/Makefile Fri Mar 15 15:16:31 2019 (r345186)
@@ -6,5 +6,3 @@ KMOD= if_fxp
SRCS= device_if.h bus_if.h if_fxp.c inphy.c miibus_if.h miidevs.h pci_if.h
.include <bsd.kmod.mk>
-
-CWARNFLAGS+= ${NO_WARRAY_BOUNDS}
More information about the svn-src-stable
mailing list