Commit c1fcb148 authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Ben Skeggs
Browse files

drm/nouveau/core: constify nv*_printk macros



Constify the local variables declared in these macros so we can pass
const pointers to them.

Signed-off-by: default avatarAlexandre Courbot <acourbot@nvidia.com>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 9ca70356
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -37,8 +37,8 @@ int nvkm_client_notify_put(struct nvkm_client *, int index);

/* logging for client-facing objects */
#define nvif_printk(o,l,p,f,a...) do {                                         \
	struct nvkm_object *_object = (o);                                     \
	struct nvkm_client *_client = _object->client;                         \
	const struct nvkm_object *_object = (o);                               \
	const struct nvkm_client *_client = _object->client;                   \
	if (_client->debug >= NV_DBG_##l)                                      \
		printk(KERN_##p "nouveau: %s:%08x:%08x: "f, _client->name,     \
		       _object->handle, _object->oclass, ##a);                 \
+1 −1
Original line number Diff line number Diff line
@@ -262,7 +262,7 @@ extern const struct nvkm_sclass nvkm_udevice_sclass;

/* device logging */
#define nvdev_printk_(d,l,p,f,a...) do {                                       \
	struct nvkm_device *_device = (d);                                     \
	const struct nvkm_device *_device = (d);                               \
	if (_device->debug >= (l))                                             \
		dev_##p(_device->dev, f, ##a);                                 \
} while(0)
+1 −1
Original line number Diff line number Diff line
@@ -32,7 +32,7 @@ void nvkm_subdev_intr(struct nvkm_subdev *);

/* subdev logging */
#define nvkm_printk_(s,l,p,f,a...) do {                                        \
	struct nvkm_subdev *_subdev = (s);                                     \
	const struct nvkm_subdev *_subdev = (s);                               \
	if (_subdev->debug >= (l)) {                                           \
		dev_##p(_subdev->device->dev, "%s: "f,                         \
			nvkm_subdev_name[_subdev->index], ##a);                \