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/include Fake out unhe...



details:   https://anonhg.NetBSD.org/src/rev/3d7d42a0b45e
branches:  trunk
changeset: 366019:3d7d42a0b45e
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Mon Aug 27 07:35:22 2018 +0000

description:
Fake out unhelpful -Wtype-limits.

diffstat:

 sys/external/bsd/drm2/dist/drm/nouveau/include/nvif/unpack.h      |  7 ++++---
 sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/client.h |  4 ++--
 sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/subdev.h |  4 ++--
 3 files changed, 8 insertions(+), 7 deletions(-)

diffs (57 lines):

diff -r f5f0fc359fa1 -r 3d7d42a0b45e sys/external/bsd/drm2/dist/drm/nouveau/include/nvif/unpack.h
--- a/sys/external/bsd/drm2/dist/drm/nouveau/include/nvif/unpack.h      Mon Aug 27 07:35:13 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/include/nvif/unpack.h      Mon Aug 27 07:35:22 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: unpack.h,v 1.2 2018/08/27 04:58:30 riastradh Exp $     */
+/*     $NetBSD: unpack.h,v 1.3 2018/08/27 07:35:22 riastradh Exp $     */
 
 #ifndef __NVIF_UNPACK_H__
 #define __NVIF_UNPACK_H__
@@ -11,8 +11,9 @@
 #define nvif_unpack(d,vl,vh,m) ({                                              \
        if ((vl) == 0 || ret == -ENOSYS) {                                     \
                int _size = sizeof(d);                                         \
-               if (_size <= size && (d).version >= (vl) &&                    \
-                                    (d).version <= (vh)) {                    \
+               if (_size <= size &&                                           \
+                   ((d).version == (vl) || (d).version > (vl)) &&             \
+                   (d).version <= (vh)) {                                     \
                        data = (u8 *)data + _size;                             \
                        size = size - _size;                                   \
                        ret = ((m) || !size) ? 0 : -E2BIG;                     \
diff -r f5f0fc359fa1 -r 3d7d42a0b45e sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/client.h
--- a/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/client.h Mon Aug 27 07:35:13 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/client.h Mon Aug 27 07:35:22 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: client.h,v 1.2 2018/08/27 04:58:30 riastradh Exp $     */
+/*     $NetBSD: client.h,v 1.3 2018/08/27 07:35:22 riastradh Exp $     */
 
 #ifndef __NVKM_CLIENT_H__
 #define __NVKM_CLIENT_H__
@@ -41,7 +41,7 @@
 #define nvif_printk(o,l,p,f,a...) do {                                         \
        struct nvkm_object *_object = (o);                                     \
        struct nvkm_client *_client = _object->client;                         \
-       if (_client->debug >= NV_DBG_##l)                                      \
+       if (_client->debug == NV_DBG_##l || _client->debug > NV_DBG_##l)       \
                printk(KERN_##p "nouveau: %s:%08x:%08x: "f, _client->name,     \
                       _object->handle, _object->oclass, ##a);                 \
 } while(0)
diff -r f5f0fc359fa1 -r 3d7d42a0b45e sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/subdev.h
--- a/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/subdev.h Mon Aug 27 07:35:13 2018 +0000
+++ b/sys/external/bsd/drm2/dist/drm/nouveau/include/nvkm/core/subdev.h Mon Aug 27 07:35:22 2018 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: subdev.h,v 1.2 2018/08/27 04:58:30 riastradh Exp $     */
+/*     $NetBSD: subdev.h,v 1.3 2018/08/27 07:35:22 riastradh Exp $     */
 
 #ifndef __NVKM_SUBDEV_H__
 #define __NVKM_SUBDEV_H__
@@ -36,7 +36,7 @@
 /* subdev logging */
 #define nvkm_printk_(s,l,p,f,a...) do {                                        \
        struct nvkm_subdev *_subdev = (s);                                     \
-       if (_subdev->debug >= (l)) {                                           \
+       if (_subdev->debug == (l) || _subdev->debug > (l)) {                   \
                dev_##p(_subdev->device->dev, "%s: "f,                         \
                        nvkm_subdev_name[_subdev->index], ##a);                \
        }                                                                      \



Home | Main Index | Thread Index | Old Index