[tegra-drm:drm/tegra/for-next 27/35] drivers/gpu/host1x/job.c:103:33: error: 'struct host1x_job' has no member named 'num_cmdbufs'
kbuild test robot
lkp at intel.com
Thu May 17 19:22:06 UTC 2018
tree: git://anongit.freedesktop.org/tegra/linux.git drm/tegra/for-next
head: b9136bd01841a63b7706db69e1da8843c8622a9f
commit: c8d8568a8dbb4dc455ceaca7b95108d85b3d4798 [27/35] gpu: host1x: Use not explicitly sized types
config: arm64-defconfig (attached as .config)
compiler: aarch64-linux-gnu-gcc (Debian 7.2.0-11) 7.2.0
reproduce:
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
git checkout c8d8568a8dbb4dc455ceaca7b95108d85b3d4798
# save the attached .config to linux build tree
make.cross ARCH=arm64
All errors (new ones prefixed by >>):
In file included from arch/arm64/include/asm/bug.h:37:0,
from include/linux/bug.h:5,
from arch/arm64/include/asm/ptrace.h:86,
from arch/arm64/include/asm/fpsimd.h:19,
from arch/arm64/include/asm/cpufeature.h:14,
from arch/arm64/include/asm/processor.h:42,
from include/linux/mutex.h:19,
from include/linux/kernfs.h:13,
from include/linux/sysfs.h:16,
from include/linux/kobject.h:20,
from include/linux/device.h:16,
from include/linux/dma-mapping.h:7,
from drivers/gpu/host1x/job.c:19:
drivers/gpu/host1x/job.c: In function 'host1x_job_add_gather':
>> drivers/gpu/host1x/job.c:103:33: error: 'struct host1x_job' has no member named 'num_cmdbufs'
WARN_ON(job->num_gathers >= job->num_cmdbufs);
^
include/asm-generic/bug.h:112:25: note: in definition of macro 'WARN_ON'
int __ret_warn_on = !!(condition); \
^~~~~~~~~
vim +103 drivers/gpu/host1x/job.c
> 19 #include <linux/dma-mapping.h>
20 #include <linux/err.h>
21 #include <linux/host1x.h>
22 #include <linux/kref.h>
23 #include <linux/module.h>
24 #include <linux/scatterlist.h>
25 #include <linux/slab.h>
26 #include <linux/vmalloc.h>
27 #include <trace/events/host1x.h>
28
29 #include "channel.h"
30 #include "dev.h"
31 #include "job.h"
32 #include "syncpt.h"
33
34 #define HOST1X_WAIT_SYNCPT_OFFSET 0x8
35
36 struct host1x_job *host1x_job_alloc(struct host1x_channel *ch,
37 u32 num_cmdbufs, u32 num_relocs)
38 {
39 struct host1x_job *job = NULL;
40 unsigned int num_unpins = num_cmdbufs + num_relocs;
41 u64 total;
42 void *mem;
43
44 /* Check that we're not going to overflow */
45 total = sizeof(struct host1x_job) +
46 (u64)num_relocs * sizeof(struct host1x_reloc) +
47 (u64)num_unpins * sizeof(struct host1x_job_unpin_data) +
48 (u64)num_cmdbufs * sizeof(struct host1x_job_gather) +
49 (u64)num_unpins * sizeof(dma_addr_t) +
50 (u64)num_unpins * sizeof(u32 *);
51 if (total > ULONG_MAX)
52 return NULL;
53
54 mem = job = kzalloc(total, GFP_KERNEL);
55 if (!job)
56 return NULL;
57
58 kref_init(&job->ref);
59 job->channel = ch;
60
61 /* Redistribute memory to the structs */
62 mem += sizeof(struct host1x_job);
63 job->relocs = num_relocs ? mem : NULL;
64 mem += num_relocs * sizeof(struct host1x_reloc);
65 job->unpins = num_unpins ? mem : NULL;
66 mem += num_unpins * sizeof(struct host1x_job_unpin_data);
67 job->gathers = num_cmdbufs ? mem : NULL;
68 mem += num_cmdbufs * sizeof(struct host1x_job_gather);
69 job->addr_phys = num_unpins ? mem : NULL;
70
71 job->reloc_addr_phys = job->addr_phys;
72 job->gather_addr_phys = &job->addr_phys[num_relocs];
73
74 return job;
75 }
76 EXPORT_SYMBOL(host1x_job_alloc);
77
78 struct host1x_job *host1x_job_get(struct host1x_job *job)
79 {
80 kref_get(&job->ref);
81 return job;
82 }
83 EXPORT_SYMBOL(host1x_job_get);
84
85 static void job_free(struct kref *ref)
86 {
87 struct host1x_job *job = container_of(ref, struct host1x_job, ref);
88
89 kfree(job);
90 }
91
92 void host1x_job_put(struct host1x_job *job)
93 {
94 kref_put(&job->ref, job_free);
95 }
96 EXPORT_SYMBOL(host1x_job_put);
97
98 void host1x_job_add_gather(struct host1x_job *job, struct host1x_bo *bo,
99 unsigned int words, unsigned int offset)
100 {
101 struct host1x_job_gather *gather = &job->gathers[job->num_gathers];
102
> 103 WARN_ON(job->num_gathers >= job->num_cmdbufs);
104
105 gather->words = words;
106 gather->bo = bo;
107 gather->offset = offset;
108
109 job->num_gathers++;
110 }
111 EXPORT_SYMBOL(host1x_job_add_gather);
112
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 37446 bytes
Desc: not available
URL: <https://lists.freedesktop.org/archives/dri-devel/attachments/20180518/cc94a553/attachment-0001.gz>
More information about the dri-devel
mailing list