Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pci Use macro. No functional change.



details:   https://anonhg.NetBSD.org/src/rev/c27c1c2bb24d
branches:  trunk
changeset: 353014:c27c1c2bb24d
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Mon Apr 17 09:33:00 2017 +0000

description:
Use macro. No functional change.

diffstat:

 sys/dev/pci/pci_subr.c |  16 ++++++++--------
 sys/dev/pci/pcireg.h   |   5 ++++-
 2 files changed, 12 insertions(+), 9 deletions(-)

diffs (71 lines):

diff -r f8a93a139304 -r c27c1c2bb24d sys/dev/pci/pci_subr.c
--- a/sys/dev/pci/pci_subr.c    Mon Apr 17 09:16:13 2017 +0000
+++ b/sys/dev/pci/pci_subr.c    Mon Apr 17 09:33:00 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pci_subr.c,v 1.172 2017/04/06 08:57:01 msaitoh Exp $   */
+/*     $NetBSD: pci_subr.c,v 1.173 2017/04/17 09:33:00 msaitoh Exp $   */
 
 /*
  * Copyright (c) 1997 Zubin D. Dittia.  All rights reserved.
@@ -40,7 +40,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.172 2017/04/06 08:57:01 msaitoh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pci_subr.c,v 1.173 2017/04/17 09:33:00 msaitoh Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_pci.h"
@@ -1907,13 +1907,13 @@
                case 0x0:
                        printf("reserved\n");
                        break;
-               case 0x1:
+               case PCIE_SLCSR_IND_ON:
                        printf("on\n");
                        break;
-               case 0x2:
+               case PCIE_SLCSR_IND_BLINK:
                        printf("blink\n");
                        break;
-               case 0x3:
+               case PCIE_SLCSR_IND_OFF:
                        printf("off\n");
                        break;
                }
@@ -1922,13 +1922,13 @@
                case 0x0:
                        printf("reserved\n");
                        break;
-               case 0x1:
+               case PCIE_SLCSR_IND_ON:
                        printf("on\n");
                        break;
-               case 0x2:
+               case PCIE_SLCSR_IND_BLINK:
                        printf("blink\n");
                        break;
-               case 0x3:
+               case PCIE_SLCSR_IND_OFF:
                        printf("off\n");
                        break;
                }
diff -r f8a93a139304 -r c27c1c2bb24d sys/dev/pci/pcireg.h
--- a/sys/dev/pci/pcireg.h      Mon Apr 17 09:16:13 2017 +0000
+++ b/sys/dev/pci/pcireg.h      Mon Apr 17 09:33:00 2017 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: pcireg.h,v 1.125 2017/03/28 10:47:44 msaitoh Exp $     */
+/*     $NetBSD: pcireg.h,v 1.126 2017/04/17 09:33:00 msaitoh Exp $     */
 
 /*
  * Copyright (c) 1995, 1996, 1999, 2000
@@ -1001,6 +1001,9 @@
 #define PCIE_SLCSR_HPE         __BIT(5)       /* Hot Plug Interrupt Enable */
 #define PCIE_SLCSR_AIC         __BITS(7, 6)   /* Attention Indicator Control*/
 #define PCIE_SLCSR_PIC         __BITS(9, 8)   /* Power Indicator Control */
+#define PCIE_SLCSR_IND_ON      0x1            /* Attn/Power Indicator On */
+#define PCIE_SLCSR_IND_BLINK   0x2            /* Attn/Power Indicator Blink */
+#define PCIE_SLCSR_IND_OFF     0x3            /* Attn/Power Indicator Off */
 #define PCIE_SLCSR_PCC         __BIT(10)      /*
                                                * Power Controller Control:
                                                * 0: Power on, 1: Power off.



Home | Main Index | Thread Index | Old Index