]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
drm/nouveau: quiet some static-related sparse noise
authorMarcin Slusarz <marcin.slusarz@gmail.com>
Sun, 19 Aug 2012 21:00:00 +0000 (23:00 +0200)
committerBen Skeggs <bskeggs@redhat.com>
Wed, 3 Oct 2012 03:13:07 +0000 (13:13 +1000)
Signed-off-by: Marcin Slusarz <marcin.slusarz@gmail.com>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
25 files changed:
drivers/gpu/drm/nouveau/core/core/gpuobj.c
drivers/gpu/drm/nouveau/core/core/object.c
drivers/gpu/drm/nouveau/core/core/option.c
drivers/gpu/drm/nouveau/core/engine/copy/fuc/nva3.fuc.h
drivers/gpu/drm/nouveau/core/engine/copy/fuc/nvc0.fuc.h
drivers/gpu/drm/nouveau/core/engine/crypt/fuc/nv98.fuc.h
drivers/gpu/drm/nouveau/core/engine/disp/vga.c
drivers/gpu/drm/nouveau/core/engine/fifo/base.c
drivers/gpu/drm/nouveau/core/engine/fifo/nv84.c
drivers/gpu/drm/nouveau/core/engine/graph/fuc/gpcnvc0.fuc.h
drivers/gpu/drm/nouveau/core/engine/graph/fuc/hubnvc0.fuc.h
drivers/gpu/drm/nouveau/core/engine/graph/nv40.c
drivers/gpu/drm/nouveau/core/engine/graph/nv50.c
drivers/gpu/drm/nouveau/core/engine/mpeg/nv31.c
drivers/gpu/drm/nouveau/core/subdev/bios/conn.c
drivers/gpu/drm/nouveau/core/subdev/mxm/base.c
drivers/gpu/drm/nouveau/core/subdev/vm/nv50.c
drivers/gpu/drm/nouveau/core/subdev/vm/nvc0.c
drivers/gpu/drm/nouveau/nouveau_chan.c
drivers/gpu/drm/nouveau/nouveau_dp.c
drivers/gpu/drm/nouveau/nouveau_drm.c
drivers/gpu/drm/nouveau/nouveau_irq.c
drivers/gpu/drm/nouveau/nouveau_mem.c
drivers/gpu/drm/nouveau/nouveau_ttm.c
drivers/gpu/drm/nouveau/nouveau_vga.c

index 715fd318f2349c23b8929b182e6e84e9cedbfe98..1f34549aff18748758d4d72feed0eba5800734ab 100644 (file)
@@ -139,7 +139,7 @@ struct nouveau_gpuobj_class {
        u32 flags;
 };
 
