]> git.baikalelectronics.ru Git - kernel.git/commit
atomisp: avoid warning about unused function
authorLinus Torvalds <torvalds@linux-foundation.org>
Thu, 4 Jun 2020 04:22:46 +0000 (21:22 -0700)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 4 Jun 2020 04:22:46 +0000 (21:22 -0700)
commit18c1b47a2b837d6d5ab65dd432f0f8e680010730
treeb5ebf13e62f7b1de87bff7b65b0c7ac9b81b44f9
parent37f7830d8ce718dee8582c58ba98fafb734b38de
atomisp: avoid warning about unused function

The atomisp_mrfld_power() function isn't actually ever called, because
the two call-sites have commented out the use because it breaks on some
platforms.  That results in:

  drivers/staging/media/atomisp/pci/atomisp_v4l2.c:764:12: warning: â€˜atomisp_mrfld_power’ defined but not used [-Wunused-function]
    764 | static int atomisp_mrfld_power(struct atomisp_device *isp, bool enable)
        |            ^~~~~~~~~~~~~~~~~~~

during the build.

Rather than commenting out the use entirely, just disable it
semantically instead (using a "0 &&" construct), leaving the call in
place from a syntax standpoint, and avoiding the warning.

I really don't want my builds to have any warnings that can then hide
real issues.

Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/staging/media/atomisp/pci/atomisp_v4l2.c