From c9c9e0f2da51600e0c8584aa6d4146bbef25e2c8 Mon Sep 17 00:00:00 2001 From: Marius Strobl Date: Sun, 29 Oct 2006 20:19:41 +0000 Subject: [PATCH] Wrap code optimized for architectures without alignment constraints in #ifdef __NO_STRICT_ALIGNMENT rather than #if defined(__i386__) || defined(__amd64__). Currently this change is cosmetic only though. While at it, fix a nearby style(9) bug and remove a no longer used header. --- sys/pci/if_sis.c | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/sys/pci/if_sis.c b/sys/pci/if_sis.c index 2b67f87d131..88860182e65 100644 --- a/sys/pci/if_sis.c +++ b/sys/pci/if_sis.c @@ -70,7 +70,7 @@ __FBSDID("$FreeBSD$"); #include #include #include -#include +#include #include #include @@ -1398,8 +1398,8 @@ sis_newbuf(struct sis_softc *sc, struct sis_desc *c, struct mbuf *m) static void sis_rxeof(struct sis_softc *sc) { - struct mbuf *m; - struct ifnet *ifp; + struct mbuf *m, *m0; + struct ifnet *ifp; struct sis_desc *cur_rx; int total_len = 0; u_int32_t rxstat; @@ -1442,9 +1442,9 @@ sis_rxeof(struct sis_softc *sc) } /* No errors; receive the packet. */ -#if defined(__i386__) || defined(__amd64__) +#ifdef __NO_STRICT_ALIGNMENT /* - * On the x86 we do not have alignment problems, so try to + * On architectures without alignment problems we try to * allocate a new buffer for the receive ring, and pass up * the one where the packet is already, saving the expensive * copy done in m_devget(). @@ -1457,7 +1457,6 @@ sis_rxeof(struct sis_softc *sc) else #endif { - struct mbuf *m0; m0 = m_devget(mtod(m, char *), total_len, ETHER_ALIGN, ifp, NULL); sis_newbuf(sc, cur_rx, m);