staging: media: atomisp: compress return logic
Subsystems (4)
PATCH 1/1 staging: media: atomisp: compress return logic
Simplify function returns by merging assignment and return.
--- drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c | 8 ++------ .../media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c | 7 ++----- 2 files changed, 4 insertions(+), 11 deletions(-)
drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c +2 -6
@@ -519,9 +519,7 @@ int atomisp_runtime_suspend(struct device *dev)if (ret)return ret;pm_qos_update_request (&isp->pm_qos,PM_QOS_DEFAULT_VALUE ); - ret =atomisp_mrfld_power_down (isp); - -return ret; +return atomisp_mrfld_power_down (isp); }int atomisp_runtime_resume (struct device *dev)
@@ -587,9 +585,7 @@ static int atomisp_suspend(struct device *dev)return ret; }pm_qos_update_request (&isp->pm_qos,PM_QOS_DEFAULT_VALUE ); - ret =atomisp_mrfld_power_down (isp); - -return ret; +return atomisp_mrfld_power_down (isp); }static int atomisp_resume (struct device *dev)
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c +2 -5
@@ -440,7 +440,6 @@ enum ia_css_err ia_css_bufq_enqueue_psys_event(enum ia_css_err ia_css_bufq_dequeue_psys_event (uint8_t item[BUFQ_EVENT_SIZE ]) { -enum ia_css_err return_err;int error =0 ;ia_css_queue_t *q;
@@ -457,8 +456,7 @@ enum ia_css_err ia_css_bufq_dequeue_psys_event( } error =ia_css_eventq_recv (q, item); - return_err =ia_css_convert_errno (error); -return return_err; +return ia_css_convert_errno (error); }
@@ -482,8 +480,7 @@ enum ia_css_err ia_css_bufq_dequeue_isys_event( return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE; } error =ia_css_eventq_recv (q, item); - return_err =ia_css_convert_errno (error); -return return_err; +return ia_css_convert_errno (error);#else (void )item;return IA_CSS_ERR_RESOURCE_NOT_AVAILABLE ;
Signature · 1 line
2.11.0
kbuild test robot
build boturl: https://github.com/0day-ci/linux/commits/Arushi-Singhal/staging-media-atomisp-compress-return-logic/20170327-030611 config: x86_64-allmodconfig (attached as .config) compiler: gcc-6 (Debian…
Hi Arushi,
[auto build test ERROR on next-20170323]
[cannot apply to linuxtv-media/master v4.9-rc8 v4.9-rc7 v4.9-rc6 v4.11-rc4]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]
url: https://github.com/0day-ci/linux/commits/Arushi-Singhal/staging-media-atomisp-compress-return-logic/20170327-030611
config: x86_64-allmodconfig (attached as .config)
compiler: gcc-6 (Debian 6.2.0-3) 6.2.0 20160901
reproduce:
# save the attached .config to linux build tree
make ARCH=x86_64 All errors (new ones prefixed by >>):
drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c: In function 'ia_css_bufq_dequeue_isys_event':
>> drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c:467:18: error: unused variable 'return_err' [-Werror=unused-variable]
enum ia_css_err return_err;
^~~~~~~~~~cc1: all warnings being treated as errors
vim +/return_err +467 drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/bufq/src/bufq.c
a49d2536 Alan Cox 2017-02-17 461 }
a49d2536 Alan Cox 2017-02-17 462
a49d2536 Alan Cox 2017-02-17 463 enum ia_css_err ia_css_bufq_dequeue_isys_event(
a49d2536 Alan Cox 2017-02-17 464 uint8_t item[BUFQ_EVENT_SIZE])
a49d2536 Alan Cox 2017-02-17 465 {
a49d2536 Alan Cox 2017-02-17 466 #if !defined(HAS_NO_INPUT_SYSTEM)
a49d2536 Alan Cox 2017-02-17 @467 enum ia_css_err return_err;
a49d2536 Alan Cox 2017-02-17 468 int error = 0;
a49d2536 Alan Cox 2017-02-17 469 ia_css_queue_t *q;a49d2536 Alan Cox 2017-02-17 470
:::::: The code at line 467 was first introduced by commit
:::::: a49d25364dfb9f8a64037488a39ab1f56c5fa419 staging/atomisp: Add support for the Intel IPU v2
:::::: TO: Alan Cox <[email protected]>
:::::: CC: Greg Kroah-Hartman <[email protected]>
---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation