]> git.karo-electronics.de Git - linux-beck.git/commitdiff
drm/nouveau: mark nv_printk_ as printf-like function
authorMarcin Slusarz <marcin.slusarz@gmail.com>
Sat, 29 Dec 2012 15:24:37 +0000 (16:24 +0100)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 20 Feb 2013 06:00:34 +0000 (16:00 +1000)
...and fix all warnings

Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
drivers/gpu/drm/nouveau/core/engine/crypt/nv84.c
drivers/gpu/drm/nouveau/core/engine/graph/nv04.c
drivers/gpu/drm/nouveau/core/engine/graph/nv10.c
drivers/gpu/drm/nouveau/core/engine/graph/nv20.c
drivers/gpu/drm/nouveau/core/engine/graph/nv40.c
drivers/gpu/drm/nouveau/core/engine/graph/nv50.c
drivers/gpu/drm/nouveau/core/include/core/object.h
drivers/gpu/drm/nouveau/core/include/core/printk.h
drivers/gpu/drm/nouveau/core/subdev/bios/init.c
drivers/gpu/drm/nouveau/core/subdev/device/base.c

index f4317597a990439a5145f3f3aa31010b628fe973..5bc021f471f9f494ce6e30511afde19a50426b23 100644 (file)
@@ -127,7 +127,7 @@ nv84_crypt_intr(struct nouveau_subdev *subdev)
        chid   = pfifo->chid(pfifo, engctx);
 
        if (stat) {
-               nv_error(priv, "");
+               nv_error(priv, "%s", "");
                nouveau_bitfield_print(nv84_crypt_intr_mask, stat);
                pr_cont(" ch %d [0x%010llx %s] mthd 0x%04x data 0x%08x\n",
                       chid, (u64)inst << 12, nouveau_client_name(engctx),
index 2ea3d140e65c78ddf532db20900536b50bb2ad3f..ad13dcdd15f98b9abc9c3739563d8cd5a0837c37 100644 (file)
@@ -1298,7 +1298,7 @@ nv04_graph_intr(struct nouveau_subdev *subdev)
        nv_wr32(priv, NV04_PGRAPH_FIFO, 0x00000001);
 
        if (show) {
-               nv_error(priv, "");
+               nv_error(priv, "%s", "");
                nouveau_bitfield_print(nv04_graph_intr_name, show);
                pr_cont(" nsource:");
                nouveau_bitfield_print(nv04_graph_nsource, nsource);
index e5afc8ff47d4b95ba03b3264ce926aeb91176887..23c143aaa55640cb5b3a50f7862e38950d8427b7 100644 (file)
@@ -1194,7 +1194,7 @@ nv10_graph_intr(struct nouveau_subdev *subdev)
        nv_wr32(priv, NV04_PGRAPH_FIFO, 0x00000001);
 
        if (show) {
-               nv_error(priv, "");
+               nv_error(priv, "%s", "");
                nouveau_bitfield_print(nv10_graph_intr_name, show);
                pr_cont(" nsource:");
                nouveau_bitfield_print(nv04_graph_nsource, nsource);
index 8cc01c1fa32a93069fa7b46e0c44359e30ea8725..0607b9801748481e16d40ea2103d4855bb627f47 100644 (file)
@@ -225,7 +225,7 @@ nv20_graph_intr(struct nouveau_subdev *subdev)
        nv_wr32(priv, NV04_PGRAPH_FIFO, 0x00000001);
 
        if (show) {
-               nv_error(priv, "");
+               nv_error(priv, "%s", "");
                nouveau_bitfield_print(nv10_graph_intr_name, show);
                pr_cont(" nsource:");
                nouveau_bitfield_print(nv04_graph_nsource, nsource);
index 81f0f5d3ffafcb5b8cac0962807083e4e5089d03..17049d5c723d15e4ca382c3345c9e9186d4ba7e6 100644 (file)
@@ -322,7 +322,7 @@ nv40_graph_intr(struct nouveau_subdev *subdev)
        nv_wr32(priv, NV04_PGRAPH_FIFO, 0x00000001);
 
        if (show) {
-               nv_error(priv, "");
+               nv_error(priv, "%s", "");
                nouveau_bitfield_print(nv10_graph_intr_name, show);
                pr_cont(" nsource:");
                nouveau_bitfield_print(nv04_graph_nsource, nsource);
index c1c14d84cd43ea0067e101a20ea204e37a08c814..d51f29dc38b758e13deec4156be6d1d6af0f5ef2 100644 (file)
@@ -787,7 +787,7 @@ nv50_graph_intr(struct nouveau_subdev *subdev)
        nv_wr32(priv, 0x400500, 0x00010001);
 
        if (show) {
-               nv_error(priv, "");
+               nv_error(priv, "%s", "");
                nouveau_bitfield_print(nv50_graph_intr_name, show);
                pr_cont("\n");
                nv_error(priv,
index 5982935ee23a96896fb12d98e2dc5f723ab245e0..6a902672f6f47e321f1a9c3b334f67b0e308a508 100644 (file)
@@ -133,7 +133,7 @@ static inline u8
 nv_ro08(void *obj, u64 addr)
 {
        u8 data = nv_ofuncs(obj)->rd08(obj, addr);
-       nv_spam(obj, "nv_ro08 0x%08x 0x%02x\n", addr, data);
+       nv_spam(obj, "nv_ro08 0x%08llx 0x%02x\n", addr, data);
        return data;
 }
 
@@ -141,7 +141,7 @@ static inline u16
 nv_ro16(void *obj, u64 addr)
 {
        u16 data = nv_ofuncs(obj)->rd16(obj, addr);
-       nv_spam(obj, "nv_ro16 0x%08x 0x%04x\n", addr, data);
+       nv_spam(obj, "nv_ro16 0x%08llx 0x%04x\n", addr, data);
        return data;
 }
 
@@ -149,28 +149,28 @@ static inline u32
 nv_ro32(void *obj, u64 addr)
 {
        u32 data = nv_ofuncs(obj)->rd32(obj, addr);
-       nv_spam(obj, "nv_ro32 0x%08x 0x%08x\n", addr, data);
+       nv_spam(obj, "nv_ro32 0x%08llx 0x%08x\n", addr, data);
        return data;
 }
 
 static inline void
 nv_wo08(void *obj, u64 addr, u8 data)
 {
-       nv_spam(obj, "nv_wo08 0x%08x 0x%02x\n", addr, data);
+       nv_spam(obj, "nv_wo08 0x%08llx 0x%02x\n", addr, data);
        nv_ofuncs(obj)->wr08(obj, addr, data);
 }
 
 static inline void
 nv_wo16(void *obj, u64 addr, u16 data)
 {
-       nv_spam(obj, "nv_wo16 0x%08x 0x%04x\n", addr, data);
+       nv_spam(obj, "nv_wo16 0x%08llx 0x%04x\n", addr, data);
        nv_ofuncs(obj)->wr16(obj, addr, data);
 }
 
 static inline void
 nv_wo32(void *obj, u64 addr, u32 data)
 {
-       nv_spam(obj, "nv_wo32 0x%08x 0x%08x\n", addr, data);
+       nv_spam(obj, "nv_wo32 0x%08llx 0x%08x\n", addr, data);
        nv_ofuncs(obj)->wr32(obj, addr, data);
 }
 
index 1d629664f32d17c9e655ca5f1ae2d8b89f3f4c2c..febed2ea5c80e50f369c151fc669909200475237 100644 (file)
@@ -15,7 +15,8 @@ struct nouveau_object;
 #define NV_PRINTK_TRACE    KERN_DEBUG
 #define NV_PRINTK_SPAM     KERN_DEBUG
 
-void nv_printk_(struct nouveau_object *, const char *, int, const char *, ...);
+void __printf(4, 5)
+nv_printk_(struct nouveau_object *, const char *, int, const char *, ...);
 
 #define nv_printk(o,l,f,a...) do {                                             \
        if (NV_DBG_##l <= CONFIG_NOUVEAU_DEBUG)                                \
index 690ed438b2adbcf6c3263d5962e84054a62fef5d..c97c972edc62df64043cd2bfc6f6ccda874b716b 100644 (file)
@@ -1866,7 +1866,7 @@ init_zm_reg_group(struct nvbios_init *init)
        u32 addr = nv_ro32(bios, init->offset + 1);
        u8 count = nv_ro08(bios, init->offset + 5);
 
-       trace("ZM_REG_GROUP\tR[0x%06x] =\n");
+       trace("ZM_REG_GROUP\tR[0x%06x] =\n", addr);
        init->offset += 6;
 
        while (count--) {
index 6837213c466394f971331814771baf712c80b143..3937ced5c75310ce7978aa606e4a5a6afae5d1eb 100644 (file)
@@ -104,8 +104,8 @@ nouveau_devobj_ctor(struct nouveau_object *parent,
        struct nouveau_device *device;
        struct nouveau_devobj *devobj;
        struct nv_device_class *args = data;
-       u64 disable, boot0, strap;
-       u64 mmio_base, mmio_size;
+       u32 boot0, strap;
+       u64 disable, mmio_base, mmio_size;
        void __iomem *map;
        int ret, i, c;