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/gpio Calc...
details: https://anonhg.NetBSD.org/src/rev/69751fc2ac78
branches: trunk
changeset: 746452:69751fc2ac78
user: msaitoh <msaitoh%NetBSD.org@localhost>
date: Wed Apr 01 15:57:46 2020 +0000
description:
Calculate mask correctly for bit 31 in nvkm_gpio_fini(). Found by kUBSan.
diffstat:
sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/gpio/nouveau_nvkm_subdev_gpio_base.c | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
diffs (27 lines):
diff -r 03bbbfd7bad8 -r 69751fc2ac78 sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/gpio/nouveau_nvkm_subdev_gpio_base.c
--- a/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/gpio/nouveau_nvkm_subdev_gpio_base.c Wed Apr 01 15:55:52 2020 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/nvkm/subdev/gpio/nouveau_nvkm_subdev_gpio_base.c Wed Apr 01 15:57:46 2020 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: nouveau_nvkm_subdev_gpio_base.c,v 1.2 2018/08/27 04:58:34 riastradh Exp $ */
+/* $NetBSD: nouveau_nvkm_subdev_gpio_base.c,v 1.3 2020/04/01 15:57:46 msaitoh Exp $ */
/*
* Copyright 2011 Red Hat Inc.
@@ -24,7 +24,7 @@
* Authors: Ben Skeggs
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_gpio_base.c,v 1.2 2018/08/27 04:58:34 riastradh Exp $");
+__KERNEL_RCSID(0, "$NetBSD: nouveau_nvkm_subdev_gpio_base.c,v 1.3 2020/04/01 15:57:46 msaitoh Exp $");
#include "priv.h"
@@ -169,7 +169,7 @@
nvkm_gpio_fini(struct nvkm_subdev *subdev, bool suspend)
{
struct nvkm_gpio *gpio = nvkm_gpio(subdev);
- u32 mask = (1 << gpio->func->lines) - 1;
+ u32 mask = (1ULL << gpio->func->lines) - 1;
gpio->func->intr_mask(gpio, NVKM_GPIO_TOGGLED, mask, 0);
gpio->func->intr_stat(gpio, &mask, &mask);
Home |
Main Index |
Thread Index |
Old Index