-int
+static int
 _nouveau_gpuobj_ctor(struct nouveau_object *parent,
                     struct nouveau_object *engine,
                     struct nouveau_oclass *oclass, void *data, u32 size,
index f37598e3f5aa4e6742ac077a50607a077990d663..0daab62ea14c68a13f9fa1e58b681f4d39d760e0 100644 (file)
@@ -61,7 +61,7 @@ nouveau_object_create_(struct nouveau_object *parent,
        return 0;
 }
 
-int
+static int
 _nouveau_object_ctor(struct nouveau_object *parent,
                     struct nouveau_object *engine,
                     struct nouveau_oclass *oclass, void *data, u32 size,
@@ -91,7 +91,7 @@ nouveau_object_destroy(struct nouveau_object *object)
        kfree(object);
 }
 
-void
+static void
 _nouveau_object_dtor(struct nouveau_object *object)
 {
        nouveau_object_destroy(object);
@@ -103,7 +103,7 @@ nouveau_object_init(struct nouveau_object *object)
        return 0;
 }
 
-int
+static int
 _nouveau_object_init(struct nouveau_object *object)
 {
        return nouveau_object_init(object);
@@ -115,7 +115,7 @@ nouveau_object_fini(struct nouveau_object *object, bool suspend)
        return 0;
 }
 
-int
+static int
 _nouveau_object_fini(struct nouveau_object *object, bool suspend)
 {
        return nouveau_object_fini(object, suspend);
index 1b53ebb57af3600102b19d14b412d70e6860b1c6..62a432ea39e5b2d6b8cadfddee26cb39e7bc94e1 100644 (file)
@@ -22,7 +22,7 @@
  * Authors: Ben Skeggs
  */
 
-#include <core/os.h>
+#include <core/option.h>
 #include <core/debug.h>
 
 /* compares unterminated string 'str' with zero-terminated string 'cmp' */
index 37d6de3c9d618c653e1663f8692de48a6ff7176f..c92520f3ed46f2c11d49de137ae366ddb4e0fc8c 100644 (file)
@@ -1,4 +1,4 @@
-u32 nva3_pcopy_data[] = {
+static u32 nva3_pcopy_data[] = {
 /* 0x0000: ctx_object */
        0x00000000,
 /* 0x0004: ctx_dma */
@@ -183,7 +183,7 @@ u32 nva3_pcopy_data[] = {
        0x00000800,
 };
 
-u32 nva3_pcopy_code[] = {
+static u32 nva3_pcopy_code[] = {
 /* 0x0000: main */
        0x04fe04bd,
        0x3517f000,
index cd879f31bb38b595a18269b475717d7e70e2cd7b..0d98c6c0958d5f9853a428d242d934ccd3b162ca 100644 (file)
@@ -1,4 +1,4 @@
-u32 nvc0_pcopy_data[] = {
+static u32 nvc0_pcopy_data[] = {
 /* 0x0000: ctx_object */
        0x00000000,
 /* 0x0004: ctx_query_address_high */
@@ -171,7 +171,7 @@ u32 nvc0_pcopy_data[] = {
        0x00000800,
 };
 
-u32 nvc0_pcopy_code[] = {
+static u32 nvc0_pcopy_code[] = {
 /* 0x0000: main */
        0x04fe04bd,
        0x3517f000,
index 38676c74e6e04873e071f34a8e4863366e42bdf8..09962e4210e9e617033aceedad79542528f52d9f 100644 (file)
@@ -1,4 +1,4 @@
-uint32_t nv98_pcrypt_data[] = {
+static uint32_t nv98_pcrypt_data[] = {
 /* 0x0000: ctx_dma */
 /* 0x0000: ctx_dma_query */
        0x00000000,
@@ -150,7 +150,7 @@ uint32_t nv98_pcrypt_data[] = {
        0x00000000,
 };
 
-uint32_t nv98_pcrypt_code[] = {
+static uint32_t nv98_pcrypt_code[] = {
        0x17f004bd,
        0x0010fe35,
        0xf10004fe,
index cec2110cc53e0287227c79f704f5331ce28af357..5a1c68474597cbc979eb216735941714b1ce4901 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <core/subdev.h>
 #include <core/device.h>
+#include <subdev/vga.h>
 
 u8
 nv_rdport(void *obj, int head, u16 port)
index 2a7c13d55acae88030e755eccd24529d6b27416a..bbb43c67c2ae2ce083f300761aff808b250b8209 100644 (file)
@@ -132,7 +132,7 @@ _nouveau_fifo_channel_wr32(struct nouveau_object *object, u32 addr, u32 data)
        iowrite32_native(data, chan->user + addr);
 }
 
-int
+static int
 nouveau_fifo_chid(struct nouveau_fifo *priv, struct nouveau_object *object)
 {
        int engidx = nv_hclass(priv) & 0xff;
index 55620fbd5c21d23c873f2c0f00117e88e0db4dce..b4fd26d8f166926849c10c4ad9251f2e868dff4f 100644 (file)
@@ -319,7 +319,7 @@ nv84_fifo_sclass[] = {
  * FIFO context - basically just the instmem reserved for the channel
  ******************************************************************************/
 
-int
+static int
 nv84_fifo_context_ctor(struct nouveau_object *parent,
                       struct nouveau_object *engine,
                       struct nouveau_oclass *oclass, void *data, u32 size,
index a988b8ad00acf3b1b138138823e5f59559770f11..826a7b321937a8844de0eaeb83c699befa7b0b41 100644 (file)
@@ -1,4 +1,4 @@
-uint32_t nvc0_grgpc_data[] = {
+static uint32_t nvc0_grgpc_data[] = {
        0x00000000,
        0x00000000,
        0x00000000,
@@ -150,7 +150,7 @@ uint32_t nvc0_grgpc_data[] = {
        0x08000750,
 };
 
-uint32_t nvc0_grgpc_code[] = {
+static uint32_t nvc0_grgpc_code[] = {
        0x03060ef5,
        0x9800d898,
        0x86f001d9,
index c5ed307abeb9ca80ec9b366fc0f7da1ae323464c..db0c0ee5496d57a7ca04a07c21756dc951a58945 100644 (file)
@@ -1,4 +1,4 @@
-uint32_t nvc0_grhub_data[] = {
+static uint32_t nvc0_grhub_data[] = {
        0x00000000,
        0x00000000,
        0x00000000,
@@ -194,7 +194,7 @@ uint32_t nvc0_grhub_data[] = {
        0x00000000,
 };
 
-uint32_t nvc0_grhub_code[] = {
+static uint32_t nvc0_grhub_code[] = {
        0x03090ef5,
        0x9800d898,
        0x86f001d9,
index 5690fe37d6601b061c529b3854a995360d4f6dd6..8d0021049ec09eeaf139b7797736965f52f8a7f2 100644 (file)
@@ -75,7 +75,7 @@ nv40_graph_object_ctor(struct nouveau_object *parent,
        return 0;
 }
 
-struct nouveau_ofuncs
+static struct nouveau_ofuncs
 nv40_graph_ofuncs = {
        .ctor = nv40_graph_object_ctor,
        .dtor = _nouveau_gpuobj_dtor,
index 7d30d0287ab20a9c06eda54e883e628b852479c8..ab3b9dcaf478490a8d735bc17143beb2af4c9176 100644 (file)
@@ -73,7 +73,7 @@ nv50_graph_object_ctor(struct nouveau_object *parent,
        return 0;
 }
 
-struct nouveau_ofuncs
+static struct nouveau_ofuncs
 nv50_graph_ofuncs = {
        .ctor = nv50_graph_object_ctor,
        .dtor = _nouveau_gpuobj_dtor,
index 9adcefc275fb3bc42fbd49a1272ab5e6276a1cba..1f394a2629e74846f60065111eaa7878de245b1e 100644 (file)
@@ -109,7 +109,7 @@ nv31_mpeg_mthd_dma(struct nouveau_object *object, u32 mthd, void *arg, u32 len)
        return 0;
 }
 
-struct nouveau_ofuncs
+static struct nouveau_ofuncs
 nv31_mpeg_ofuncs = {
        .ctor = nv31_mpeg_object_ctor,
        .dtor = _nouveau_gpuobj_dtor,
@@ -119,7 +119,7 @@ nv31_mpeg_ofuncs = {
        .wr32 = _nouveau_gpuobj_wr32,
 };
 
-struct nouveau_omthds
+static struct nouveau_omthds
 nv31_mpeg_omthds[] = {
        { 0x0190, nv31_mpeg_mthd_dma },
        { 0x01a0, nv31_mpeg_mthd_dma },
index ac4026cd315fdf05ae80a6a135a777d0a6b17975..5ac010efd959651d873bc6d186b2dc06dc496968 100644 (file)
@@ -26,6 +26,7 @@
 
 #include <subdev/bios.h>
 #include <subdev/bios/dcb.h>
+#include <subdev/bios/conn.h>
 
 u16
 dcb_conntab(struct nouveau_bios *bios, u8 *ver, u8 *hdr, u8 *cnt, u8 *len)
index 684f39678bf7514aa95cb6690bcbf2dc8ca3918c..93e3ddf7303a17efec9e70d95303f5906e847bad 100644 (file)
@@ -210,7 +210,7 @@ mxm_shadow_wmi(struct nouveau_mxm *mxm, u8 version)
 }
 #endif
 
-struct mxm_shadow_h {
+static struct mxm_shadow_h {
        const char *name;
        bool (*exec)(struct nouveau_mxm *, u8 version);
 } _mxm_shadow[] = {
index 0f0d3a5de5c2c5912ae551826a7350a3e4c4a60d..d83489c44c3af392c74f0d1912f811b9466ffb99 100644 (file)
@@ -34,7 +34,7 @@ struct nv50_vmmgr_priv {
        spinlock_t lock;
 };
 
-void
+static void
 nv50_vm_map_pgt(struct nouveau_gpuobj *pgd, u32 pde,
                struct nouveau_gpuobj *pgt[2])
 {
@@ -76,7 +76,7 @@ vm_addr(struct nouveau_vma *vma, u64 phys, u32 memtype, u32 target)
        return phys;
 }
 
-void
+static void
 nv50_vm_map(struct nouveau_vma *vma, struct nouveau_gpuobj *pgt,
            struct nouveau_mem *mem, u32 pte, u32 cnt, u64 phys, u64 delta)
 {
@@ -123,7 +123,7 @@ nv50_vm_map(struct nouveau_vma *vma, struct nouveau_gpuobj *pgt,
        }
 }
 
-void
+static void
 nv50_vm_map_sg(struct nouveau_vma *vma, struct nouveau_gpuobj *pgt,
               struct nouveau_mem *mem, u32 pte, u32 cnt, dma_addr_t *list)
 {
@@ -137,7 +137,7 @@ nv50_vm_map_sg(struct nouveau_vma *vma, struct nouveau_gpuobj *pgt,
        }
 }
 
-void
+static void
 nv50_vm_unmap(struct nouveau_gpuobj *pgt, u32 pte, u32 cnt)
 {
        pte <<= 3;
@@ -148,7 +148,7 @@ nv50_vm_unmap(struct nouveau_gpuobj *pgt, u32 pte, u32 cnt)
        }
 }
 
-void
+static void
 nv50_vm_flush(struct nouveau_vm *vm)
 {
        struct nouveau_engine *engine;
index e48ece2975115c6512b15e6738ab1517c6c7b17a..44721a4714d1456227347ecd14a6e63658282577 100644 (file)
@@ -34,7 +34,7 @@ struct nvc0_vmmgr_priv {
        spinlock_t lock;
 };
 
-void
+static void
 nvc0_vm_map_pgt(struct nouveau_gpuobj *pgd, u32 index,
                struct nouveau_gpuobj *pgt[2])
 {
@@ -64,7 +64,7 @@ nvc0_vm_addr(struct nouveau_vma *vma, u64 phys, u32 memtype, u32 target)
        return phys;
 }
 
-void
+static void
 nvc0_vm_map(struct nouveau_vma *vma, struct nouveau_gpuobj *pgt,
            struct nouveau_mem *mem, u32 pte, u32 cnt, u64 phys, u64 delta)
 {
@@ -80,7 +80,7 @@ nvc0_vm_map(struct nouveau_vma *vma, struct nouveau_gpuobj *pgt,
        }
 }
 
-void
+static void
 nvc0_vm_map_sg(struct nouveau_vma *vma, struct nouveau_gpuobj *pgt,
               struct nouveau_mem *mem, u32 pte, u32 cnt, dma_addr_t *list)
 {
@@ -95,7 +95,7 @@ nvc0_vm_map_sg(struct nouveau_vma *vma, struct nouveau_gpuobj *pgt,
        }
 }
 
-void
+static void
 nvc0_vm_unmap(struct nouveau_gpuobj *pgt, u32 pte, u32 cnt)
 {
        pte <<= 3;
@@ -132,7 +132,7 @@ nvc0_vm_flush_engine(struct nouveau_subdev *subdev, u64 addr, int type)
        spin_unlock_irqrestore(&priv->lock, flags);
 }
 
-void
+static void
 nvc0_vm_flush(struct nouveau_vm *vm)
 {
        struct nouveau_vm_pgd *vpgd;
index 55dc51c1b92eb33399c3c793d3c4e10d0ac5f9aa..3b3791453178bbedbd7842314af5b077abb87f8d 100644 (file)
@@ -182,7 +182,7 @@ nouveau_channel_prep(struct nouveau_drm *drm, struct nouveau_cli *cli,
        return 0;
 }
 
-int
+static int
 nouveau_channel_ind(struct nouveau_drm *drm, struct nouveau_cli *cli,
                    u32 parent, u32 handle, u32 engine,
                    struct nouveau_channel **pchan)
index 78e54cb8dfbe2cf56bdfaca971928b657988f97c..e1387bd73d762c70cf54c8f01fda5389fb2dd4d0 100644 (file)
@@ -286,7 +286,7 @@ dp_link_train_fini(struct drm_device *dev, struct dp_state *dp)
        nouveau_bios_run_init_table(dev, script, dp->dcb, dp->crtc);
 }
 
-bool
+static bool
 nouveau_dp_link_train(struct drm_encoder *encoder, u32 datarate,
                      struct dp_train_func *func)
 {
index 4dfc40e3dabedda9bbb8e91049d29c17acf58fca..e26358c791519aa292954cdf3f5601461f202154 100644 (file)
@@ -64,7 +64,7 @@ static int nouveau_noaccel = 0;
 module_param_named(noaccel, nouveau_noaccel, int, 0400);
 
 MODULE_PARM_DESC(modeset, "enable driver");
-int nouveau_modeset = -1;
+static int nouveau_modeset = -1;
 module_param_named(modeset, nouveau_modeset, int, 0400);
 
 static struct drm_driver driver;
@@ -238,7 +238,7 @@ nouveau_drm_probe(struct pci_dev *pdev, const struct pci_device_id *pent)
        return 0;
 }
 
-int
+static int
 nouveau_drm_load(struct drm_device *dev, unsigned long flags)
 {
        struct pci_dev *pdev = dev->pdev;
@@ -352,7 +352,7 @@ fail_device:
        return ret;
 }
 
-int
+static int
 nouveau_drm_unload(struct drm_device *dev)
 {
        struct nouveau_drm *drm = nouveau_drm(dev);
@@ -490,7 +490,7 @@ nouveau_drm_resume(struct pci_dev *pdev)
        return 0;
 }
 
-int
+static int
 nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv)
 {
        struct pci_dev *pdev = dev->pdev;
@@ -519,7 +519,7 @@ nouveau_drm_open(struct drm_device *dev, struct drm_file *fpriv)
        return 0;
 }
 
-void
+static void
 nouveau_drm_preclose(struct drm_device *dev, struct drm_file *fpriv)
 {
        struct nouveau_cli *cli = nouveau_cli(fpriv);
@@ -533,7 +533,7 @@ nouveau_drm_preclose(struct drm_device *dev, struct drm_file *fpriv)
        mutex_unlock(&drm->client.mutex);
 }
 
-void
+static void
 nouveau_drm_postclose(struct drm_device *dev, struct drm_file *fpriv)
 {
        struct nouveau_cli *cli = nouveau_cli(fpriv);
index af0cfe81da69ddb07b7d11c374d1007808a55e61..9ca8afdb5549777c7a2b25e64de9b63f700260bc 100644 (file)
@@ -25,6 +25,7 @@
 #include <subdev/mc.h>
 
 #include "nouveau_drm.h"
+#include "nouveau_irq.h"
 #include "nv50_display.h"
 
 void
index 8f8f421367bcfd56cdaca176c6f6c4cbb12b23d3..7e0ff10a2759cc94d1c6bd91030f2c3451061896 100644 (file)
@@ -248,7 +248,7 @@ nouveau_mem_ddr2_mr(struct drm_device *dev, u32 freq,
        return 0;
 }
 
-uint8_t nv_mem_wr_lut_ddr3[NV_MEM_WR_DDR3_MAX] = {
+static const uint8_t nv_mem_wr_lut_ddr3[NV_MEM_WR_DDR3_MAX] = {
        0, 0, 0, 0, 0, 1, 2, 3, 4, 5, 5, 6, 6, 7, 7, 0, 0};
 
 static int
@@ -297,9 +297,9 @@ nouveau_mem_ddr3_mr(struct drm_device *dev, u32 freq,
        return 0;
 }
 
-uint8_t nv_mem_cl_lut_gddr3[NV_MEM_CL_GDDR3_MAX] = {
+static const uint8_t nv_mem_cl_lut_gddr3[NV_MEM_CL_GDDR3_MAX] = {
        0, 0, 0, 0, 4, 5, 6, 7, 0, 1, 2, 3, 8, 9, 10, 11};
-uint8_t nv_mem_wr_lut_gddr3[NV_MEM_WR_GDDR3_MAX] = {
+static const uint8_t nv_mem_wr_lut_gddr3[NV_MEM_WR_GDDR3_MAX] = {
        0, 0, 0, 0, 0, 2, 3, 8, 9, 10, 11, 0, 0, 1, 1, 0, 3};
 
 static int
index 030e4b84386c67c3e47b391764e1688e6c613852..d2fc121ff861fc1a430f19abffbeb080add02292 100644 (file)
@@ -101,7 +101,7 @@ nouveau_vram_manager_new(struct ttm_mem_type_manager *man,
        return 0;
 }
 
-void
+static void
 nouveau_vram_manager_debug(struct ttm_mem_type_manager *man, const char *prefix)
 {
        struct nouveau_mm *mm = man->priv;
@@ -176,7 +176,7 @@ nouveau_gart_manager_new(struct ttm_mem_type_manager *man,
        return 0;
 }
 
-void
+static void
 nouveau_gart_manager_debug(struct ttm_mem_type_manager *man, const char *prefix)
 {
 }
@@ -248,7 +248,7 @@ nv04_gart_manager_new(struct ttm_mem_type_manager *man,
        return 0;
 }
 
-void
+static void
 nv04_gart_manager_debug(struct ttm_mem_type_manager *man, const char *prefix)
 {
 }
index 9d455444f958fc26f1c73690ecec30db7adefecf..7bf7d131eee0713691717820224046d2a54580da 100644 (file)
@@ -7,6 +7,7 @@
 #include "nouveau_drm.h"
 #include "nouveau_acpi.h"
 #include "nouveau_fbcon.h"
+#include "nouveau_vga.h"
 
 static unsigned int
 nouveau_vga_set_decode(void *priv, bool state)