Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-7]: src/sys Pull up following revision(s) (requested by joerg in ...
details: https://anonhg.NetBSD.org/src/rev/1e485d7c33e6
branches: netbsd-7
changeset: 799332:1e485d7c33e6
user: snj <snj%NetBSD.org@localhost>
date: Fri May 15 04:12:07 2015 +0000
description:
Pull up following revision(s) (requested by joerg in ticket #772):
sys/arch/arm/amlogic/amlogic_genfb.c: revision 1.4
sys/arch/arm/arm/disassem.c: revision 1.25
sys/arch/arm/omap/am335x_cm_padconf.c: revision 1.3
sys/arch/arm/omap/sitara_cm.h: revision 1.2
sys/dev/ic/i82557var.h: revision 1.51
sys/dev/ic/rtl8169.c: revision 1.143
sys/dev/ieee1394/fwcrom.c: revision 1.17
sys/external/bsd/dwc2/dwc2.c: revision 1.32
dwc2_hubd appears to be unused so #if 0 it in order to appease clang
--
Preserve const.
--
No reason not to make the string const.
--
Drop unnecessary-but-harmful casts.
--
Replace void * cast with proper __UNVOLATILE.
--
Preserve const.
--
amlogic_genfb_hdmi_write_4 is currently unused, mark it as such.
diffstat:
sys/arch/arm/amlogic/amlogic_genfb.c | 6 +++---
sys/arch/arm/arm/disassem.c | 6 +++---
sys/arch/arm/omap/am335x_cm_padconf.c | 8 ++++----
sys/arch/arm/omap/sitara_cm.h | 6 +++---
sys/dev/ic/i82557var.h | 8 ++++----
sys/dev/ic/rtl8169.c | 12 ++++++------
sys/dev/ieee1394/fwcrom.c | 6 +++---
sys/external/bsd/dwc2/dwc2.c | 7 +++++--
8 files changed, 31 insertions(+), 28 deletions(-)
diffs (234 lines):
diff -r 1cc53aaee36d -r 1e485d7c33e6 sys/arch/arm/amlogic/amlogic_genfb.c
--- a/sys/arch/arm/amlogic/amlogic_genfb.c Fri May 15 04:00:50 2015 +0000
+++ b/sys/arch/arm/amlogic/amlogic_genfb.c Fri May 15 04:12:07 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: amlogic_genfb.c,v 1.1.2.4 2015/04/06 01:48:25 snj Exp $ */
+/* $NetBSD: amlogic_genfb.c,v 1.1.2.5 2015/05/15 04:12:07 snj Exp $ */
/*-
* Copyright (c) 2015 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -31,7 +31,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: amlogic_genfb.c,v 1.1.2.4 2015/04/06 01:48:25 snj Exp $");
+__KERNEL_RCSID(0, "$NetBSD: amlogic_genfb.c,v 1.1.2.5 2015/05/15 04:12:07 snj Exp $");
#include <sys/param.h>
#include <sys/types.h>
@@ -137,7 +137,7 @@
return bus_space_read_4(sc->sc_bst, sc->sc_hdmi_bsh, HDMI_DATA_REG);
}
-static inline void
+static __unused inline void
amlogic_genfb_hdmi_write_4(struct amlogic_genfb_softc *sc, uint32_t addr,
uint32_t data)
{
diff -r 1cc53aaee36d -r 1e485d7c33e6 sys/arch/arm/arm/disassem.c
--- a/sys/arch/arm/arm/disassem.c Fri May 15 04:00:50 2015 +0000
+++ b/sys/arch/arm/arm/disassem.c Fri May 15 04:12:07 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: disassem.c,v 1.24.4.2 2015/01/04 11:43:53 martin Exp $ */
+/* $NetBSD: disassem.c,v 1.24.4.3 2015/05/15 04:12:07 snj Exp $ */
/*
* Copyright (c) 1996 Mark Brinicombe.
@@ -49,7 +49,7 @@
#include <sys/param.h>
-__KERNEL_RCSID(0, "$NetBSD: disassem.c,v 1.24.4.2 2015/01/04 11:43:53 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: disassem.c,v 1.24.4.3 2015/05/15 04:12:07 snj Exp $");
#include <sys/systm.h>
@@ -321,7 +321,7 @@
vaddr_t
disasm(const disasm_interface_t *di, vaddr_t loc, int altfmt)
{
- struct arm32_insn *i_ptr = (struct arm32_insn *)&arm32_i;
+ const struct arm32_insn *i_ptr = (const struct arm32_insn *)&arm32_i;
u_int insn;
int matchp;
diff -r 1cc53aaee36d -r 1e485d7c33e6 sys/arch/arm/omap/am335x_cm_padconf.c
--- a/sys/arch/arm/omap/am335x_cm_padconf.c Fri May 15 04:00:50 2015 +0000
+++ b/sys/arch/arm/omap/am335x_cm_padconf.c Fri May 15 04:12:07 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: am335x_cm_padconf.c,v 1.2 2013/05/06 18:53:40 rkujawa Exp $ */
+/* $NetBSD: am335x_cm_padconf.c,v 1.2.14.1 2015/05/15 04:12:07 snj Exp $ */
/*-
* Copyright (c) 2012 Damjan Marion <dmarion%FreeBSD.org@localhost>
* All rights reserved.
@@ -26,7 +26,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: am335x_cm_padconf.c,v 1.2 2013/05/06 18:53:40 rkujawa Exp $");
+__KERNEL_RCSID(0, "$NetBSD: am335x_cm_padconf.c,v 1.2.14.1 2015/05/15 04:12:07 snj Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -295,8 +295,8 @@
const struct sitara_cm_device sitara_cm_dev = {
.padconf_muxmode_mask = 0x7,
.padconf_sate_mask = 0x78,
- .padstate = (struct sitara_cm_padstate *) &ti_padstate_devmap,
- .padconf = (struct sitara_cm_padconf *) &ti_padconf_devmap,
+ .padstate = ti_padstate_devmap,
+ .padconf = ti_padconf_devmap,
};
int
diff -r 1cc53aaee36d -r 1e485d7c33e6 sys/arch/arm/omap/sitara_cm.h
--- a/sys/arch/arm/omap/sitara_cm.h Fri May 15 04:00:50 2015 +0000
+++ b/sys/arch/arm/omap/sitara_cm.h Fri May 15 04:12:07 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sitara_cm.h,v 1.1 2013/04/17 14:31:02 bouyer Exp $ */
+/* $NetBSD: sitara_cm.h,v 1.1.14.1 2015/05/15 04:12:07 snj Exp $ */
/*
* Copyright (c) 2010
* Ben Gray <ben.r.gray%gmail.com@localhost>.
@@ -59,8 +59,8 @@
struct sitara_cm_device {
uint16_t padconf_muxmode_mask;
uint16_t padconf_sate_mask;
- struct sitara_cm_padstate *padstate;
- struct sitara_cm_padconf *padconf;
+ const struct sitara_cm_padstate *padstate;
+ const struct sitara_cm_padconf *padconf;
};
int sitara_cm_padconf_set(const char *padname, const char *muxmode,
diff -r 1cc53aaee36d -r 1e485d7c33e6 sys/dev/ic/i82557var.h
--- a/sys/dev/ic/i82557var.h Fri May 15 04:00:50 2015 +0000
+++ b/sys/dev/ic/i82557var.h Fri May 15 04:12:07 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: i82557var.h,v 1.50 2012/02/02 19:43:03 tls Exp $ */
+/* $NetBSD: i82557var.h,v 1.50.22.1 2015/05/15 04:12:07 snj Exp $ */
/*-
* Copyright (c) 1997, 1998, 1999, 2001 The NetBSD Foundation, Inc.
@@ -323,8 +323,8 @@
/* NOTE: the RFA is misaligned, so we must copy. */ \
/* BIG_ENDIAN: no need to swap to store 0xffffffff */ \
__v = 0xffffffff; \
- memcpy((void *)&__rfa->link_addr, &__v, sizeof(__v)); \
- memcpy((void *)&__rfa->rbd_addr, &__v, sizeof(__v)); \
+ memcpy(__UNVOLATILE(&__rfa->link_addr), &__v, sizeof(__v)); \
+ memcpy(__UNVOLATILE(&__rfa->rbd_addr), &__v, sizeof(__v)); \
\
FXP_RFASYNC((sc), (m), \
BUS_DMASYNC_PREREAD|BUS_DMASYNC_PREWRITE); \
@@ -337,7 +337,7 @@
RFA_ALIGNMENT_FUDGE); \
FXP_RFASYNC((sc), __p_m, \
BUS_DMASYNC_POSTREAD|BUS_DMASYNC_POSTWRITE); \
- memcpy((void *)&__p_rfa->link_addr, &__v, \
+ memcpy(__UNVOLATILE(&__p_rfa->link_addr), &__v, \
sizeof(__v)); \
__p_rfa->rfa_control &= htole16(~(FXP_RFA_CONTROL_EL| \
FXP_RFA_CONTROL_S)); \
diff -r 1cc53aaee36d -r 1e485d7c33e6 sys/dev/ic/rtl8169.c
--- a/sys/dev/ic/rtl8169.c Fri May 15 04:00:50 2015 +0000
+++ b/sys/dev/ic/rtl8169.c Fri May 15 04:12:07 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: rtl8169.c,v 1.140.2.1 2014/12/14 16:44:04 martin Exp $ */
+/* $NetBSD: rtl8169.c,v 1.140.2.2 2015/05/15 04:12:07 snj Exp $ */
/*
* Copyright (c) 1997, 1998-2003
@@ -33,7 +33,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.140.2.1 2014/12/14 16:44:04 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: rtl8169.c,v 1.140.2.2 2015/05/15 04:12:07 snj Exp $");
/* $FreeBSD: /repoman/r/ncvs/src/sys/dev/re/if_re.c,v 1.20 2004/04/11 20:34:08 ru Exp $ */
/*
@@ -454,8 +454,8 @@
/* Put some data in the mbuf */
eh = mtod(m0, struct ether_header *);
- memcpy(eh->ether_dhost, (char *)&dst, ETHER_ADDR_LEN);
- memcpy(eh->ether_shost, (char *)&src, ETHER_ADDR_LEN);
+ memcpy(eh->ether_dhost, &dst, ETHER_ADDR_LEN);
+ memcpy(eh->ether_shost, &src, ETHER_ADDR_LEN);
eh->ether_type = htons(ETHERTYPE_IP);
m0->m_pkthdr.len = m0->m_len = ETHER_MIN_LEN - ETHER_CRC_LEN;
@@ -517,8 +517,8 @@
/* Test that the received packet data matches what we sent. */
- if (memcmp((char *)&eh->ether_dhost, (char *)&dst, ETHER_ADDR_LEN) ||
- memcmp((char *)&eh->ether_shost, (char *)&src, ETHER_ADDR_LEN) ||
+ if (memcmp(&eh->ether_dhost, &dst, ETHER_ADDR_LEN) ||
+ memcmp(&eh->ether_shost, &src, ETHER_ADDR_LEN) ||
ntohs(eh->ether_type) != ETHERTYPE_IP) {
aprint_error_dev(sc->sc_dev, "WARNING, DMA FAILURE!\n"
"expected TX data: %s/%s/0x%x\n"
diff -r 1cc53aaee36d -r 1e485d7c33e6 sys/dev/ieee1394/fwcrom.c
--- a/sys/dev/ieee1394/fwcrom.c Fri May 15 04:00:50 2015 +0000
+++ b/sys/dev/ieee1394/fwcrom.c Fri May 15 04:12:07 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fwcrom.c,v 1.14.4.1 2014/10/30 12:04:46 martin Exp $ */
+/* $NetBSD: fwcrom.c,v 1.14.4.2 2015/05/15 04:12:07 snj Exp $ */
/*-
* Copyright (c) 2002-2003
* Hidetoshi Shimokawa. All rights reserved.
@@ -34,7 +34,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fwcrom.c,v 1.14.4.1 2014/10/30 12:04:46 martin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fwcrom.c,v 1.14.4.2 2015/05/15 04:12:07 snj Exp $");
#include <sys/param.h>
#ifdef _KERNEL
@@ -172,7 +172,7 @@
struct csrtext *textleaf;
uint32_t *bp;
int i, qlen;
- static char *nullstr = (char *)&"(null)";
+ static const char nullstr[] = "(null)";
if (cc->depth < 0)
return;
diff -r 1cc53aaee36d -r 1e485d7c33e6 sys/external/bsd/dwc2/dwc2.c
--- a/sys/external/bsd/dwc2/dwc2.c Fri May 15 04:00:50 2015 +0000
+++ b/sys/external/bsd/dwc2/dwc2.c Fri May 15 04:12:07 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dwc2.c,v 1.31 2014/08/05 10:33:46 skrll Exp $ */
+/* $NetBSD: dwc2.c,v 1.31.2.1 2015/05/15 04:12:07 snj Exp $ */
/*-
* Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.31 2014/08/05 10:33:46 skrll Exp $");
+__KERNEL_RCSID(0, "$NetBSD: dwc2.c,v 1.31.2.1 2015/05/15 04:12:07 snj Exp $");
#include "opt_usb.h"
@@ -667,6 +667,8 @@
};
#define HSETW(ptr, val) ptr = { (uint8_t)(val), (uint8_t)((val) >> 8) }
+#if 0
+/* appears to be unused */
Static const usb_hub_descriptor_t dwc2_hubd = {
.bDescLength = USB_HUB_DESCRIPTOR_SIZE,
.bDescriptorType = UDESC_HUB,
@@ -676,6 +678,7 @@
.bHubContrCurrent = 0,
.DeviceRemovable = {0}, /* port is removable */
};
+#endif
Static usbd_status
dwc2_root_ctrl_transfer(usbd_xfer_handle xfer)
Home |
Main Index |
Thread Index |
Old Index