1. 01 Nov, 2017 7 commits
    • Mauro Carvalho Chehab's avatar
      media: atomisp: get rid of wrong stddef.h include · 3708713f
      Mauro Carvalho Chehab authored
      The places at atomisp.h that use stddef.h are wrong: the
      types it needs are actually defined at linux/types.h. Also,
      it causes lots of smatch warnings due to the redefinition of
      ofsetof() macro:
      
      /opt/gcc-7.1.0/x86/lib/gcc/x86_64-pc-linux-gnu/7.1.0/include/stddef.h:417:9: warning: preprocessor token offsetof redefined
      ./include/linux/stddef.h:16:9: this was the original definition
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Acked-by: default avatarSakari Ailus <sakari.ailus@iki.fi>
      3708713f
    • Mauro Carvalho Chehab's avatar
      media: atomisp: fix other inconsistent identing · fb5b78a5
      Mauro Carvalho Chehab authored
      As reported by smatch:
      
      	drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/pipeline/src/pipeline.c:607 pipeline_stage_create() warn: inconsistent indenting
      	drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:255 ov2680_write_reg_array() warn: inconsistent indenting
      	drivers/staging/media/atomisp/i2c/atomisp-ov2680.c:401 __ov2680_set_exposure() warn: inconsistent indenting
      	drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:4269 sh_css_params_write_to_ddr_internal() warn: inconsistent indenting
      	drivers/staging/media/atomisp/pci/atomisp2/atomisp_v4l2.c:1008 atomisp_register_entities() warn: inconsistent indenting
      	drivers/staging/media/atomisp/pci/atomisp2/css2400/runtime/binary/src/binary.c:1709 ia_css_binary_find() warn: inconsistent indenting
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Acked-by: default avatarSakari Ailus <sakari.ailus@iki.fi>
      fb5b78a5
    • Mauro Carvalho Chehab's avatar
      media: atomisp: fix switch coding style at input_system.c · 15b1f47d
      Mauro Carvalho Chehab authored
      Fix a switch at input_system.c that were causing smatch warnings:
      
      drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:610 rx_channel_get_state() warn: inconsistent indenting
      drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:616 rx_channel_get_state() warn: inconsistent indenting
      drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:622 rx_channel_get_state() warn: inconsistent indenting
      drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:610 rx_channel_get_state() warn: inconsistent indenting
      drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:616 rx_channel_get_state() warn: inconsistent indenting
      drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/input_system.c:622 rx_channel_get_state() warn: inconsistent indenting
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Acked-by: default avatarSakari Ailus <sakari.ailus@iki.fi>
      15b1f47d
    • Mauro Carvalho Chehab's avatar
      media: atomisp: fix spatch warnings at sh_css.c · b5eb7ac1
      Mauro Carvalho Chehab authored
      drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:5801:1: error: directive in argument list
      drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:5803:1: error: directive in argument list
      drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:3795 create_host_acc_pipeline() warn: inconsistent indenting
      drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:4343 ia_css_pipe_enqueue_buffer() warn: inconsistent indenting
      drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:6029 sh_css_pipe_configure_viewfinder() warn: inconsistent indenting
      drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:8693 ia_css_stream_capture() warn: inconsistent indenting
      drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:9781 ia_css_stream_create() warn: if statement not indented
      drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:9988 ia_css_stream_load() warn: inconsistent indenting
      drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css.c:10525 ia_css_update_continuous_frames() warn: inconsistent indenting
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Acked-by: default avatarSakari Ailus <sakari.ailus@iki.fi>
      b5eb7ac1
    • Mauro Carvalho Chehab's avatar
      media: atomisp: fix ident for assert/return · 130b31ec
      Mauro Carvalho Chehab authored
      On lots of places, assert/return are starting at the first
      column, causing indentation issues, as complained by spatch:
      
      drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/irq_private.h:32 irq_reg_store() warn: inconsistent indenting
      
      Used this small script to fix such occurrences:
      
      for i in $(git grep -l -E "^(assert|return)" drivers/staging/media/); do perl -ne 's/^(assert|return)\b/\t$1/; print $_' <$i >a && mv a $i; done
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Acked-by: default avatarSakari Ailus <sakari.ailus@iki.fi>
      130b31ec
    • Mauro Carvalho Chehab's avatar
      media: v4l2-fwnode: use a typedef for a function callback · e2cec865
      Mauro Carvalho Chehab authored
      That allows having a kernel-doc markup for the function
      prototype. It also prevents the need of describing the
      return values twice.
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Acked-by: default avatarSakari Ailus <sakari.ailus@iki.fi>
      e2cec865
    • Mauro Carvalho Chehab's avatar
      media: v4l2-fwnode: use the cached value instead of getting again · 1acce5f7
      Mauro Carvalho Chehab authored
      There is a get/put operation in order to get firmware is_available
      data there at the __v4l2_async_notifier_parse_fwnode_endpoints()
      function. However, instead of using it, the code just reads again
      without the lock. That's a bug, as dev_fwnode isn't guaranteed
      to be there once fwnode_handle_put() has been called on it.
      
      This solves this smatch warning:
      
      drivers/media/v4l2-core/v4l2-fwnode.c:453:8: warning: variable 'is_available' set but not used [-Wunused-but-set-variable]
         bool is_available;
              ^~~~~~~~~~~~
      
      Fixes: 9ca46531 ("media: v4l: fwnode: Support generic parsing of graph endpoints in a device")
      Acked-by: default avatarSakari Ailus <sakari.ailus@linux.intel.com>
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      1acce5f7
  2. 31 Oct, 2017 33 commits