* [staging:staging-testing 32/135] drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1722:6: warning: Variable 'ret' is reassigned a value before the old one has been used.
@ 2020-07-04 12:12 kernel test robot
0 siblings, 0 replies; 2+ messages in thread
From: kernel test robot @ 2020-07-04 12:12 UTC (permalink / raw)
To: Jacopo Mondi
Cc: devel, Greg Kroah-Hartman, kbuild-all, Nicolas Saenz Julienne
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
head: 14442181d20490945f341644bb8257e334b01447
commit: b18ee53ad297264a79cf4ea566663f20786b6455 [32/135] staging: bcm2835: Break MMAL support out from camera
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1722:6: warning: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment]
ret = destroy_component(instance, component);
^
drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1720:7: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = disable_component(instance, component);
^
drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1722:6: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = destroy_component(instance, component);
^
vim +/ret +1722 drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1707
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1708 /*
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1709 * cause a mmal component to be destroyed
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1710 */
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1711 int vchiq_mmal_component_finalise(struct vchiq_mmal_instance *instance,
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1712 struct vchiq_mmal_component *component)
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1713 {
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1714 int ret;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1715
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1716 if (mutex_lock_interruptible(&instance->vchiq_mutex))
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1717 return -EINTR;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1718
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1719 if (component->enabled)
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1720 ret = disable_component(instance, component);
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1721
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 @1722 ret = destroy_component(instance, component);
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1723
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1724 mutex_unlock(&instance->vchiq_mutex);
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1725
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1726 return ret;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1727 }
b18ee53ad29726 drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c Jacopo Mondi 2020-06-23 1728 EXPORT_SYMBOL_GPL(vchiq_mmal_component_finalise);
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1729
:::::: The code at line 1722 was first introduced by commit
:::::: 7b3ad5abf027b7643b38c4006d7f4ce47a86dd3a staging: Import the BCM2835 MMAL-based V4L2 camera driver.
:::::: TO: Eric Anholt <eric@anholt.net>
:::::: CC: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
* [staging:staging-testing 32/135] drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1722:6: warning: Variable 'ret' is reassigned a value before the old one has been used.
@ 2020-07-07 14:27 Dan Carpenter
0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2020-07-07 14:27 UTC (permalink / raw)
To: Jacopo Mondi
Cc: devel, Greg Kroah-Hartman, kbuild-all, Nicolas Saenz Julienne
tree: https://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git staging-testing
head: 14442181d20490945f341644bb8257e334b01447
commit: b18ee53ad297264a79cf4ea566663f20786b6455 [32/135] staging: bcm2835: Break MMAL support out from camera
compiler: gcc-9 (Debian 9.3.0-14) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1722:6: warning: Variable 'ret' is reassigned a value before the old one has been used. [redundantAssignment]
ret = destroy_component(instance, component);
^
drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1720:7: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = disable_component(instance, component);
^
drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1722:6: note: Variable 'ret' is reassigned a value before the old one has been used.
ret = destroy_component(instance, component);
^
vim +/ret +1722 drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1711 int vchiq_mmal_component_finalise(struct vchiq_mmal_instance *instance,
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1712 struct vchiq_mmal_component *component)
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1713 {
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1714 int ret;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1715
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1716 if (mutex_lock_interruptible(&instance->vchiq_mutex))
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1717 return -EINTR;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1718
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1719 if (component->enabled)
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1720 ret = disable_component(instance, component);
^^^^^^
Not used.
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1721
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 @1722 ret = destroy_component(instance, component);
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1723
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1724 mutex_unlock(&instance->vchiq_mutex);
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1725
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1726 return ret;
7b3ad5abf027b7 drivers/staging/media/platform/bcm2835/mmal-vchiq.c Eric Anholt 2017-01-27 1727 }
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
_______________________________________________
devel mailing list
devel@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2020-07-07 14:27 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-07-04 12:12 [staging:staging-testing 32/135] drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c:1722:6: warning: Variable 'ret' is reassigned a value before the old one has been used kernel test robot
2020-07-07 14:27 Dan Carpenter
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).