Source-Changes-HG archive

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

[src/trunk]: src/sys Remove duplicate copies of the SET/CLR/ISSET macros.



details:   https://anonhg.NetBSD.org/src/rev/523bbd8665ab
branches:  trunk
changeset: 320485:523bbd8665ab
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Jul 09 14:07:37 2018 +0000

description:
Remove duplicate copies of the SET/CLR/ISSET macros.

diffstat:

 sys/arch/evbarm/stand/boot2440/dev_sdmmc.c |  11 -----------
 sys/arch/mips/sibyte/dev/sbjcnvar.h        |  13 +------------
 sys/dev/sbus/magmareg.h                    |  15 +--------------
 sys/dev/sbus/spifreg.h                     |  15 +--------------
 4 files changed, 3 insertions(+), 51 deletions(-)

diffs (103 lines):

diff -r dee5454a5758 -r 523bbd8665ab sys/arch/evbarm/stand/boot2440/dev_sdmmc.c
--- a/sys/arch/evbarm/stand/boot2440/dev_sdmmc.c        Mon Jul 09 12:15:31 2018 +0000
+++ b/sys/arch/evbarm/stand/boot2440/dev_sdmmc.c        Mon Jul 09 14:07:37 2018 +0000
@@ -90,17 +90,6 @@
 #include "dev_sdmmc.h"
 #include "s3csdi.h"
 
-#ifndef SET
-#define SET(t, f)       ((t) |= (f))
-#endif
-#ifndef ISSET
-#define ISSET(t, f)     ((t) & (f))
-#endif
-#ifndef CLR
-#define CLR(t, f)       ((t) &= ~(f))
-#endif
-
-
 //#define SDMMC_DEBUG
 #ifdef SDMMC_DEBUG
 #define DPRINTF(s) do {printf s; } while (/*CONSTCOND*/0)
diff -r dee5454a5758 -r 523bbd8665ab sys/arch/mips/sibyte/dev/sbjcnvar.h
--- a/sys/arch/mips/sibyte/dev/sbjcnvar.h       Mon Jul 09 12:15:31 2018 +0000
+++ b/sys/arch/mips/sibyte/dev/sbjcnvar.h       Mon Jul 09 14:07:37 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sbjcnvar.h,v 1.7 2018/07/09 08:51:19 kre Exp $ */
+/* $NetBSD: sbjcnvar.h,v 1.8 2018/07/09 14:07:37 christos Exp $ */
 
 /*
  * Copyright 2000, 2001
@@ -169,14 +169,3 @@
 
        struct sbjcn_channel sc_channels[1];
 };
-
-/* Macros to clear/set/test flags. */
-#ifndef SET
-#define        SET(t, f)       ((t) |= (f))
-#endif
-#ifndef CLR
-#define        CLR(t, f)       ((t) &= ~(f))
-#endif
-#ifndef ISSET
-#define        ISSET(t, f)     ((t) & (f))
-#endif
diff -r dee5454a5758 -r 523bbd8665ab sys/dev/sbus/magmareg.h
--- a/sys/dev/sbus/magmareg.h   Mon Jul 09 12:15:31 2018 +0000
+++ b/sys/dev/sbus/magmareg.h   Mon Jul 09 14:07:37 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: magmareg.h,v 1.19 2018/07/09 08:51:19 kre Exp $        */
+/*     $NetBSD: magmareg.h,v 1.20 2018/07/09 14:07:37 christos Exp $   */
 
 /*-
  *  Copyright (c) 1998 Iain Hibbert
@@ -186,19 +186,6 @@
        struct mbpp_port ms_port[MAGMA_MAX_BPP];
 };
 
-/*
- * useful macros
- */
-#ifndef SET
-#define SET(t, f)      ((t) |= (f))
-#endif
-#ifndef CLR
-#define CLR(t, f)      ((t) &= ~(f))
-#endif
-#ifndef ISSET
-#define ISSET(t, f)    ((t) & (f))
-#endif
-
 /* internal function prototypes */
 
 int cd1400_compute_baud(speed_t, int, int *, int *);
diff -r dee5454a5758 -r 523bbd8665ab sys/dev/sbus/spifreg.h
--- a/sys/dev/sbus/spifreg.h    Mon Jul 09 12:15:31 2018 +0000
+++ b/sys/dev/sbus/spifreg.h    Mon Jul 09 14:07:37 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: spifreg.h,v 1.6 2018/07/09 08:51:19 kre Exp $  */
+/*     $NetBSD: spifreg.h,v 1.7 2018/07/09 14:07:37 christos Exp $     */
 /*     $OpenBSD: spifreg.h,v 1.5 2003/06/02 18:32:41 jason Exp $       */
 
 /*
@@ -381,19 +381,6 @@
 #define        STTY_RBUF_SIZE          (2 * 512)
 
 /*
- * useful macros
- */
-#ifndef SET
-#define        SET(t, f)       ((t) |= (f))
-#endif
-#ifndef CLR
-#define        CLR(t, f)       ((t) &= ~(f))
-#endif
-#ifndef ISSET
-#define        ISSET(t, f)     ((t) & (f))
-#endif
-
-/*
  * internal function prototypes
  */
 int    spif_match(device_t, cfdata_t, void *);



Home | Main Index | Thread Index | Old Index