[PATCH] [media] staging: omap4iss: make v4l2_file_operations const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only stored in a const field of a video_device structure. Signed-off-by: Bhumika Goyal --- drivers/staging/media/omap4iss/iss_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/omap4iss/iss_video.c

[PATCH 1/3] staging: lustre: obdclass: return -EFAULT if copy_to_user() fails

2017-08-26 Thread Dan Carpenter
We recently changed from using obd_ioctl_popdata() to calling copy_to_user() directly. This if statement was supposed to be deleted but it was over looked. "err" is zero at this point so it means we return success. Fixes: b03679f6a41a ("staging: lustre: uapi: remove obd_ioctl_popdata()

[PATCH 2/3] staging: lustre: obdclass: return -EFAULT if copy_from_user() fails

2017-08-26 Thread Dan Carpenter
The copy_from_user() function returns the number of bytes which we weren't able to copy. We don't want to return that to the user but instead we want to return -EFAULT. Fixes: d7e09d0397e8 ("staging: add Lustre file system client support") Signed-off-by: Dan Carpenter

[PATCH 3/3] staging: lustre: obdclass: fix checking for obd_init_checks()

2017-08-26 Thread Dan Carpenter
The obd_init_checks() function can either return -EOVERFLOW or -EINVAL but we accidentally ignore -EINVAL returns. Signed-off-by: Dan Carpenter --- This patch is the right thing, but it's always a bit risky turning on new checks and I haven't tested this. diff --git

Re: [PATCH 00/14] VME: Adjustments for several function implementations

2017-08-26 Thread Greg Kroah-Hartman
On Fri, Aug 25, 2017 at 10:50:19PM +0100, Martyn Welch wrote: > On Fri, Aug 25, 2017 at 05:41:13PM +0200, SF Markus Elfring wrote: > > From: Markus Elfring > > Date: Fri, 25 Aug 2017 13:15:43 +0200 > > > > Several update suggestions were taken into account > > from

Re: [PATCH 13/14] vme: tsi148: Improve 17 size determinations

2017-08-26 Thread SF Markus Elfring
>> @@ -2363,5 +2364,5 @@ static int tsi148_probe(struct pci_dev *pdev, const >> struct pci_device_id *id) >> master_num--; >> >> tsi148_device->flush_image = >> -kmalloc(sizeof(struct vme_master_resource), GFP_KERNEL); >> +

[PATCH] [media] Staging: media: radio-bcm2048: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation. Signed-off-by: Bhumika Goyal --- drivers/staging/media/bcm2048/radio-bcm2048.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/bcm2048/radio-bcm2048.c

[PATCH] staging: bcm2835-camera: make video_device const

2017-08-26 Thread Bhumika Goyal
Make this const as it is only used in a copy operation. Signed-off-by: Bhumika Goyal --- drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

Re: [PATCH] Staging rtlwifi efuse fix up a warning kzalloc

2017-08-26 Thread Larry Finger
On 08/26/2017 08:01 AM, Yurii Pavlenko wrote: Hello, I have attached a small patch to fix a warning "Prefer kcalloc over kzalloc with multiply" for efuse.c as part of challenge 10 of Eudyptula. Best regards, Yurii Pavlenko Signed-off-by: Yurii Pavlenko Before you waste

[PATCH] staging: fsl-mc: Delete an error message for a failed memory allocation in fsl_mc_resource_pool_add_device()

2017-08-26 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 26 Aug 2017 18:23:52 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH] staging: netlogic: Delete an error message for a failed memory allocation in xlr_config_spill()

2017-08-26 Thread SF Markus Elfring
From: Markus Elfring Date: Sat, 26 Aug 2017 18:44:12 +0200 Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring ---

[PATCH] Staging rtlwifi efuse fix up a warning kzalloc

2017-08-26 Thread Yurii Pavlenko
Hello, I have attached a small patch to fix a warning "Prefer kcalloc over kzalloc with multiply" for efuse.c as part of challenge 10 of Eudyptula. Best regards, Yurii Pavlenko Signed-off-by: Yurii Pavlenko --- drivers/staging/rtlwifi/efuse.c | 6 +++--- 1 file changed, 3

Re: [PATCH] Staging rtlwifi efuse fix up a warning kzalloc

