Files
linux-nv-oot/drivers/platform/tegra
Jon Hunter 53584a0920 platform: tegra: rtcpu: Fix mixed declarations and code
The RTCPU driver fails to build with the compiler option
'-Werror=declaration-after-statement' and the following errors are
observed ...

 drivers/platform/tegra/rtcpu/camera-diagnostics.c:900:17: error: ISO
  C90 forbids mixed declarations and code
  [-Werror=declaration-after-statement]
  900 |                 unsigned long end_time = 0U;
      |                 ^~~~~~~~

 drivers/platform/tegra/rtcpu/camera-diagnostics.c:904:17: error: ISO
  C90 forbids mixed declarations and code
  [-Werror=declaration-after-statement]
  904 |  bool all_tests_pass = (status.executed > 0 &&
                                status.passed == status.executed);
      |  ^~~~

Fix this by declaring the necssary variables at the beginning of the
functions.

Jira CAMERASW-32042
Jira CAMERASW-32960

Change-Id: I6bc652b19f77f0a9bbbe3263cdff371acbc957d7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3334920
Reviewed-by: Zhiyuan Wang <zhiwang@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: Mohit Ingale <mohiti@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2025-07-24 10:19:18 +00:00
..
2025-07-24 10:19:12 +00:00