Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/sdmmc Avoid warnings for tautological shifts as sole...
details: https://anonhg.NetBSD.org/src/rev/d8296172716e
branches: trunk
changeset: 464904:d8296172716e
user: joerg <joerg%NetBSD.org@localhost>
date: Mon Oct 28 18:11:15 2019 +0000
description:
Avoid warnings for tautological shifts as sole conditional.
diffstat:
sys/dev/sdmmc/sdhc.c | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diffs (42 lines):
diff -r 2b8c3bee06d9 -r d8296172716e sys/dev/sdmmc/sdhc.c
--- a/sys/dev/sdmmc/sdhc.c Mon Oct 28 18:10:22 2019 +0000
+++ b/sys/dev/sdmmc/sdhc.c Mon Oct 28 18:11:15 2019 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sdhc.c,v 1.105 2019/10/28 06:00:14 mlelstv Exp $ */
+/* $NetBSD: sdhc.c,v 1.106 2019/10/28 18:11:15 joerg Exp $ */
/* $OpenBSD: sdhc.c,v 1.25 2009/01/13 19:44:20 grange Exp $ */
/*
@@ -23,7 +23,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.105 2019/10/28 06:00:14 mlelstv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sdhc.c,v 1.106 2019/10/28 18:11:15 joerg Exp $");
#ifdef _KERNEL_OPT
#include "opt_sdmmc.h"
@@ -170,17 +170,17 @@
#define HWRITE4(hp, reg, val) hwrite4(hp, reg, val)
#define HCLR1(hp, reg, bits) \
- do if (bits) HWRITE1((hp), (reg), HREAD1((hp), (reg)) & ~(bits)); while (0)
+ do if ((bits) != 0) HWRITE1((hp), (reg), HREAD1((hp), (reg)) & ~(bits)); while (0)
#define HCLR2(hp, reg, bits) \
- do if (bits) HWRITE2((hp), (reg), HREAD2((hp), (reg)) & ~(bits)); while (0)
+ do if ((bits) != 0) HWRITE2((hp), (reg), HREAD2((hp), (reg)) & ~(bits)); while (0)
#define HCLR4(hp, reg, bits) \
- do if (bits) HWRITE4((hp), (reg), HREAD4((hp), (reg)) & ~(bits)); while (0)
+ do if ((bits) != 0) HWRITE4((hp), (reg), HREAD4((hp), (reg)) & ~(bits)); while (0)
#define HSET1(hp, reg, bits) \
- do if (bits) HWRITE1((hp), (reg), HREAD1((hp), (reg)) | (bits)); while (0)
+ do if ((bits) != 0) HWRITE1((hp), (reg), HREAD1((hp), (reg)) | (bits)); while (0)
#define HSET2(hp, reg, bits) \
- do if (bits) HWRITE2((hp), (reg), HREAD2((hp), (reg)) | (bits)); while (0)
+ do if ((bits) != 0) HWRITE2((hp), (reg), HREAD2((hp), (reg)) | (bits)); while (0)
#define HSET4(hp, reg, bits) \
- do if (bits) HWRITE4((hp), (reg), HREAD4((hp), (reg)) | (bits)); while (0)
+ do if ((bits) != 0) HWRITE4((hp), (reg), HREAD4((hp), (reg)) | (bits)); while (0)
static int sdhc_host_reset(sdmmc_chipset_handle_t);
static int sdhc_host_reset1(sdmmc_chipset_handle_t);
Home |
Main Index |
Thread Index |
Old Index