* [PATCH] drm: fix platform_no_drv_owner.cocci warnings
2016-03-11 15:42 ` Alexey Brodkin
2016-03-11 16:45 ` kbuild test robot
@ 2016-03-11 16:45 ` kbuild test robot
0 siblings, 0 replies; 9+ messages in thread
From: kbuild test robot @ 2016-03-11 16:45 UTC (permalink / raw
To: Alexey Brodkin
Cc: kbuild-all, linux-kernel, linux-snps-arc, Alexey Brodkin,
David Airlie, dri-devel, Jose Abreu
drivers/gpu/drm/arc/arcpgu_drv.c:243:6-11: No need to set .owner here. The core will do it.
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
CC: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
arcpgu_drv.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/gpu/drm/arc/arcpgu_drv.c
+++ b/drivers/gpu/drm/arc/arcpgu_drv.c
@@ -240,7 +240,6 @@ static struct platform_driver arcpgu_pla
.remove = arcpgu_remove,
.driver = {
.name = "arcpgu",
- .owner = THIS_MODULE,
.of_match_table = arcpgu_of_table,
},
};
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] drm: fix platform_no_drv_owner.cocci warnings
@ 2016-03-11 16:45 ` kbuild test robot
0 siblings, 0 replies; 9+ messages in thread
From: kbuild test robot @ 2016-03-11 16:45 UTC (permalink / raw
To: linux-snps-arc
drivers/gpu/drm/arc/arcpgu_drv.c:243:6-11: No need to set .owner here. The core will do it.
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
CC: Alexey Brodkin <Alexey.Brodkin at synopsys.com>
Signed-off-by: Fengguang Wu <fengguang.wu at intel.com>
---
arcpgu_drv.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/gpu/drm/arc/arcpgu_drv.c
+++ b/drivers/gpu/drm/arc/arcpgu_drv.c
@@ -240,7 +240,6 @@ static struct platform_driver arcpgu_pla
.remove = arcpgu_remove,
.driver = {
.name = "arcpgu",
- .owner = THIS_MODULE,
.of_match_table = arcpgu_of_table,
},
};
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] drm: fix platform_no_drv_owner.cocci warnings
@ 2016-03-11 16:45 ` kbuild test robot
0 siblings, 0 replies; 9+ messages in thread
From: kbuild test robot @ 2016-03-11 16:45 UTC (permalink / raw
Cc: Jose Abreu, Alexey Brodkin, linux-kernel, dri-devel, kbuild-all,
linux-snps-arc
drivers/gpu/drm/arc/arcpgu_drv.c:243:6-11: No need to set .owner here. The core will do it.
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
CC: Alexey Brodkin <Alexey.Brodkin@synopsys.com>
Signed-off-by: Fengguang Wu <fengguang.wu@intel.com>
---
arcpgu_drv.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/gpu/drm/arc/arcpgu_drv.c
+++ b/drivers/gpu/drm/arc/arcpgu_drv.c
@@ -240,7 +240,6 @@ static struct platform_driver arcpgu_pla
.remove = arcpgu_remove,
.driver = {
.name = "arcpgu",
- .owner = THIS_MODULE,
.of_match_table = arcpgu_of_table,
},
};
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 9+ messages in thread
* [intel-linux-intel-lts:5.4/yocto 3/3] drivers/gpu/drm/hantro_driver/hantrodec.c:1544:31-32: WARNING: Use ARRAY_SIZE
@ 2020-08-07 5:41 kernel test robot
2020-08-07 5:41 ` [PATCH] drm: fix array_size.cocci warnings kernel test robot
` (4 more replies)
0 siblings, 5 replies; 9+ messages in thread
From: kernel test robot @ 2020-08-07 5:41 UTC (permalink / raw
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1556 bytes --]
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: b8b4b73e4f7bffe85610b37cef411bf55b60fbe4
commit: b8b4b73e4f7bffe85610b37cef411bf55b60fbe4 [3/3] drm: Add Keembay media codec driver
config: x86_64-randconfig-c002-20200805 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
coccinelle warnings: (new ones prefixed by >>)
>> drivers/gpu/drm/hantro_driver/hantrodec.c:1544:31-32: WARNING: Use ARRAY_SIZE
drivers/gpu/drm/hantro_driver/hantrodec.c:1569:26-27: WARNING: Use ARRAY_SIZE
--
>> drivers/gpu/drm/hantro_driver/hx280enc.c:480:35-36: WARNING: Use ARRAY_SIZE
--
>> drivers/gpu/drm/hantro_driver/hantro.c:284:19-26: ERROR: reference preceded by free on line 282
drivers/gpu/drm/hantro_driver/hantro.c:284:35-42: ERROR: reference preceded by free on line 282
--
>> drivers/gpu/drm/hantro_driver/hantro.c:1936:3-8: No need to set .owner here. The core will do it.
--
>> drivers/gpu/drm/hantro_driver/hantro.c:659:32-38: WARNING: Consider using vma_pages helper on vma
drivers/gpu/drm/hantro_driver/hantro.c:413:32-38: WARNING: Consider using vma_pages helper on vma
--
>> drivers/gpu/drm/hantro_driver/hx280enc.c:486:18-25: WARNING: vzalloc should be used for hantroenc_data, instead of vmalloc/memset
Please review and possibly fold the followup patch.
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all(a)lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 26683 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] drm: fix array_size.cocci warnings
2020-08-07 5:41 [intel-linux-intel-lts:5.4/yocto 3/3] drivers/gpu/drm/hantro_driver/hantrodec.c:1544:31-32: WARNING: Use ARRAY_SIZE kernel test robot
@ 2020-08-07 5:41 ` kernel test robot
2020-08-07 5:41 ` kernel test robot
` (3 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2020-08-07 5:41 UTC (permalink / raw
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1485 bytes --]
From: kernel test robot <lkp@intel.com>
drivers/gpu/drm/hantro_driver/hx280enc.c:480:35-36: WARNING: Use ARRAY_SIZE
Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element
Semantic patch information:
This makes an effort to find cases where ARRAY_SIZE can be used such as
where there is a division of sizeof the array by the sizeof its first
element or by any indexed element or the element type. It replaces the
division of the two sizeofs by ARRAY_SIZE.
Generated by: scripts/coccinelle/misc/array_size.cocci
Fixes: b8b4b73e4f7b ("drm: Add Keembay media codec driver")
CC: Murugasen Krishnan, Kuhanh <kuhanh.murugasen.krishnan@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: b8b4b73e4f7bffe85610b37cef411bf55b60fbe4
commit: b8b4b73e4f7bffe85610b37cef411bf55b60fbe4 [3/3] drm: Add Keembay media codec driver
hx280enc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
--- a/drivers/gpu/drm/hantro_driver/hx280enc.c
+++ b/drivers/gpu/drm/hantro_driver/hx280enc.c
@@ -477,7 +477,7 @@ int hantroenc_init(struct platform_devic
total_core_num = 0;
hantroenc_data = NULL;
- total_core_num = sizeof(core_array) / sizeof(CORE_CONFIG);
+ total_core_num = ARRAY_SIZE(core_array);
for (i = 0; i < total_core_num; i++) {
pr_info("hantroenc: module init - core[%d] addr = %lx\n", i,
(size_t)core_array[i].base_addr);
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] drm: fix array_size.cocci warnings
2020-08-07 5:41 [intel-linux-intel-lts:5.4/yocto 3/3] drivers/gpu/drm/hantro_driver/hantrodec.c:1544:31-32: WARNING: Use ARRAY_SIZE kernel test robot
2020-08-07 5:41 ` [PATCH] drm: fix array_size.cocci warnings kernel test robot
@ 2020-08-07 5:41 ` kernel test robot
2020-08-07 5:41 ` [PATCH] drm: fix platform_no_drv_owner.cocci warnings kernel test robot
` (2 subsequent siblings)
4 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2020-08-07 5:41 UTC (permalink / raw
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1612 bytes --]
From: kernel test robot <lkp@intel.com>
drivers/gpu/drm/hantro_driver/hantrodec.c:1544:31-32: WARNING: Use ARRAY_SIZE
drivers/gpu/drm/hantro_driver/hantrodec.c:1569:26-27: WARNING: Use ARRAY_SIZE
Use ARRAY_SIZE instead of dividing sizeof array with sizeof an element
Semantic patch information:
This makes an effort to find cases where ARRAY_SIZE can be used such as
where there is a division of sizeof the array by the sizeof its first
element or by any indexed element or the element type. It replaces the
division of the two sizeofs by ARRAY_SIZE.
Generated by: scripts/coccinelle/misc/array_size.cocci
Fixes: b8b4b73e4f7b ("drm: Add Keembay media codec driver")
CC: Murugasen Krishnan, Kuhanh <kuhanh.murugasen.krishnan@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: b8b4b73e4f7bffe85610b37cef411bf55b60fbe4
commit: b8b4b73e4f7bffe85610b37cef411bf55b60fbe4 [3/3] drm: Add Keembay media codec driver
hantrodec.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/hantro_driver/hantrodec.c
+++ b/drivers/gpu/drm/hantro_driver/hantrodec.c
@@ -1541,7 +1541,7 @@ static int CheckHwId(struct hantrodec_t
{
long hwid;
int i;
- size_t num_hw = sizeof(DecHwId) / sizeof(*DecHwId);
+ size_t num_hw = ARRAY_SIZE(DecHwId);
int found = 0;
@@ -1566,7 +1566,7 @@ static int CheckHwId(struct hantrodec_t
return 0;
}
found = 0;
- num_hw = sizeof(DecHwId) / sizeof(*DecHwId);
+ num_hw = ARRAY_SIZE(DecHwId);
}
}
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] drm: fix platform_no_drv_owner.cocci warnings
2020-08-07 5:41 [intel-linux-intel-lts:5.4/yocto 3/3] drivers/gpu/drm/hantro_driver/hantrodec.c:1544:31-32: WARNING: Use ARRAY_SIZE kernel test robot
2020-08-07 5:41 ` [PATCH] drm: fix array_size.cocci warnings kernel test robot
2020-08-07 5:41 ` kernel test robot
@ 2020-08-07 5:41 ` kernel test robot
2020-08-07 5:41 ` [PATCH] drm: fix zalloc-simple.cocci warnings kernel test robot
2020-08-07 5:41 ` [PATCH] drm: fix vma_pages.cocci warnings kernel test robot
4 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2020-08-07 5:41 UTC (permalink / raw
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1070 bytes --]
From: kernel test robot <lkp@intel.com>
drivers/gpu/drm/hantro_driver/hantro.c:1936:3-8: No need to set .owner here. The core will do it.
Remove .owner field if calls are used which set it automatically
Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci
Fixes: b8b4b73e4f7b ("drm: Add Keembay media codec driver")
CC: Murugasen Krishnan, Kuhanh <kuhanh.murugasen.krishnan@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: b8b4b73e4f7bffe85610b37cef411bf55b60fbe4
commit: b8b4b73e4f7bffe85610b37cef411bf55b60fbe4 [3/3] drm: Add Keembay media codec driver
hantro.c | 1 -
1 file changed, 1 deletion(-)
--- a/drivers/gpu/drm/hantro_driver/hantro.c
+++ b/drivers/gpu/drm/hantro_driver/hantro.c
@@ -1933,7 +1933,6 @@ static struct platform_driver hantro_drm
.remove = hantro_drm_remove,
.driver = {
.name = DRIVER_NAME,
- .owner = THIS_MODULE,
.of_match_table = hantro_of_match,
.pm = &hantro_pm_ops,
},
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] drm: fix zalloc-simple.cocci warnings
2020-08-07 5:41 [intel-linux-intel-lts:5.4/yocto 3/3] drivers/gpu/drm/hantro_driver/hantrodec.c:1544:31-32: WARNING: Use ARRAY_SIZE kernel test robot
` (2 preceding siblings ...)
2020-08-07 5:41 ` [PATCH] drm: fix platform_no_drv_owner.cocci warnings kernel test robot
@ 2020-08-07 5:41 ` kernel test robot
2020-08-07 5:41 ` [PATCH] drm: fix vma_pages.cocci warnings kernel test robot
4 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2020-08-07 5:41 UTC (permalink / raw
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1605 bytes --]
From: kernel test robot <lkp@intel.com>
drivers/gpu/drm/hantro_driver/hx280enc.c:486:18-25: WARNING: vzalloc should be used for hantroenc_data, instead of vmalloc/memset
Use zeroing allocator rather than allocator followed by memset with 0
This considers some simple cases that are common and easy to validate
Note in particular that there are no ...s in the rule, so all of the
matched code has to be contiguous
Generated by: scripts/coccinelle/api/alloc/zalloc-simple.cocci
Fixes: b8b4b73e4f7b ("drm: Add Keembay media codec driver")
CC: Murugasen Krishnan, Kuhanh <kuhanh.murugasen.krishnan@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: b8b4b73e4f7bffe85610b37cef411bf55b60fbe4
commit: b8b4b73e4f7bffe85610b37cef411bf55b60fbe4 [3/3] drm: Add Keembay media codec driver
Please take the patch only if it's a positive warning. Thanks!
hx280enc.c | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
--- a/drivers/gpu/drm/hantro_driver/hx280enc.c
+++ b/drivers/gpu/drm/hantro_driver/hx280enc.c
@@ -483,10 +483,9 @@ int hantroenc_init(struct platform_devic
(size_t)core_array[i].base_addr);
}
- hantroenc_data = vmalloc(sizeof(struct hantroenc_t) * total_core_num);
+ hantroenc_data = vzalloc(sizeof(struct hantroenc_t) * total_core_num);
if (hantroenc_data == NULL)
goto err;
- memset(hantroenc_data, 0, sizeof(struct hantroenc_t)*total_core_num);
for (i = 0; i < total_core_num; i++) {
hantroenc_data[i].core_cfg = core_array[i];
^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] drm: fix vma_pages.cocci warnings
2020-08-07 5:41 [intel-linux-intel-lts:5.4/yocto 3/3] drivers/gpu/drm/hantro_driver/hantrodec.c:1544:31-32: WARNING: Use ARRAY_SIZE kernel test robot
` (3 preceding siblings ...)
2020-08-07 5:41 ` [PATCH] drm: fix zalloc-simple.cocci warnings kernel test robot
@ 2020-08-07 5:41 ` kernel test robot
4 siblings, 0 replies; 9+ messages in thread
From: kernel test robot @ 2020-08-07 5:41 UTC (permalink / raw
To: kbuild-all
[-- Attachment #1: Type: text/plain, Size: 1679 bytes --]
From: kernel test robot <lkp@intel.com>
drivers/gpu/drm/hantro_driver/hantro.c:659:32-38: WARNING: Consider using vma_pages helper on vma
drivers/gpu/drm/hantro_driver/hantro.c:413:32-38: WARNING: Consider using vma_pages helper on vma
Use vma_pages function on vma object instead of explicit computation.
Generated by: scripts/coccinelle/api/vma_pages.cocci
Fixes: b8b4b73e4f7b ("drm: Add Keembay media codec driver")
CC: Murugasen Krishnan, Kuhanh <kuhanh.murugasen.krishnan@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---
tree: https://github.com/intel/linux-intel-lts.git 5.4/yocto
head: b8b4b73e4f7bffe85610b37cef411bf55b60fbe4
commit: b8b4b73e4f7bffe85610b37cef411bf55b60fbe4 [3/3] drm: Add Keembay media codec driver
Please take the patch only if it's a positive warning. Thanks!
hantro.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
--- a/drivers/gpu/drm/hantro_driver/hantro.c
+++ b/drivers/gpu/drm/hantro_driver/hantro.c
@@ -410,7 +410,7 @@ static int hantro_mmap(
struct drm_gem_object *obj = NULL;
struct drm_gem_hantro_object *cma_obj;
struct drm_vma_offset_node *node;
- unsigned long page_num = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
+ unsigned long page_num = vma_pages(vma);
unsigned long address = 0;
int sgtidx = 0;
struct scatterlist *pscatter = NULL;
@@ -656,7 +656,7 @@ static int hantro_gem_prime_mmap(
struct vm_area_struct *vma)
{
struct drm_gem_hantro_object *cma_obj;
- unsigned long page_num = (vma->vm_end - vma->vm_start) >> PAGE_SHIFT;
+ unsigned long page_num = vma_pages(vma);
int ret = 0;
cma_obj = to_drm_gem_hantro_obj(obj);
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-08-07 5:41 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-07 5:41 [intel-linux-intel-lts:5.4/yocto 3/3] drivers/gpu/drm/hantro_driver/hantrodec.c:1544:31-32: WARNING: Use ARRAY_SIZE kernel test robot
2020-08-07 5:41 ` [PATCH] drm: fix array_size.cocci warnings kernel test robot
2020-08-07 5:41 ` kernel test robot
2020-08-07 5:41 ` [PATCH] drm: fix platform_no_drv_owner.cocci warnings kernel test robot
2020-08-07 5:41 ` [PATCH] drm: fix zalloc-simple.cocci warnings kernel test robot
2020-08-07 5:41 ` [PATCH] drm: fix vma_pages.cocci warnings kernel test robot
-- strict thread matches above, loose matches on Subject: below --
2016-03-11 16:45 [PATCH 1/4 v3] drm: Add support of ARC PGU display controller kbuild test robot
2016-03-11 15:42 ` Alexey Brodkin
2016-03-11 16:45 ` [PATCH] drm: fix platform_no_drv_owner.cocci warnings kbuild test robot
2016-03-11 16:45 ` kbuild test robot
2016-03-11 16:45 ` kbuild test robot
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.