2017-08-26 Thread Joe Perches
On Sat, 2017-08-26 at 09:48 -0500, Larry Finger wrote: > I will NACK every > patch that tries to force code that I maintain to use kcalloc over kzalloc. Your choice. The concept behind the kzalloc with multiply vs kcalloc is protection against multiplication overflow. It's unlikely to solve

[PATCH] staging: rtl8723bs: remove null check before kfree

2017-08-26 Thread Himanshu Jha
Kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha --- drivers/staging/rtl8723bs/os_dep/ioctl_linux.c | 18 ++ 1 file changed, 6 insertions(+), 12 deletions(-) diff --git

[PATCH] [media] atomisp2: Remove null check before kfree

2017-08-26 Thread Himanshu Jha
Kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha --- .../staging/media/atomisp/pci/atomisp2/css2400/sh_css_firmware.c| 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) diff --git

[PATCH v1] staging: most: hdm_usb: Driver registration with module_driver macro

2017-08-26 Thread Alex Briskin
Register with module_driver macro instead of module_init/module_exit. Signed-off-by: Alex Briskin --- drivers/staging/most/hdm-usb/hdm_usb.c | 20 +--- 1 file changed, 1 insertion(+), 19 deletions(-) diff --git a/drivers/staging/most/hdm-usb/hdm_usb.c

[PATCH 4/6] staging: usb: tcpm: usb: type-c: tcpm: Check for Rp for tPDDebounce

2017-08-26 Thread Badhri Jagan Sridharan
According the spec, the following is the conditions for exiting Try.SNK state: "The port shall wait for tDRPTry and only then begin monitoring the CC1 and CC2 pins for the SNK.Rp state. The port shall then transition to Attached.SNK when the SNK.Rp state is detected on exactly one of the CC1 or

[PATCH 2/6] staging: usb: typec: Check for port type for Try.SRC/Try.SNK

2017-08-26 Thread Badhri Jagan Sridharan
Enable Try.SRC or Try.SNK only when port_type is DRP. Try.SRC or Try.SNK state machines are not valid for SRC only or SNK only ports. Signed-off-by: Badhri Jagan Sridharan --- drivers/staging/typec/tcpm.c | 6 -- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git

[PATCH 3/6] staging: usb: tcpm: usb: typec: tcpm: Prevent TCPM from looping in SRC_TRYWAIT

2017-08-26 Thread Badhri Jagan Sridharan
According to the spec the following is the condition for exiting TryWait.SRC: "The port shall transition to Attached.SRC when V BUS is at vSafe0V and the SRC.Rd state is detected on exactly one of the CC pins for at least tCCDebounce. The port shall transition to Unattached.SNK after tDRPTry if

[PATCH 1/6] staging: usb: typec: tcpm set port type callback

2017-08-26 Thread Badhri Jagan Sridharan
The port type callback call enquires the tcpc_dev if the requested port type is supported. If supported, then performs a tcpm reset if required after setting the tcpm internal port_type variable. Check against the tcpm port_type instead of checking against caps.type as port_type reflects the

[PATCH 5/6] staging: usb: tcpm: usb: typec: tcpm: Follow Try.SRC exit requirements

2017-08-26 Thread Badhri Jagan Sridharan
According to spec: " 4.5.2.2.9.2 Exiting from Try.SRC State: The port shall transition to Attached.SRC when the SRC.Rd state is detected on exactly one of the CC1 or CC2 pins for at least tPDDebounce. The port shall transition to TryWait.SNK after tDRPTry and the SRC.Rd state has not been

[PATCH 6/6] staging: usb: tcpm: Comply with TryWait.SNK State

2017-08-26 Thread Badhri Jagan Sridharan
According to the spec: "4.5.2.2.10.2 Exiting from TryWait.SNK State The port shall transition to Attached.SNK after tCCDebounce if or when VBUS is detected. Note the Source may initiate USB PD communications which will cause brief periods of the SNK.Open state on both the CC1 and CC2 pins, but

[PATCH] staging: atomisp: constify v4l2_subdev_sensor_ops

2017-08-26 Thread Arvind Yadav
v4l2_subdev_sensor_ops are not supposed to change at runtime. v4l2_subdev_sensor_ops are working with const 'sensor' field of sturct v4l2_subdev_ops. So mark the non-const v4l2_subdev_sensor_ops structs as const. Signed-off-by: Arvind Yadav ---