Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb simplify single bit tests. no code difference is...



details:   https://anonhg.NetBSD.org/src/rev/5994379d719e
branches:  trunk
changeset: 969776:5994379d719e
user:      nisimura <nisimura%NetBSD.org@localhost>
date:      Sun Mar 01 08:32:15 2020 +0000

description:
simplify single bit tests. no code difference is observed

diffstat:

 sys/dev/usb/if_axe.c |  12 +++++-------
 1 files changed, 5 insertions(+), 7 deletions(-)

diffs (36 lines):

diff -r 336bffd75a31 -r 5994379d719e sys/dev/usb/if_axe.c
--- a/sys/dev/usb/if_axe.c      Sun Mar 01 08:21:38 2020 +0000
+++ b/sys/dev/usb/if_axe.c      Sun Mar 01 08:32:15 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: if_axe.c,v 1.126 2020/02/29 04:27:53 nisimura Exp $    */
+/*     $NetBSD: if_axe.c,v 1.127 2020/03/01 08:32:15 nisimura Exp $    */
 /*     $OpenBSD: if_axe.c,v 1.137 2016/04/13 11:03:37 mpi Exp $ */
 
 /*
@@ -87,7 +87,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.126 2020/02/29 04:27:53 nisimura Exp $");
+__KERNEL_RCSID(0, "$NetBSD: if_axe.c,v 1.127 2020/03/01 08:32:15 nisimura Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_usb.h"
@@ -387,14 +387,12 @@
                return;
 
        val = 0;
-       if ((IFM_OPTIONS(mii->mii_media_active) & IFM_FDX) != 0) {
+       if (mii->mii_media_active & IFM_FDX) {
                val |= AXE_MEDIA_FULL_DUPLEX;
                if (AXE_IS_178_FAMILY(un)) {
-                       if ((IFM_OPTIONS(mii->mii_media_active) &
-                           IFM_ETH_TXPAUSE) != 0)
+                       if (mii->mii_media_active & IFM_ETH_TXPAUSE)
                                val |= AXE_178_MEDIA_TXFLOW_CONTROL_EN;
-                       if ((IFM_OPTIONS(mii->mii_media_active) &
-                           IFM_ETH_RXPAUSE) != 0)
+                       if (mii->mii_media_active & IFM_ETH_RXPAUSE)
                                val |= AXE_178_MEDIA_RXFLOW_CONTROL_EN;
                }
        }



Home | Main Index | Thread Index | Old Index