Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch Elide unused variable warnings (Felix Deichmann)



details:   https://anonhg.NetBSD.org/src/rev/062efd9f22b1
branches:  trunk
changeset: 814961:062efd9f22b1
user:      christos <christos%NetBSD.org@localhost>
date:      Fri Apr 22 18:13:01 2016 +0000

description:
Elide unused variable warnings (Felix Deichmann)

diffstat:

 sys/arch/evbarm/conf/RPI               |   6 +++++-
 sys/arch/macppc/stand/ofwboot/Locore.c |  10 ++++++++--
 sys/arch/vax/include/bus.h             |  11 +++++++----
 3 files changed, 20 insertions(+), 7 deletions(-)

diffs (95 lines):

diff -r 18b1356e89a6 -r 062efd9f22b1 sys/arch/evbarm/conf/RPI
--- a/sys/arch/evbarm/conf/RPI  Fri Apr 22 18:12:47 2016 +0000
+++ b/sys/arch/evbarm/conf/RPI  Fri Apr 22 18:13:01 2016 +0000
@@ -1,5 +1,5 @@
 #
-#      $NetBSD: RPI,v 1.65 2015/10/04 10:16:39 skrll Exp $
+#      $NetBSD: RPI,v 1.66 2016/04/22 18:13:01 christos Exp $
 #
 #      RPi -- Raspberry Pi
 #
@@ -29,6 +29,10 @@
 #options DWC2_DEBUG
 #options UHUB_DEBUG
 
+# DTrace
+options                INSECURE                # module loading
+options                DTRACE_HOOKS
+
 
 # Valid options for BOOT_ARGS:
 #  single              Boot to single user only
diff -r 18b1356e89a6 -r 062efd9f22b1 sys/arch/macppc/stand/ofwboot/Locore.c
--- a/sys/arch/macppc/stand/ofwboot/Locore.c    Fri Apr 22 18:12:47 2016 +0000
+++ b/sys/arch/macppc/stand/ofwboot/Locore.c    Fri Apr 22 18:13:01 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: Locore.c,v 1.27 2016/03/13 08:57:10 tsutsui Exp $      */
+/*     $NetBSD: Locore.c,v 1.28 2016/04/22 18:13:01 christos Exp $     */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -143,7 +143,13 @@
 "                              \n"
 "5:    cmpw    0,%r8,%r9       \n"
 "      bge     6f              \n"
-"      stw     %r0,0(%r8)      \n"
+        /*
+         * clear by bytes to avoid ppc601 alignment exceptions
+         */
+"       stb     %r0,0(%r8)      \n"
+"       stb     %r0,1(%r8)      \n"
+"       stb     %r0,2(%r8)      \n"
+"       stb     %r0,3(%r8)      \n"
 "      addi    %r8,%r8,4       \n"
 "      b       5b              \n"
 "                              \n"
diff -r 18b1356e89a6 -r 062efd9f22b1 sys/arch/vax/include/bus.h
--- a/sys/arch/vax/include/bus.h        Fri Apr 22 18:12:47 2016 +0000
+++ b/sys/arch/vax/include/bus.h        Fri Apr 22 18:13:01 2016 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: bus.h,v 1.32 2015/07/05 02:03:36 matt Exp $    */
+/*     $NetBSD: bus.h,v 1.33 2016/04/22 18:13:01 christos Exp $        */
 
 /*-
  * Copyright (c) 1996, 1997, 1998, 2001 The NetBSD Foundation, Inc.
@@ -205,15 +205,15 @@
  */
 
 #define        bus_space_read_1(t, h, o)                                       \
-           (*(volatile uint8_t *)((h) + (o)))
+        (__USE(t), (*(volatile uint8_t *)((h) + (o))))
 
 #define        bus_space_read_2(t, h, o)                                       \
         (__BUS_SPACE_ADDRESS_SANITY((h) + (o), uint16_t, "bus addr"),  \
-           (*(volatile uint16_t *)((h) + (o))))
+           __USE(t), (*(volatile uint16_t *)((h) + (o))))
 
 #define        bus_space_read_4(t, h, o)                                       \
         (__BUS_SPACE_ADDRESS_SANITY((h) + (o), uint32_t, "bus addr"),  \
-           (*(volatile uint32_t *)((h) + (o))))
+           __USE(t), (*(volatile uint32_t *)((h) + (o))))
 
 #if 0  /* Cause a link error for bus_space_read_8 */
 #define        bus_space_read_8(t, h, o)       !!! bus_space_read_8 unimplemented !!!
@@ -368,18 +368,21 @@
 
 #define        bus_space_write_1(t, h, o, v)                                   \
 do {                                                                   \
+       __USE(t);                                                       \
        ((void)(*(volatile uint8_t *)((h) + (o)) = (v)));               \
 } while (0)
 
 #define        bus_space_write_2(t, h, o, v)                                   \
 do {                                                                   \
        __BUS_SPACE_ADDRESS_SANITY((h) + (o), uint16_t, "bus addr");    \
+       __USE(t);                                                       \
        ((void)(*(volatile uint16_t *)((h) + (o)) = (v)));              \
 } while (0)
 
 #define        bus_space_write_4(t, h, o, v)                                   \
 do {                                                                   \
        __BUS_SPACE_ADDRESS_SANITY((h) + (o), uint32_t, "bus addr");    \
+       __USE(t);                                                       \
        ((void)(*(volatile uint32_t *)((h) + (o)) = (v)));              \
 } while (0)
 



Home | Main Index | Thread Index | Old Index