- 03 Aug, 2021 1 commit
-
-
Mauro Carvalho Chehab authored
* commit 'c3cdc019': media: atomisp: pci: reposition braces as per coding style media: atomisp: i2c: Remove a superfluous else clause in atomisp-mt9m114.c media: atomisp: Move MIPI_PORT_LANES to the only user media: atomisp: Perform a single memset() for union media: atomisp: pci: fix error return code in atomisp_pci_probe() media: atomisp: pci: Remove unnecessary (void *) cast media: atomisp: pci: Remove checks before kfree/kvfree media: atomisp: Remove unused port_enabled variable media: atomisp: Annotate a couple of definitions with __maybe_unused media: atomisp: Remove unused declarations media: atomisp: remove the repeated declaration media: atomisp: improve error handling in gc2235_detect() media: atomisp: Fix whitespace at the beginning of line media: atomisp: Align block comments media: atomisp: Use sysfs_emit() instead of sprintf() where appropriate media: atomisp: Fix line continuation style issue in sh_css.c media: atomisp: Use kcalloc instead of kzalloc with multiply in sh_css.c media: atomisp: Remove unnecessary parens in sh_css.c media: atomisp: Resolve goto style issue in sh_css.c media: atomisp: fix the uninitialized use and rename "retvalue"
-
- 23 Jul, 2021 20 commits
-
-
Deepak R Varma authored
Misplaced braces makes it difficult to follow the code easily. This also goes against the code style guidelines. This resolved following checkpatch complaints: ERROR: open brace '{' following function definitions go on the next line ERROR: that open brace { should be on the previous line Link: https://lore.kernel.org/linux-media/YIwk3KbVGRPJwKa4@dU2104 [mchehab: dropped a hunk with a merge conflict] Cc: linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, drv@mailo.com # X-LSpam-Score: -7.3 (-------) Signed-off-by:
Deepak R Varma <drv@mailo.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Martiros Shakhzadyan authored
Remove a superfluous clause in mt9m114_s_power() Link: https://lore.kernel.org/linux-media/20210719055216.28508-1-vrzh@vrzh.netSigned-off-by:
Martiros Shakhzadyan <vrzh@vrzh.net> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Andy Shevchenko authored
Move MIPI_PORT_LANES to the only user of it, i.e. pci/runtime/isys/src/rx.c. Link: https://lore.kernel.org/linux-media/20210713152523.19902-4-andriy.shevchenko@linux.intel.comSigned-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Kees Cook authored
There is no need to memset() both dvs_grid_info and dvs_stat_grid_info separately: they are part of the same union. Instead, just zero the union itself. This additionally avoids a false positive (due to a gcc optimization bug[1]) when building with the coming FORTIFY_SOURCE improvements: In function 'fortify_memset_chk', inlined from 'sh_css_pipe_get_grid_info' at drivers/staging/media/atomisp/pci/sh_css.c:5186:3, inlined from 'ia_css_stream_create' at drivers/staging/media/atomisp/pci/sh_css.c:9442:10: ./include/linux/fortify-string.h:199:4: warning: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Wattribute-warning] 199 | __write_overflow_field(); | ^~~~~~~~~~~~~~~~~~~~~~~~ [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101419 Link: https://lore.kernel.org/linux-media/20210711145101.1434065-1-keescook@chromium.orgSigned-off-by:
Kees Cook <keescook@chromium.org> Acked-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Yang Yingliang authored
If init_atomisp_wdts() fails, atomisp_pci_probe() need return error code. Link: https://lore.kernel.org/linux-media/20210617072329.1233662-1-yangyingliang@huawei.comReported-by:
Hulk Robot <hulkci@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Fabio M. De Francesco authored
Removed an unnecessary (void *) cast for an argument passed to kfree(). Link: https://lore.kernel.org/linux-media/20210605020855.1065-3-fmdefrancesco@gmail.comSuggested-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Fabio M. De Francesco authored
Removed checks for pointers != NULL before freeing memory. If kvfree() and kfree() are given NULL pointers no operations are performed, so there is no need for the above-mentioned checks. Coccinelle detected the second of the two unnecessary checks. Link: https://lore.kernel.org/linux-media/20210527193922.25225-1-fmdefrancesco@gmail.comSigned-off-by:
Fabio M. De Francesco <fmdefrancesco@gmail.com> Acked-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Andy Shevchenko authored
Remove unused port_enabled variable in ia_css_isys_rx_configure(). Link: https://lore.kernel.org/linux-media/20210526124322.48915-6-andriy.shevchenko@linux.intel.comSigned-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Andy Shevchenko authored
There are definitions in the header that are not used by all modules inside the driver. Annotate them with __maybe_unused to avoid compiler warnings. Link: https://lore.kernel.org/linux-media/20210526124322.48915-4-andriy.shevchenko@linux.intel.comSigned-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Andy Shevchenko authored
There is a few static declarations that are not used anywhere, remove them. Link: https://lore.kernel.org/linux-media/20210526124322.48915-3-andriy.shevchenko@linux.intel.comSigned-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Shaokun Zhang authored
Function 'ia_css_mmu_invalidate_cache' is declared twice, remove the repeated declaration. Link: https://lore.kernel.org/linux-media/1621922559-1859-1-git-send-email-zhangshaokun@hisilicon.comSigned-off-by:
Shaokun Zhang <zhangshaokun@hisilicon.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Tom Rix authored
Static analysis reports this representative problem atomisp-gc2235.c:867:20: warning: The right operand of '|' is a garbage value id = ((high << 8) | low); ^ ~~~ When gc2235_read_reg() fails, its return val is never written. For gc2235_detect(), high and low are or-ed and compared with GC2235_ID, 0x2235. Initialize both to 0 and skip checking the read returns, it's errors are not passed up, only -ENODEV is. Link: https://lore.kernel.org/linux-media/20210521194805.2078135-1-trix@redhat.comSigned-off-by:
Tom Rix <trix@redhat.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Aniket Bhattacharyea authored
This patch fixes whitespace at the beginning of line by wrapping after the type name and aligning the arguments with the open parenthesis. Identified by checkpatch: WARNING: please, no spaces at the start of a line. Link: https://lore.kernel.org/linux-media/20210524173609.672153-1-aniketmail669@gmail.comSigned-off-by:
Aniket Bhattacharyea <aniketmail669@gmail.com> Acked-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Jiabing Wan authored
Fixing the following checkpatch warning: WARNING: Block comments should align the * on each line Link: https://lore.kernel.org/linux-media/20210518112938.88240-1-wanjiabing@vivo.comSigned-off-by:
Jiabing Wan <kael_w@yeah.net> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Nguyen Dinh Phi authored
sysfs_emit() is preferred over raw sprintf() for sysfs attributes since it knows about the sysfs buffer specifics and has some built-in sanity checks. Link: https://lore.kernel.org/linux-media/20210513034650.252993-1-phind.uet@gmail.comSigned-off-by:
Nguyen Dinh Phi <phind.uet@gmail.com> Acked-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Martiros Shakhzadyan authored
Fix logical continuation style issue and adjacent line splits. Link: https://lore.kernel.org/linux-media/20210508235622.300394-5-vrzh@vrzh.netSigned-off-by:
Martiros Shakhzadyan <vrzh@vrzh.net> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Martiros Shakhzadyan authored
Use kcalloc instead of kzalloc with multiplication. Link: https://lore.kernel.org/linux-media/20210508235622.300394-4-vrzh@vrzh.netSigned-off-by:
Martiros Shakhzadyan <vrzh@vrzh.net> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Martiros Shakhzadyan authored
Remove unnecessary parenthesis. Link: https://lore.kernel.org/linux-media/20210508235622.300394-3-vrzh@vrzh.netSigned-off-by:
Martiros Shakhzadyan <vrzh@vrzh.net> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Martiros Shakhzadyan authored
Change the goto label to lower case. Remove a space in the goto label. Link: https://lore.kernel.org/linux-media/20210508235622.300394-2-vrzh@vrzh.netSigned-off-by:
Martiros Shakhzadyan <vrzh@vrzh.net> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Yizhuo authored
Inside function mt9m114_detect(), variable "retvalue" could be uninitialized if mt9m114_read_reg() returns error, however, it is used in the later if statement, which is potentially unsafe. The local variable "retvalue" is renamed to "model" to avoid confusion. Link: https://lore.kernel.org/linux-media/20210625053858.3862-1-yzhai003@ucr.edu Fixes: ad85094b ("Revert "media: staging: atomisp: Remove driver"") Signed-off-by:
Yizhuo <yzhai003@ucr.edu> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
- 22 Jul, 2021 19 commits
-
-
Deepak R Varma authored
Misplaced braces makes it difficult to follow the code easily. This also goes against the code style guidelines. This resolved following checkpatch complaints: ERROR: open brace '{' following function definitions go on the next line ERROR: that open brace { should be on the previous line Link: https://lore.kernel.org/linux-media/YIwk3KbVGRPJwKa4@dU2104 [mchehab: dropped a hunk with a merge conflict] Cc: linux-media@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, drv@mailo.com # X-LSpam-Score: -7.3 (-------) Signed-off-by:
Deepak R Varma <drv@mailo.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Martiros Shakhzadyan authored
Remove a superfluous clause in mt9m114_s_power() Link: https://lore.kernel.org/linux-media/20210719055216.28508-1-vrzh@vrzh.netSigned-off-by:
Martiros Shakhzadyan <vrzh@vrzh.net> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Andy Shevchenko authored
Move MIPI_PORT_LANES to the only user of it, i.e. pci/runtime/isys/src/rx.c. Link: https://lore.kernel.org/linux-media/20210713152523.19902-4-andriy.shevchenko@linux.intel.comSigned-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Kees Cook authored
There is no need to memset() both dvs_grid_info and dvs_stat_grid_info separately: they are part of the same union. Instead, just zero the union itself. This additionally avoids a false positive (due to a gcc optimization bug[1]) when building with the coming FORTIFY_SOURCE improvements: In function 'fortify_memset_chk', inlined from 'sh_css_pipe_get_grid_info' at drivers/staging/media/atomisp/pci/sh_css.c:5186:3, inlined from 'ia_css_stream_create' at drivers/staging/media/atomisp/pci/sh_css.c:9442:10: ./include/linux/fortify-string.h:199:4: warning: call to '__write_overflow_field' declared with attribute warning: detected write beyond size of field (1st parameter); maybe use struct_group()? [-Wattribute-warning] 199 | __write_overflow_field(); | ^~~~~~~~~~~~~~~~~~~~~~~~ [1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101419 Link: https://lore.kernel.org/linux-media/20210711145101.1434065-1-keescook@chromium.orgSigned-off-by:
Kees Cook <keescook@chromium.org> Acked-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Yang Yingliang authored
If init_atomisp_wdts() fails, atomisp_pci_probe() need return error code. Link: https://lore.kernel.org/linux-media/20210617072329.1233662-1-yangyingliang@huawei.comReported-by:
Hulk Robot <hulkci@huawei.com> Signed-off-by:
Yang Yingliang <yangyingliang@huawei.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Fabio M. De Francesco authored
Removed an unnecessary (void *) cast for an argument passed to kfree(). Link: https://lore.kernel.org/linux-media/20210605020855.1065-3-fmdefrancesco@gmail.comSuggested-by:
Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by:
Fabio M. De Francesco <fmdefrancesco@gmail.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Fabio M. De Francesco authored
Removed checks for pointers != NULL before freeing memory. If kvfree() and kfree() are given NULL pointers no operations are performed, so there is no need for the above-mentioned checks. Coccinelle detected the second of the two unnecessary checks. Link: https://lore.kernel.org/linux-media/20210527193922.25225-1-fmdefrancesco@gmail.comSigned-off-by:
Fabio M. De Francesco <fmdefrancesco@gmail.com> Acked-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Andy Shevchenko authored
Remove unused port_enabled variable in ia_css_isys_rx_configure(). Link: https://lore.kernel.org/linux-media/20210526124322.48915-6-andriy.shevchenko@linux.intel.comSigned-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Andy Shevchenko authored
There are definitions in the header that are not used by all modules inside the driver. Annotate them with __maybe_unused to avoid compiler warnings. Link: https://lore.kernel.org/linux-media/20210526124322.48915-4-andriy.shevchenko@linux.intel.comSigned-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Andy Shevchenko authored
There is a few static declarations that are not used anywhere, remove them. Link: https://lore.kernel.org/linux-media/20210526124322.48915-3-andriy.shevchenko@linux.intel.comSigned-off-by:
Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Shaokun Zhang authored
Function 'ia_css_mmu_invalidate_cache' is declared twice, remove the repeated declaration. Link: https://lore.kernel.org/linux-media/1621922559-1859-1-git-send-email-zhangshaokun@hisilicon.comSigned-off-by:
Shaokun Zhang <zhangshaokun@hisilicon.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Tom Rix authored
Static analysis reports this representative problem atomisp-gc2235.c:867:20: warning: The right operand of '|' is a garbage value id = ((high << 8) | low); ^ ~~~ When gc2235_read_reg() fails, its return val is never written. For gc2235_detect(), high and low are or-ed and compared with GC2235_ID, 0x2235. Initialize both to 0 and skip checking the read returns, it's errors are not passed up, only -ENODEV is. Link: https://lore.kernel.org/linux-media/20210521194805.2078135-1-trix@redhat.comSigned-off-by:
Tom Rix <trix@redhat.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Aniket Bhattacharyea authored
This patch fixes whitespace at the beginning of line by wrapping after the type name and aligning the arguments with the open parenthesis. Identified by checkpatch: WARNING: please, no spaces at the start of a line. Link: https://lore.kernel.org/linux-media/20210524173609.672153-1-aniketmail669@gmail.comSigned-off-by:
Aniket Bhattacharyea <aniketmail669@gmail.com> Acked-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Jiabing Wan authored
Fixing the following checkpatch warning: WARNING: Block comments should align the * on each line Link: https://lore.kernel.org/linux-media/20210518112938.88240-1-wanjiabing@vivo.comSigned-off-by:
Jiabing Wan <kael_w@yeah.net> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Nguyen Dinh Phi authored
sysfs_emit() is preferred over raw sprintf() for sysfs attributes since it knows about the sysfs buffer specifics and has some built-in sanity checks. Link: https://lore.kernel.org/linux-media/20210513034650.252993-1-phind.uet@gmail.comSigned-off-by:
Nguyen Dinh Phi <phind.uet@gmail.com> Acked-by:
Sakari Ailus <sakari.ailus@linux.intel.com> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Martiros Shakhzadyan authored
Fix logical continuation style issue and adjacent line splits. Link: https://lore.kernel.org/linux-media/20210508235622.300394-5-vrzh@vrzh.netSigned-off-by:
Martiros Shakhzadyan <vrzh@vrzh.net> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Martiros Shakhzadyan authored
Use kcalloc instead of kzalloc with multiplication. Link: https://lore.kernel.org/linux-media/20210508235622.300394-4-vrzh@vrzh.netSigned-off-by:
Martiros Shakhzadyan <vrzh@vrzh.net> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Martiros Shakhzadyan authored
Remove unnecessary parenthesis. Link: https://lore.kernel.org/linux-media/20210508235622.300394-3-vrzh@vrzh.netSigned-off-by:
Martiros Shakhzadyan <vrzh@vrzh.net> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-
Martiros Shakhzadyan authored
Change the goto label to lower case. Remove a space in the goto label. Link: https://lore.kernel.org/linux-media/20210508235622.300394-2-vrzh@vrzh.netSigned-off-by:
Martiros Shakhzadyan <vrzh@vrzh.net> Signed-off-by:
Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
-