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 f431759..5bc021f 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 2ea3d14..ad13dcd 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 e5afc8f..23c143a 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 8cc01c1..0607b98 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 81f0f5d..17049d5 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 c1c14d8..d51f29d 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 5982935..6a90267 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 1d62966..febed2e 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 690ed43..c97c972 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 6837213..3937ced 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;