Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev Use unsig...
details: https://anonhg.NetBSD.org/src/rev/4ef186a18a4a
branches: trunk
changeset: 1008729:4ef186a18a4a
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Wed Apr 01 15:55:52 2020 +0000
description:
Use unsigned to avoid undefined behavior. Found by kUBSan.
diffstat:
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/gpio/nouveau_nvkm_subdev_gpio_nv50.c | 6 +++---
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/i2c/nouveau_nvkm_subdev_i2c_g94.c | 6 +++---
2 files changed, 6 insertions(+), 6 deletions(-)
diffs (54 lines):
diff -r e00fad514192 -r 4ef186a18a4a sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/gpio/nouveau_nvkm_subdev_gpio_nv50.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/gpio/nouveau_nvkm_subdev_gpio_nv50.c Wed Apr 01 15:54:06 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/gpio/nouveau_nvkm_subdev_gpio_nv50.c Wed Apr 01 15:55:52 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_nvkm_subdev_gpio_nv50.c,v 1.2 2018/08/27 04:58:34 riastradh Exp $ */
+/* $NetBSD: nouveau_nvkm_subdev_gpio_nv50.c,v 1.3 2020/04/01 15:55:52 msaitoh Exp $ */
/*
* Copyright 2012 Red Hat Inc.
@@ -24,7 +24,7 @@
* Authors: Ben Skeggs
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_gpio_nv50.c,v 1.2 2018/08/27 04:58:34 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_gpio_nv50.c,v 1.3 2020/04/01 15:55:52 msaitoh Exp $");
#include "priv.h"
@@ -55,7 +55,7 @@
nvkm_gpio_set(gpio, 0, func, line, defs);
- nvkm_mask(device, reg, 0x00010001 << lsh, val << lsh);
+ nvkm_mask(device, reg, 0x00010001U << lsh, val << lsh);
}
}
diff -r e00fad514192 -r 4ef186a18a4a sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/i2c/nouveau_nvkm_subdev_i2c_g94.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/i2c/nouveau_nvkm_subdev_i2c_g94.c Wed Apr 01 15:54:06 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/i2c/nouveau_nvkm_subdev_i2c_g94.c Wed Apr 01 15:55:52 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_nvkm_subdev_i2c_g94.c,v 1.2 2018/08/27 04:58:34 riastradh Exp $ */
+/* $NetBSD: nouveau_nvkm_subdev_i2c_g94.c,v 1.3 2020/04/01 15:55:52 msaitoh Exp $ */
/*
* Copyright 2012 Red Hat Inc.
@@ -24,7 +24,7 @@
* Authors: Ben Skeggs
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_i2c_g94.c,v 1.2 2018/08/27 04:58:34 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_i2c_g94.c,v 1.3 2020/04/01 15:55:52 msaitoh Exp $");
#include "priv.h"
#include "pad.h"
@@ -39,7 +39,7 @@
if ((stat & (1 << (i * 4)))) *hi |= 1 << i;
if ((stat & (2 << (i * 4)))) *lo |= 1 << i;
if ((stat & (4 << (i * 4)))) *rq |= 1 << i;
- if ((stat & (8 << (i * 4)))) *tx |= 1 << i;
+ if ((stat & (8U << (i * 4)))) *tx |= 1 << i;
}
nvkm_wr32(device, 0x00e06c, intr);
}
Home |
Main Index |
Thread Index |
Old Index