summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2018-04-17media: v4l2-fwnode: simplify v4l2_fwnode_reference_parse_int_props()Mauro Carvalho Chehab
The logic at v4l2_fwnode_reference_parse_int_props() is somewhat complex and violates Linux coding style, as it does multiple statements on a single line. That makes static analyzers to be confused, as warned by smatch: drivers/media/v4l2-core/v4l2-fwnode.c:832 v4l2_fwnode_reference_parse_int_props() warn: passing zero to 'PTR_ERR' Simplify the logic, in order to make clearer about what happens when v4l2_fwnode_reference_get_int_prop() returns an error. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: dvb_frontend: fix locking issues at dvb_frontend_get_event()Mauro Carvalho Chehab
As warned by smatch: drivers/media/dvb-core/dvb_frontend.c:314 dvb_frontend_get_event() warn: inconsistent returns 'sem:&fepriv->sem'. Locked on: line 288 line 295 line 306 line 314 Unlocked on: line 303 The lock implementation for get event is wrong, as, if an interrupt occurs, down_interruptible() will fail, and the routine will call up() twice when userspace calls the ioctl again. The bad code is there since when Linux migrated to git, in 2005. Cc: stable@vger.kernel.org Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: staging: atomisp: fix string comparation logicMauro Carvalho Chehab
it makes no sense to use strncmp() with a size with is bigger than the string we're comparing with. Fix those warnings: drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c:776 atomisp_open() error: strncmp() '"ATOMISP ISP ACC"' too small (16 vs 32) drivers/staging/media/atomisp/pci/atomisp2/atomisp_fops.c:913 atomisp_release() error: strncmp() '"ATOMISP ISP ACC"' too small (16 vs 32) drivers/staging/media/atomisp/pci/atomisp2/atomisp_ioctl.c:2751 atomisp_vidioc_default() error: strncmp() '"ATOMISP ISP ACC"' too small (16 vs 32) Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: atomisp: fix __user annotationsMauro Carvalho Chehab
There are lots of troubles with atomisp __user annotations. Fix them. drivers/staging/media/atomisp/pci/atomisp2/atomisp_acc.c:357:49: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/atomisp/pci/atomisp2/atomisp_acc.c:357:49: expected void *userptr drivers/staging/media/atomisp/pci/atomisp2/atomisp_acc.c:357:49: got void [noderef] <asn:1>*user_ptr drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:3302:43: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:3302:43: expected void const [noderef] <asn:1>*from drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:3302:43: got void const *from drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:4070:58: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:4070:58: expected void const *from drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:4070:58: got unsigned short [noderef] <asn:1>*<noident> drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:4082:58: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:4082:58: expected void const *from drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:4082:58: got unsigned short [noderef] <asn:1>*<noident> drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:6179:62: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:6179:62: expected void const [noderef] <asn:1>*from drivers/staging/media/atomisp/pci/atomisp2/atomisp_cmd.c:6179:62: got unsigned short [usertype] *<noident> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: staging: atomisp: don't declare the same vars as both private and publicMauro Carvalho Chehab
The mmu_private.h header is included at mmu.c, with duplicates the already existing definitions at mmu_public.h. Fix this by removing the erroneous header file. Solve those issues: drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/mmu_private.h:24:26: warning: function 'mmu_reg_store' with external linkage has definition drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/mmu_private.h:35:30: warning: function 'mmu_reg_load' with external linkage has definition drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/mmu_private.h:24:26: warning: function 'mmu_reg_store' with external linkage has definition drivers/staging/media/atomisp/pci/atomisp2/css2400/hive_isp_css_common/host/mmu_private.h:35:30: warning: function 'mmu_reg_load' with external linkage has definition Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: staging: atomisp: fix number conversionMauro Carvalho Chehab
smatch says that there's an issue with number conversion: drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:4154 sh_css_params_write_to_ddr_internal() warn: '((-(1 << ((14 - 1)))))' 4294959104 can't fit into 32767 'converted_macc_table.data[idx]' drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:4157 sh_css_params_write_to_ddr_internal() warn: '((-(1 << ((14 - 1)))))' 4294959104 can't fit into 32767 'converted_macc_table.data[idx + 1]' drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:4160 sh_css_params_write_to_ddr_internal() warn: '((-(1 << ((14 - 1)))))' 4294959104 can't fit into 32767 'converted_macc_table.data[idx + 2]' drivers/staging/media/atomisp/pci/atomisp2/css2400/sh_css_params.c:4163 sh_css_params_write_to_ddr_internal() warn: '((-(1 << ((14 - 1)))))' 4294959104 can't fit into 32767 'converted_macc_table.data[idx + 3]' drivers/staging/media/atomisp/pci/atomisp2/css2400/isp/kernels/eed1_8/ia_css_eed1_8.host.c:168 ia_css_eed1_8_vmem_encode() warn: assigning (-8192) to unsigned variable 'to->e_dew_enh_a[0][base + j]' That's probably because min() and max() definition used there are really poor ones. So, replace by the in-kernel macro. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: omap_vout: fix wrong identingMauro Carvalho Chehab
As warned: drivers/media/platform/omap/omap_vout.c:711 omap_vout_buffer_setup() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: fsl-viu: fix __iomem annotationsMauro Carvalho Chehab
Those annotations are wrong, causing this warning: drivers/media/platform/fsl-viu.c:1440:21: warning: incorrect type in assignment (different address spaces) drivers/media/platform/fsl-viu.c:1440:21: expected struct viu_reg *vr drivers/media/platform/fsl-viu.c:1440:21: got struct viu_reg [noderef] <asn:2>*[assigned] viu_regs Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: fsl-viu: use %p to print pointersMauro Carvalho Chehab
Solve those warnings: drivers/media/platform/fsl-viu.c:299 restart_video_queue() warn: argument 3 to %08lx specifier is cast from pointer drivers/media/platform/fsl-viu.c:506 buffer_queue() warn: argument 2 to %08lx specifier is cast from pointer drivers/media/platform/fsl-viu.c:518 buffer_queue() warn: argument 2 to %08lx specifier is cast from pointer drivers/media/platform/fsl-viu.c:528 buffer_queue() warn: argument 2 to %08lx specifier is cast from pointer drivers/media/platform/fsl-viu.c:1219 viu_open() warn: argument 2 to %08lx specifier is cast from pointer drivers/media/platform/fsl-viu.c:1219 viu_open() warn: argument 3 to %08lx specifier is cast from pointer drivers/media/platform/fsl-viu.c:1219 viu_open() warn: argument 4 to %08lx specifier is cast from pointer drivers/media/platform/fsl-viu.c:1329 viu_mmap() warn: argument 2 to %08lx specifier is cast from pointer drivers/media/platform/fsl-viu.c:1334 viu_mmap() warn: argument 2 to %08lx specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: isppreview: fix __user annotationsMauro Carvalho Chehab
The 'from' variable at preview_config() expects an __user * type. However, the logic there does: from = *(void * __user *) ((void *)cfg + attr->config_offset); With actually means a void pointer, pointing to a void __ user pointer. When the first pointer is de-referenced with *(foo), the type it returns is "void *" instead of "void __user *". Change it to: from = *(void __user **) ((void *)cfg + attr->config_offset); in order to obtain, when de-referenced, a void __user pointer, as desired. That prevent those warnings: drivers/media/platform/omap3isp/isppreview.c:893:45: warning: incorrect type in initializer (different address spaces) drivers/media/platform/omap3isp/isppreview.c:893:45: expected void [noderef] <asn:1>*from drivers/media/platform/omap3isp/isppreview.c:893:45: got void *[noderef] <asn:1><noident> drivers/media/platform/omap3isp/isppreview.c:893:47: warning: dereference of noderef expression Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: ispstat: use %p to print the address of a bufferMauro Carvalho Chehab
Instead of converting to int, use %p. That prevents this warning: drivers/media/platform/omap3isp/ispstat.c:451 isp_stat_bufs_alloc() warn: argument 7 to %08lx specifier is cast from pointer Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: vpbe_display: get rid of warningsMauro Carvalho Chehab
Solve those warnings: drivers/media/platform/davinci/vpbe_display.c:288 vpbe_start_streaming() warn: inconsistent indenting drivers/media/platform/davinci/vpbe_display.c:1356 register_device() warn: argument 3 to %x specifier is cast from pointer drivers/media/platform/davinci/vpbe_display.c:1356 register_device() warn: argument 4 to %x specifier is cast from pointer Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: vpbe_display: properly handle error caseMauro Carvalho Chehab
if v4l2_subdev_call(..., VENC_GET_FLD,...) fails, it currently returns a random value. Instead, return 1. That's probably better than returning 0, as this is very likely what happens in practice with the current code, as as the probably of an unititialized 32 bits integer to have an specific value (0, in this case), is 1/(2^32). An alternative would be to return an error code, and let the caller to hint, based on the past received frame, but that sounds weird. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: mmp-driver: add needed __iomem marks to power_regsMauro Carvalho Chehab
Solve those warnings: drivers/media/platform/marvell-ccic/mmp-driver.c:135:41: warning: incorrect type in argument 2 (different address spaces) drivers/media/platform/marvell-ccic/mmp-driver.c:135:41: expected void [noderef] <asn:2>*<noident> drivers/media/platform/marvell-ccic/mmp-driver.c:135:41: got void * drivers/media/platform/marvell-ccic/mmp-driver.c:136:44: warning: incorrect type in argument 2 (different address spaces) drivers/media/platform/marvell-ccic/mmp-driver.c:136:44: expected void [noderef] <asn:2>*<noident> drivers/media/platform/marvell-ccic/mmp-driver.c:136:44: got void * drivers/media/platform/marvell-ccic/mmp-driver.c:174:38: warning: incorrect type in argument 2 (different address spaces) drivers/media/platform/marvell-ccic/mmp-driver.c:174:38: expected void [noderef] <asn:2>*<noident> drivers/media/platform/marvell-ccic/mmp-driver.c:174:38: got void * drivers/media/platform/marvell-ccic/mmp-driver.c:175:38: warning: incorrect type in argument 2 (different address spaces) drivers/media/platform/marvell-ccic/mmp-driver.c:175:38: expected void [noderef] <asn:2>*<noident> drivers/media/platform/marvell-ccic/mmp-driver.c:175:38: got void * drivers/media/platform/marvell-ccic/mmp-driver.c:195:48: warning: incorrect type in argument 1 (different address spaces) drivers/media/platform/marvell-ccic/mmp-driver.c:195:48: expected void [noderef] <asn:2>*<noident> drivers/media/platform/marvell-ccic/mmp-driver.c:195:48: got void * drivers/media/platform/marvell-ccic/mmp-driver.c:196:55: warning: incorrect type in argument 2 (different address spaces) drivers/media/platform/marvell-ccic/mmp-driver.c:196:55: expected void [noderef] <asn:2>*<noident> drivers/media/platform/marvell-ccic/mmp-driver.c:196:55: got void * drivers/media/platform/marvell-ccic/mmp-driver.c:197:54: warning: incorrect type in argument 2 (different address spaces) drivers/media/platform/marvell-ccic/mmp-driver.c:197:54: expected void [noderef] <asn:2>*<noident> drivers/media/platform/marvell-ccic/mmp-driver.c:197:54: got void * drivers/media/platform/marvell-ccic/mmp-driver.c:202:48: warning: incorrect type in argument 1 (different address spaces) drivers/media/platform/marvell-ccic/mmp-driver.c:202:48: expected void [noderef] <asn:2>*<noident> drivers/media/platform/marvell-ccic/mmp-driver.c:202:48: got void * drivers/media/platform/marvell-ccic/mmp-driver.c:203:55: warning: incorrect type in argument 2 (different address spaces) drivers/media/platform/marvell-ccic/mmp-driver.c:203:55: expected void [noderef] <asn:2>*<noident> drivers/media/platform/marvell-ccic/mmp-driver.c:203:55: got void * drivers/media/platform/marvell-ccic/mmp-driver.c:204:54: warning: incorrect type in argument 2 (different address spaces) drivers/media/platform/marvell-ccic/mmp-driver.c:204:54: expected void [noderef] <asn:2>*<noident> drivers/media/platform/marvell-ccic/mmp-driver.c:204:54: got void * drivers/media/platform/marvell-ccic/mmp-driver.c:389:25: warning: incorrect type in assignment (different address spaces) drivers/media/platform/marvell-ccic/mmp-driver.c:389:25: expected void *power_regs drivers/media/platform/marvell-ccic/mmp-driver.c:389:25: got void [noderef] <asn:2>* Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: davinci: fix an inconsistent identMauro Carvalho Chehab
drivers/media/platform/davinci/vpbe_osd.c:849 try_layer_config() warn: inconsistent indenting Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: isif: reorder a statement to match coding styleMauro Carvalho Chehab
On all places, we do: void <asn_ref> *foo; Here, it is doing, instead: void * <asn_ref> foo; That tricks static analyzers, making it see errors where there's none. So, just reorder in order to cleanup those warnings: drivers/media/platform/davinci/isif.c:1066:22: warning: incorrect type in assignment (different address spaces) drivers/media/platform/davinci/isif.c:1066:22: expected void *[noderef] <asn:2>addr drivers/media/platform/davinci/isif.c:1066:22: got void [noderef] <asn:2>* drivers/media/platform/davinci/isif.c:1074:44: warning: incorrect type in assignment (different address spaces) drivers/media/platform/davinci/isif.c:1074:44: expected void [noderef] <asn:2>*static [toplevel] [assigned] base_addr drivers/media/platform/davinci/isif.c:1074:44: got void *[noderef] <asn:2>addr drivers/media/platform/davinci/isif.c:1078:51: warning: incorrect type in assignment (different address spaces) drivers/media/platform/davinci/isif.c:1078:51: expected void [noderef] <asn:2>*static [toplevel] [assigned] linear_tbl0_addr drivers/media/platform/davinci/isif.c:1078:51: got void *[noderef] <asn:2>addr drivers/media/platform/davinci/isif.c:1082:51: warning: incorrect type in assignment (different address spaces) drivers/media/platform/davinci/isif.c:1082:51: expected void [noderef] <asn:2>*static [toplevel] [assigned] linear_tbl1_addr drivers/media/platform/davinci/isif.c:1082:51: got void *[noderef] <asn:2>addr drivers/media/platform/davinci/isif.c:1067:22: warning: dereference of noderef expression Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: si470x: fix __be16 annotationsMauro Carvalho Chehab
The annotations there are wrong as warned: drivers/media/radio/si470x/radio-si470x-i2c.c:107:35: warning: cast to restricted __be16 drivers/media/radio/si470x/radio-si470x-i2c.c:107:35: warning: cast to restricted __be16 drivers/media/radio/si470x/radio-si470x-i2c.c:107:35: warning: cast to restricted __be16 drivers/media/radio/si470x/radio-si470x-i2c.c:107:35: warning: cast to restricted __be16 drivers/media/radio/si470x/radio-si470x-i2c.c:129:24: warning: incorrect type in assignment (different base types) drivers/media/radio/si470x/radio-si470x-i2c.c:129:24: expected unsigned short [unsigned] [short] <noident> drivers/media/radio/si470x/radio-si470x-i2c.c:129:24: got restricted __be16 [usertype] <noident> drivers/media/radio/si470x/radio-si470x-i2c.c:163:39: warning: cast to restricted __be16 drivers/media/radio/si470x/radio-si470x-i2c.c:163:39: warning: cast to restricted __be16 drivers/media/radio/si470x/radio-si470x-i2c.c:163:39: warning: cast to restricted __be16 drivers/media/radio/si470x/radio-si470x-i2c.c:163:39: warning: cast to restricted __be16 Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: davinci_vpfe: fix __user annotationsMauro Carvalho Chehab
The __user annotations on this driver are wrong, causing lots of warnings: drivers/staging/media/davinci_vpfe/dm365_ipipe.c:1269:22: warning: incorrect type in assignment (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipe.c:1269:22: expected void [noderef] <asn:1>*from drivers/staging/media/davinci_vpfe/dm365_ipipe.c:1269:22: got void *[noderef] <asn:1><noident> drivers/staging/media/davinci_vpfe/dm365_ipipe.c:1313:20: warning: incorrect type in assignment (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipe.c:1313:20: expected void [noderef] <asn:1>*to drivers/staging/media/davinci_vpfe/dm365_ipipe.c:1313:20: got void *[noderef] <asn:1><noident> drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:424:41: warning: incorrect type in initializer (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:424:41: expected struct ipipeif_params *config drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:424:41: got void [noderef] <asn:1>*arg drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:474:46: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:474:46: expected void [noderef] <asn:1>*arg drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:474:46: got void *arg drivers/staging/media/davinci_vpfe/dm365_resizer.c:922:32: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_resizer.c:922:32: expected void const [noderef] <asn:1>*from drivers/staging/media/davinci_vpfe/dm365_resizer.c:922:32: got struct vpfe_rsz_config_params *config drivers/staging/media/davinci_vpfe/dm365_resizer.c:945:27: warning: incorrect type in argument 1 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_resizer.c:945:27: expected void [noderef] <asn:1>*to drivers/staging/media/davinci_vpfe/dm365_resizer.c:945:27: got void *<noident> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: davinci_vpfe: cleanup ipipe_[g|s]_config logicMauro Carvalho Chehab
Reduce one ident level inside those functions and use BIT() macro. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: davinci_vpfe: fix a typo for "default"Mauro Carvalho Chehab
resizer_set_defualt_configuration -> resizer_set_default_configuration Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: davinci_vpfe: don't use kernel-doc markup for simple commentsMauro Carvalho Chehab
Fix those two warnings: drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c:90: warning: Function parameter or member 'interface' not described in 'MODULE_PARM_DESC' drivers/staging/media/davinci_vpfe/vpfe_mc_capture.c:90: warning: Function parameter or member '(default' not described in 'MODULE_PARM_DESC' Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: davinci_vpfe: vpfe_video: remove an unused varMauro Carvalho Chehab
as warned: drivers/staging/media/davinci_vpfe/vpfe_video.c: In function 'vpfe_streamon': drivers/staging/media/davinci_vpfe/vpfe_video.c:1471:31: warning: variable 'sdinfo' set but not used [-Wunused-but-set-variable] struct vpfe_ext_subdev_info *sdinfo; ^~~~~~ While here, cleanup this kernel-doc warning: drivers/staging/media/davinci_vpfe/vpfe_video.c:225: warning: Function parameter or member 'pipe' not described in 'vpfe_video_validate_pipeline' Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: davinci_vpfe: get rid of an unused var at dm365_isif.cMauro Carvalho Chehab
Not sure what was the original idea here, but the implementation went into a different way, and the fmt var is not used anymore, as warned: drivers/staging/media/davinci_vpfe/dm365_isif.c: In function '__isif_get_format': drivers/staging/media/davinci_vpfe/dm365_isif.c:1401:29: warning: variable 'fmt' set but not used [-Wunused-but-set-variable] struct v4l2_subdev_format fmt; ^~~ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: davinci_vpfe: mark __iomem as suchMauro Carvalho Chehab
There are several usages of an __iomem memory that aren't marked as such, causing those warnings: drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:201:27: warning: incorrect type in assignment (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:201:27: expected void *ipipeif_base_addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:201:27: got void [noderef] <asn:2>*ipipeif_base_addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:71:27: warning: incorrect type in argument 1 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:71:27: expected void const volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:71:27: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:71:27: warning: incorrect type in argument 1 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:71:27: expected void const volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:71:27: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:510:42: warning: incorrect type in initializer (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:510:42: expected void *ipipeif_base_addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:510:42: got void [noderef] <asn:2>*ipipeif_base_addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:71:27: warning: incorrect type in argument 1 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:71:27: expected void const volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:71:27: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:797:42: warning: incorrect type in initializer (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:797:42: expected void *ipipeif_base_addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:797:42: got void [noderef] <asn:2>*ipipeif_base_addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: warning: incorrect type in argument 2 (different address spaces) drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: expected void volatile [noderef] <asn:2>*addr drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:76:26: got void * Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: davinci_vpfe: fix vpfe_ipipe_init() error handlingMauro Carvalho Chehab
As warned: drivers/staging/media/davinci_vpfe/dm365_ipipe.c:1834 vpfe_ipipe_init() error: we previously assumed 'res' could be null (see line 1797) There's something wrong at vpfe_ipipe_init(): 1) it caches the resourse_size() from from the first region and reuses to the second region; 2) the "res" var is overridden 3 times; 3) at free logic, it assumes that "res->start" is not overridden by platform_get_resource(pdev, IORESOURCE_MEM, 6), but that's not true, as it can even be NULL there. This patch fixes the above issues by: a) store the resources used by release_mem_region() on a separate var; b) stop caching resource_size(), using the function where needed. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: dm365_ipipe: remove an unused varMauro Carvalho Chehab
drivers/staging/media/davinci_vpfe/dm365_ipipe.c:74:17: warning: variable 'dev' set but not used [-Wunused-but-set-variable] struct device *dev; ^~~ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: davinci_vpfe: remove useless checks from ipipeMauro Carvalho Chehab
The dm365_ipipe_hw.c and dm365_ipipe.c file check if several table pointers, declared at davinci_vpfe_user.h, are filled before using them. The problem is that those pointers come from struct declarations like: struct vpfe_ipipe_yee { ... short table[VPFE_IPIPE_MAX_SIZE_YEE_LUT]; }; So, they can't be NULL! Solve those warnings: drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c:433 ipipe_set_lutdpc_regs() warn: this array is probably non-NULL. 'dpc->table' drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c:763 ipipe_set_gamma_regs() warn: this array is probably non-NULL. 'gamma->table_r' drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c:766 ipipe_set_gamma_regs() warn: this array is probably non-NULL. 'gamma->table_b' drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c:769 ipipe_set_gamma_regs() warn: this array is probably non-NULL. 'gamma->table_g' drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c:791 ipipe_set_3d_lut_regs() warn: this array is probably non-NULL. 'lut_3d->table' drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c:903 ipipe_set_gbce_regs() warn: this array is probably non-NULL. 'gbce->table' drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.c:946 ipipe_set_ee_regs() warn: this array is probably non-NULL. 'ee->table' drivers/staging/media/davinci_vpfe/dm365_ipipe.c:59 ipipe_validate_lutdpc_params() warn: this array is probably non-NULL. 'lutdpc->table' drivers/staging/media/davinci_vpfe/dm365_ipipe.c:697 ipipe_get_gamma_params() warn: this array is probably non-NULL. 'gamma_param->table_r' drivers/staging/media/davinci_vpfe/dm365_ipipe.c:705 ipipe_get_gamma_params() warn: this array is probably non-NULL. 'gamma_param->table_g' drivers/staging/media/davinci_vpfe/dm365_ipipe.c:712 ipipe_get_gamma_params() warn: this array is probably non-NULL. 'gamma_param->table_b' drivers/staging/media/davinci_vpfe/dm365_ipipe.c:745 ipipe_get_3d_lut_params() warn: this array is probably non-NULL. 'lut_param->table' drivers/staging/media/davinci_vpfe/dm365_ipipe.c:926 ipipe_get_gbce_params() warn: this array is probably non-NULL. 'gbce_param->table' Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: staging: davinci_vpfe: allow building with COMPILE_TESTMauro Carvalho Chehab
This is a little bit hashish, but this driver is at staging, so it won't become worse. With this small change at Makefile, we can now build it with COMPILE_TEST. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: si470x: allow build both USB and I2C at the same timeMauro Carvalho Chehab
Currently, either USB or I2C is built. Change it to allow having both enabled at the same time. The main reason is that COMPILE_TEST all[yes/mod]builds will now contain all drivers under drivers/media. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: omap4iss: make it build with COMPILE_TESTMauro Carvalho Chehab
This driver compile as-is with COMPILE_TEST. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: omap: allow building it with COMPILE_TESTMauro Carvalho Chehab
Now that we have stubs for omap FB driver, let it build with COMPILE_TEST. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: omap2: omapfb: allow building it with COMPILE_TESTMauro Carvalho Chehab
This driver builds cleanly with COMPILE_TEST, and it is needed in order to allow building drivers/media omap2 driver. So, change the logic there to allow building it. Acked-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: davinci: get rid of lots of kernel-doc warningsMauro Carvalho Chehab
Driver build produce lots of warnings due to wrong kernel-doc markups: drivers/media/platform/davinci/vpbe.c:60: warning: Function parameter or member 'vpbe_dev' not described in 'vpbe_current_encoder_info' drivers/media/platform/davinci/vpbe.c:78: warning: Function parameter or member 'cfg' not described in 'vpbe_find_encoder_sd_index' drivers/media/platform/davinci/vpbe.c:78: warning: Function parameter or member 'index' not described in 'vpbe_find_encoder_sd_index' drivers/media/platform/davinci/vpbe.c:105: warning: Function parameter or member 'vpbe_dev' not described in 'vpbe_g_cropcap' drivers/media/platform/davinci/vpbe.c:105: warning: Function parameter or member 'cropcap' not described in 'vpbe_g_cropcap' drivers/media/platform/davinci/vpbe.c:127: warning: Function parameter or member 'vpbe_dev' not described in 'vpbe_enum_outputs' drivers/media/platform/davinci/vpbe.c:127: warning: Function parameter or member 'output' not described in 'vpbe_enum_outputs' drivers/media/platform/davinci/vpbe.c:221: warning: Function parameter or member 'vpbe_dev' not described in 'vpbe_set_output' drivers/media/platform/davinci/vpbe.c:221: warning: Function parameter or member 'index' not described in 'vpbe_set_output' drivers/media/platform/davinci/vpbe.c:316: warning: Function parameter or member 'vpbe_dev' not described in 'vpbe_get_output' drivers/media/platform/davinci/vpbe.c:328: warning: Function parameter or member 'vpbe_dev' not described in 'vpbe_s_dv_timings' drivers/media/platform/davinci/vpbe.c:328: warning: Function parameter or member 'dv_timings' not described in 'vpbe_s_dv_timings' drivers/media/platform/davinci/vpbe.c:380: warning: Function parameter or member 'vpbe_dev' not described in 'vpbe_g_dv_timings' drivers/media/platform/davinci/vpbe.c:380: warning: Function parameter or member 'dv_timings' not described in 'vpbe_g_dv_timings' drivers/media/platform/davinci/vpbe.c:405: warning: Function parameter or member 'vpbe_dev' not described in 'vpbe_enum_dv_timings' drivers/media/platform/davinci/vpbe.c:405: warning: Function parameter or member 'timings' not described in 'vpbe_enum_dv_timings' drivers/media/platform/davinci/vpbe.c:436: warning: Function parameter or member 'vpbe_dev' not described in 'vpbe_s_std' drivers/media/platform/davinci/vpbe.c:436: warning: Function parameter or member 'std_id' not described in 'vpbe_s_std' drivers/media/platform/davinci/vpbe.c:475: warning: Function parameter or member 'vpbe_dev' not described in 'vpbe_g_std' drivers/media/platform/davinci/vpbe.c:475: warning: Function parameter or member 'std_id' not described in 'vpbe_g_std' drivers/media/platform/davinci/vpbe.c:500: warning: Function parameter or member 'vpbe_dev' not described in 'vpbe_set_mode' drivers/media/platform/davinci/vpbe.c:500: warning: Function parameter or member 'mode_info' not described in 'vpbe_set_mode' drivers/media/platform/davinci/vpbe.c:585: warning: Function parameter or member 'dev' not described in 'vpbe_initialize' drivers/media/platform/davinci/vpbe.c:585: warning: Function parameter or member 'vpbe_dev' not described in 'vpbe_initialize' drivers/media/platform/davinci/vpbe.c:779: warning: Function parameter or member 'dev' not described in 'vpbe_deinitialize' drivers/media/platform/davinci/vpbe.c:779: warning: Function parameter or member 'vpbe_dev' not described in 'vpbe_deinitialize' drivers/media/platform/davinci/vpbe_osd.c:144: warning: Function parameter or member 'sd' not described in '_osd_dm6446_vid0_pingpong' drivers/media/platform/davinci/vpbe_osd.c:144: warning: Function parameter or member 'field_inversion' not described in '_osd_dm6446_vid0_pingpong' drivers/media/platform/davinci/vpbe_osd.c:144: warning: Function parameter or member 'fb_base_phys' not described in '_osd_dm6446_vid0_pingpong' drivers/media/platform/davinci/vpbe_osd.c:144: warning: Function parameter or member 'lconfig' not described in '_osd_dm6446_vid0_pingpong' drivers/media/platform/davinci/vpbe_osd.c:799: warning: Function parameter or member 'sd' not described in 'try_layer_config' drivers/media/platform/davinci/vpbe_osd.c:799: warning: Function parameter or member 'layer' not described in 'try_layer_config' drivers/media/platform/davinci/vpbe_osd.c:799: warning: Function parameter or member 'lconfig' not described in 'try_layer_config' drivers/media/platform/davinci/vpbe_display.c:578: warning: Function parameter or member 'disp_dev' not described in 'vpbe_try_format' drivers/media/platform/davinci/vpbe_display.c:578: warning: Function parameter or member 'pixfmt' not described in 'vpbe_try_format' drivers/media/platform/davinci/vpbe_display.c:578: warning: Function parameter or member 'check' not described in 'vpbe_try_format' drivers/media/platform/davinci/vpbe_display.c:943: warning: Function parameter or member 'file' not described in 'vpbe_display_s_std' drivers/media/platform/davinci/vpbe_display.c:943: warning: Function parameter or member 'priv' not described in 'vpbe_display_s_std' drivers/media/platform/davinci/vpbe_display.c:943: warning: Function parameter or member 'std_id' not described in 'vpbe_display_s_std' drivers/media/platform/davinci/vpbe_display.c:975: warning: Function parameter or member 'file' not described in 'vpbe_display_g_std' drivers/media/platform/davinci/vpbe_display.c:975: warning: Function parameter or member 'priv' not described in 'vpbe_display_g_std' drivers/media/platform/davinci/vpbe_display.c:975: warning: Function parameter or member 'std_id' not described in 'vpbe_display_g_std' drivers/media/platform/davinci/vpbe_display.c:998: warning: Function parameter or member 'file' not described in 'vpbe_display_enum_output' drivers/media/platform/davinci/vpbe_display.c:998: warning: Function parameter or member 'priv' not described in 'vpbe_display_enum_output' drivers/media/platform/davinci/vpbe_display.c:998: warning: Function parameter or member 'output' not described in 'vpbe_display_enum_output' drivers/media/platform/davinci/vpbe_display.c:1025: warning: Function parameter or member 'file' not described in 'vpbe_display_s_output' drivers/media/platform/davinci/vpbe_display.c:1025: warning: Function parameter or member 'priv' not described in 'vpbe_display_s_output' drivers/media/platform/davinci/vpbe_display.c:1025: warning: Function parameter or member 'i' not described in 'vpbe_display_s_output' drivers/media/platform/davinci/vpbe_display.c:1054: warning: Function parameter or member 'file' not described in 'vpbe_display_g_output' drivers/media/platform/davinci/vpbe_display.c:1054: warning: Function parameter or member 'priv' not described in 'vpbe_display_g_output' drivers/media/platform/davinci/vpbe_display.c:1054: warning: Function parameter or member 'i' not described in 'vpbe_display_g_output' drivers/media/platform/davinci/vpbe_display.c:1074: warning: Function parameter or member 'file' not described in 'vpbe_display_enum_dv_timings' drivers/media/platform/davinci/vpbe_display.c:1074: warning: Function parameter or member 'priv' not described in 'vpbe_display_enum_dv_timings' drivers/media/platform/davinci/vpbe_display.c:1074: warning: Function parameter or member 'timings' not described in 'vpbe_display_enum_dv_timings' drivers/media/platform/davinci/vpbe_display.c:1104: warning: Function parameter or member 'file' not described in 'vpbe_display_s_dv_timings' drivers/media/platform/davinci/vpbe_display.c:1104: warning: Function parameter or member 'priv' not described in 'vpbe_display_s_dv_timings' drivers/media/platform/davinci/vpbe_display.c:1104: warning: Function parameter or member 'timings' not described in 'vpbe_display_s_dv_timings' drivers/media/platform/davinci/vpbe_display.c:1137: warning: Function parameter or member 'file' not described in 'vpbe_display_g_dv_timings' drivers/media/platform/davinci/vpbe_display.c:1137: warning: Function parameter or member 'priv' not described in 'vpbe_display_g_dv_timings' drivers/media/platform/davinci/vpbe_display.c:1137: warning: Function parameter or member 'dv_timings' not described in 'vpbe_display_g_dv_timings' Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: vpbe_venc: don't store return codes if they won't be usedMauro Carvalho Chehab
Fix those two warnings drivers/media/platform/davinci/vpbe_venc.c: In function ‘venc_set_ntsc’: drivers/media/platform/davinci/vpbe_venc.c:230:6: warning: variable ‘val’ set but not used [-Wunused-but-set-variable] u32 val; ^~~ drivers/media/platform/davinci/vpbe_venc.c: In function ‘venc_sub_dev_init’: drivers/media/platform/davinci/vpbe_venc.c:611:6: warning: variable ‘err’ set but not used [-Wunused-but-set-variable] int err; ^~~ AR drivers/media/platform/davinci/built-in.a Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: davinci: allow build vpbe_display with COMPILE_TESTMauro Carvalho Chehab
Except for some includes (with doesn't seem to be used), this driver builds fine with COMPILE_TEST. So, add checks there to avoid building it if ARCH_DAVINCI is not selected. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: davinci: allow building isif codeMauro Carvalho Chehab
The only reason why this driver doesn't build with COMPILE_TEST is because it includes mach/mux.h. It turns that none of the macros defined there are used. So, get rid of it, in order to allow it to build with COMPILE_TEST. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: mmp-driver: make two functions staticMauro Carvalho Chehab
Those functions are used only internally: CC drivers/media/platform/marvell-ccic/mmp-driver.o drivers/media/platform/marvell-ccic/mmp-driver.c:186:6: warning: no previous prototype for ‘mcam_ctlr_reset’ [-Wmissing-prototypes] void mcam_ctlr_reset(struct mcam_camera *mcam) ^~~~~~~~~~~~~~~ drivers/media/platform/marvell-ccic/mmp-driver.c:217:6: warning: no previous prototype for ‘mmpcam_calc_dphy’ [-Wmissing-prototypes] void mmpcam_calc_dphy(struct mcam_camera *mcam) ^~~~~~~~~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: marvel-ccic: re-enable mmp-driver buildMauro Carvalho Chehab
This driver was disabled back in 2015 from builds because of some troubles with the platform_data definition. Now that this got fixed, re-enable it. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: exymos4-is: allow compile test for EXYNOS FIMC-LITEMauro Carvalho Chehab
There's nothing that prevents building this driver with COMPILE_TEST. So, enable it. While here, make the Kconfig dependency cleaner by removing the unneeded if block. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: cec_gpio: allow building CEC_GPIO with COMPILE_TESTMauro Carvalho Chehab
At least on i386, building with allyesconfig doesn't enable PREEMPT, causing cec_gpio to not build. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: fsl-viu: allow building it with COMPILE_TESTMauro Carvalho Chehab
There aren't many things that would be needed to allow it to build with compile test. Add the needed bits. Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: fsl-viu: mark static functions as suchMauro Carvalho Chehab
There are several functions that are used only inside the driver. Stop exposing that to global symbolspace. Get rid of the following gcc warnings: drivers/media/platform/fsl-viu.c:240:17: warning: no previous prototype for ‘format_by_fourcc’ [-Wmissing-prototypes] struct viu_fmt *format_by_fourcc(int fourcc) ^~~~~~~~~~~~~~~~ drivers/media/platform/fsl-viu.c:253:6: warning: no previous prototype for ‘viu_start_dma’ [-Wmissing-prototypes] void viu_start_dma(struct viu_dev *dev) ^~~~~~~~~~~~~ drivers/media/platform/fsl-viu.c:262:6: warning: no previous prototype for ‘viu_stop_dma’ [-Wmissing-prototypes] void viu_stop_dma(struct viu_dev *dev) ^~~~~~~~~~~~ drivers/media/platform/fsl-viu.c:807:5: warning: no previous prototype for ‘vidioc_g_fbuf’ [-Wmissing-prototypes] int vidioc_g_fbuf(struct file *file, void *priv, struct v4l2_framebuffer *arg) ^~~~~~~~~~~~~ drivers/media/platform/fsl-viu.c:818:5: warning: no previous prototype for ‘vidioc_s_fbuf’ [-Wmissing-prototypes] int vidioc_s_fbuf(struct file *file, void *priv, const struct v4l2_framebuffer *arg) ^~~~~~~~~~~~~ drivers/media/platform/fsl-viu.c: In function ‘viu_open’: drivers/media/platform/fsl-viu.c:1170:6: warning: variable ‘status_cfg’ set but not used [-Wunused-but-set-variable] u32 status_cfg; ^~~~~~~~~~ drivers/media/platform/fsl-viu.c: At top level: drivers/media/platform/fsl-viu.c:1304:6: warning: no previous prototype for ‘viu_reset’ [-Wmissing-prototypes] void viu_reset(struct viu_reg *reg) ^~~~~~~~~ Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-17media: omap3isp/isp: remove an unused static varMauro Carvalho Chehab
The isp_xclk_init_data const data isn't used anywere. drivers/media/platform/omap3isp/isp.c:294:35: warning: ‘isp_xclk_init_data’ defined but not used [-Wunused-const-variable=] static const struct clk_init_data isp_xclk_init_data = { ^~~~~~~~~~~~~~~~~~ Fixes: 9b28ee3c9122 ("[media] omap3isp: Use the common clock framework") Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2018-04-15Merge tag 'scsi-fixes' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi Pull SCSI fixes from James Bottomley: "This is a set of minor (and safe changes) that didn't make the initial pull request plus some bug fixes. The status handling code is actually a running regression from the previous merge window which had an incomplete fix (now reverted) and most of the remaining bug fixes are for problems older than the current merge window" [ Side note: this merge also takes the base kernel git repository to 6+ million objects for the first time. Technically we hit it a couple of merges ago already if you count all the tag objects, but now it reaches 6M+ objects reachable from HEAD. I was joking around that that's when I should switch to 5.0, because 3.0 happened at the 2M mark, and 4.0 happened at 4M objects. But probably not, even if numerology is about as good a reason as any. - Linus ] * tag 'scsi-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi: scsi: devinfo: Add Microsoft iSCSI target to 1024 sector blacklist scsi: cxgb4i: silence overflow warning in t4_uld_rx_handler() scsi: dpt_i2o: Use after free in I2ORESETCMD ioctl scsi: core: Make scsi_result_to_blk_status() recognize CONDITION MET scsi: core: Rename __scsi_error_from_host_byte() into scsi_result_to_blk_status() Revert "scsi: core: return BLK_STS_OK for DID_OK in __scsi_error_from_host_byte()" scsi: aacraid: Insure command thread is not recursively stopped scsi: qla2xxx: Correct setting of SAM_STAT_CHECK_CONDITION scsi: qla2xxx: correctly shift host byte scsi: qla2xxx: Fix race condition between iocb timeout and initialisation scsi: qla2xxx: Avoid double completion of abort command scsi: qla2xxx: Fix small memory leak in qla2x00_probe_one on probe failure scsi: scsi_dh: Don't look for NULL devices handlers by name scsi: core: remove redundant assignment to shost->use_blk_mq
2018-04-15Merge tag 'kbuild-v4.17-2' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild Pull more Kbuild updates from Masahiro Yamada: - pass HOSTLDFLAGS when compiling single .c host programs - build genksyms lexer and parser files instead of using shipped versions - rename *-asn1.[ch] to *.asn1.[ch] for suffix consistency - let the top .gitignore globally ignore artifacts generated by flex, bison, and asn1_compiler - let the top Makefile globally clean artifacts generated by flex, bison, and asn1_compiler - use safer .SECONDARY marker instead of .PRECIOUS to prevent intermediate files from being removed - support -fmacro-prefix-map option to make __FILE__ a relative path - fix # escaping to prepare for the future GNU Make release - clean up deb-pkg by using debian tools instead of handrolled source/changes generation - improve rpm-pkg portability by supporting kernel-install as a fallback of new-kernel-pkg - extend Kconfig listnewconfig target to provide more information * tag 'kbuild-v4.17-2' of git://git.kernel.org/pub/scm/linux/kernel/git/masahiroy/linux-kbuild: kconfig: extend output of 'listnewconfig' kbuild: rpm-pkg: use kernel-install as a fallback for new-kernel-pkg Kbuild: fix # escaping in .cmd files for future Make kbuild: deb-pkg: split generating packaging and build kbuild: use -fmacro-prefix-map to make __FILE__ a relative path kbuild: mark $(targets) as .SECONDARY and remove .PRECIOUS markers kbuild: rename *-asn1.[ch] to *.asn1.[ch] kbuild: clean up *-asn1.[ch] patterns from top-level Makefile .gitignore: move *-asn1.[ch] patterns to the top-level .gitignore kbuild: add %.dtb.S and %.dtb to 'targets' automatically kbuild: add %.lex.c and %.tab.[ch] to 'targets' automatically genksyms: generate lexer and parser during build instead of shipping kbuild: clean up *.lex.c and *.tab.[ch] patterns from top-level Makefile .gitignore: move *.lex.c *.tab.[ch] patterns to the top-level .gitignore kbuild: use HOSTLDFLAGS for single .c executables
2018-04-13Merge branch 'next' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux Pull thermal management update from Zhang Rui: - Fix race condition in imx_thermal_probe() (Mikhail Lappo) - Add cooling device's statistics in sysfs (Viresh Kumar) * 'next' of git://git.kernel.org/pub/scm/linux/kernel/git/rzhang/linux: thermal: Add cooling device's statistics in sysfs thermal: imx: Fix race condition in imx_thermal_probe()
2018-04-13Merge branch 'dmi-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging Pull dmi updates from Jean Delvare. * 'dmi-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jdelvare/staging: firmware: dmi_scan: Use lowercase letters for UUID firmware: dmi_scan: Add DMI_OEM_STRING support to dmi_matches firmware: dmi_scan: Fix UUID length safety check
2018-04-13Merge tag 'chrome-platform-for-linus-4.17' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform Pull chrome platform updates from Benson Leung: - a series from Dmitry to remove platform data from chromeos_laptop.c, which was the only user of platform data for the atmel_mxt_ts driver. - a series to clean up sysfs and debugfs for cros_ec - other misc cleanups * tag 'chrome-platform-for-linus-4.17' of git://git.kernel.org/pub/scm/linux/kernel/git/bleung/chrome-platform: (22 commits) platform/chrome: mfd/cros_ec_dev: Add sysfs entry to set keyboard wake lid angle platform/chrome: cros_ec_debugfs: Add PD port info to debugfs platform/chrome: cros_ec_debugfs: Use octal permissions '0444' platform/chrome: cros_ec_sysfs: use permission-specific DEVICE_ATTR variants platform/chrome: cros_ec_sysfs: introduce to_cros_ec_dev define. platform/chrome: cros_ec_sysfs: Modify error handling platform/chrome: cros_ec_lpc: Add support for Google devices using custom coreboot firmware platform/chrome: cros_ec_lpc: wake up from s2idle on Chrome EC Input: atmel_mxt_ts - remove platform data support platform/chrome: chromeos_laptop - discard data for unneeded boards platform/chrome: chromeos_laptop - use device properties for Pixel platform/chrome: chromeos_laptop - rely on I2C to set up interrupt trigger platform/chrome: chromeos_laptop - use I2C notifier to create devices platform/chrome: chromeos_laptop - parse DMI IRQ data once platform/chrome: chromeos_laptop - rework i2c peripherals initialization platform/chrome: chromeos_laptop - factor out getting IRQ from DMI platform/chrome: chromeos_laptop - introduce pr_fmt() platform/chrome: chromeos_laptop - stop setting suspend mode for Atmel devices platform/chrome: chromeos_laptop - add SPDX identifier Input: atmel_mxt_ts - switch ChromeOS ACPI devices to generic props ...
2018-04-13Merge tag 'clk-for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux Pull clk updates from Stephen Boyd: "The large diff this time around is from the addition of a new clk driver for the TI Davinci family of SoCs. So far those clks have been supported with a custom implementation of the clk API in the arch port instead of in the CCF. With this driver merged we're one step closer to having a single clk API implementation. The other large diff is from the Amlogic clk driver that underwent some major surgery to use regmap. Beyond that, the biggest hitter is Samsung which needed some reworks to properly handle clk provider power domains and a bunch of PLL rate updates. The core framework was fairly quiet this round, just getting some cleanups and small fixes for some of the more esoteric features. And the usual set of driver non-critical fixes, cleanups, and minor additions are here as well. Core: - Rejig clk_ops::init() to be a little earlier for phase/accuracy ops - debugfs ops macroized to shave some lines of boilerplate code - Always calculate the phase instead of caching it in clk_get_phase() - More __must_check on bulk clk APIs New Drivers: - TI's Davinci family of SoCs - Intel's Stratix10 SoC - stm32mp157 SoC - Allwinner H6 CCU - Silicon Labs SI544 clock generator chip - Renesas R-Car M3-N and V3H SoCs - i.MX6SLL SoCs Removed Drivers: - ST-Ericsson AB8540/9540 Updates: - Mediatek MT2701 and MT7622 audsys support and MT2712 updates - STM32F469 DSI and STM32F769 sdmmc2 support - GPIO clks can sleep now - Spreadtrum SC9860 RTC clks - Nvidia Tegra MBIST workarounds and various minor fixes - Rockchip phase handling fixes and a memory leak plugged - Renesas drivers switch to readl/writel from clk_readl/clk_writel - Renesas gained CPU (Z/Z2) and watchdog support - Rockchip rk3328 display clks and rk3399 1.6GHz PLL support - Qualcomm PM8921 PMIC XO buffers - Amlogic migrates to regmap APIs - TI Keystone clk latching support - Allwinner H3 and H5 video clk fixes - Broadcom BCM2835 PLLs needed another bit to enable - i.MX6SX CKO mux fix and i.MX7D Video PLL divider fix - i.MX6UL/ULL epdc_podf support - Hi3798CV200 COMBPHY0 and USB2_OTG_UTMI and phase support for eMMC" * tag 'clk-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/clk/linux: (233 commits) clk: davinci: add a reset lookup table for psc0 clk: imx: add clock driver for imx6sll dt-bindings: imx: update clock doc for imx6sll clk: imx: add new gate/gate2 wrapper funtion clk: imx: Add CLK_IS_CRITICAL flag for busy divider and busy mux clk: cs2000: set pm_ops in hibernate-compatible way clk: bcm2835: De-assert/assert PLL reset signal when appropriate clk: imx7d: Move clks_init_on before any clock operations clk: imx7d: Correct ahb clk parent select clk: imx7d: Correct dram pll type clk: imx7d: Add USB clock information clk: socfpga: stratix10: add clock driver for Stratix10 platform dt-bindings: documentation: add clock bindings information for Stratix10 clk: ti: fix flag space conflict with clkctrl clocks clk: uniphier: add additional ethernet clock lines for Pro4 clk: uniphier: add SATA clock control support clk: uniphier: add PCIe clock control support clk: Add driver for the si544 clock generator chip clk: davinci: Remove redundant dev_err calls clk: uniphier: add ethernet clock control support for PXs3 ...
2018-04-13Merge tag 'pwm/for-4.17-rc1' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm Pull pwm updates from Thierry Reding: "This set of changes adds support for more generations of the RCar controller as well as runtime PM support. The JZ4740 driver gains support for device tree and can now be used on all Ingenic SoCs. Rounding things off is a random assortment of fixes and cleanups all across the board" * tag 'pwm/for-4.17-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/thierry.reding/linux-pwm: (29 commits) pwm: rcar: Add suspend/resume support pwm: rcar: Use PM Runtime to control module clock dt-bindings: pwm: rcar: Add bindings for R-Car M3N support pwm: rcar: Fix a condition to prevent mismatch value setting to duty pwm: sysfs: Use put_device() instead of kfree() dt-bindings: pwm: sunxi: Add new compatible strings pwm: sun4i: Simplify controller mapping pwm: sun4i: Drop unused .has_rdy member pwm: sun4i: Properly check current state pwm: Remove depends on AVR32 pwm: stm32: LPTimer: Use 3 cells ->of_xlate() dt-bindings: pwm-stm32-lp: Add #pwm-cells pwm: stm32: Protect common prescaler for all channels pwm: stm32: Remove unused struct device pwm: mediatek: Improve precision in rate calculation pwm: mediatek: Remove redundant MODULE_ALIAS entries pwm: mediatek: Fix up PWM4 and PWM5 malfunction on MT7623 pwm: jz4740: Enable for all Ingenic SoCs pwm: jz4740: Add support for devicetree pwm: jz4740: Implement ->set_polarity() ...