Re: [PATCH 0/4] irda: move it to drivers/staging so we can delete it

2017-08-27 Thread Joe Perches
On Sun, 2017-08-27 at 18:53 +0200, Greg Kroah-Hartman wrote: > On Sun, Aug 27, 2017 at 09:19:19AM -0700, Joe Perches wrote: > > On Sun, 2017-08-27 at 18:13 +0200, Greg Kroah-Hartman wrote: > > > On Sun, Aug 27, 2017 at 08:35:43AM -0700, Joe Perches wrote: > > > > On Sun, 2017-08-27 at 17:03 +0200,

Re: [PATCH] staging: atomisp: constify v4l2_subdev_sensor_ops

2017-08-27 Thread Sakari Ailus
Hi Arvind, On Sun, Aug 27, 2017 at 11:26:39AM +0530, Arvind Yadav wrote: > 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. >

[PATCH] staging: rtl8723bs: remove memset before memcpy

2017-08-27 Thread Himanshu Jha
calling memcpy immediately after memset with the same region of memory makes memset redundant. Build successfully. Signed-off-by: Himanshu Jha --- drivers/staging/rtl8723bs/core/rtw_ioctl_set.c | 1 - drivers/staging/rtl8723bs/core/rtw_mlme.c | 2 --

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

2017-08-27 Thread Guenter Roeck
On 08/27/2017 11:01 AM, Greg Kroah-Hartman wrote: On Sat, Aug 26, 2017 at 10:23:24PM -0700, Badhri Jagan Sridharan wrote: 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

Re: [PATCH 0/4] irda: move it to drivers/staging so we can delete it

2017-08-27 Thread Joe Perches
On Sun, 2017-08-27 at 17:03 +0200, Greg Kroah-Hartman wrote: > The IRDA code has long been obsolete and broken. So, to keep people > from trying to use it, and to prevent people from having to maintain it, > let's move it to drivers/staging/ so that we can delete it entirely from > the kernel in

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

2017-08-27 Thread Greg Kroah-Hartman
On Sat, Aug 26, 2017 at 10:23:24PM -0700, Badhri Jagan Sridharan wrote: > 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

Re: [PATCH 11/11] staging: typec: tcpm: Switch to PORT_RESET instead of SNK_UNATTACHED

2017-08-27 Thread Guenter Roeck
On Sat, Aug 26, 2017 at 11:52:33PM -0700, Badhri Jagan Sridharan wrote: > When VBUS is not discovered within PD_T_PS_SOURCE_ON although Rp > is detected on CC, TCPM switches the port to SNK_UNATTACHED > state. SNK_UNATTACHED, however does not force TYPEC_CC_OPEN which > makes the partner(source)

Re: [PATCH 10/11] staging: typec: tcpm: Do not send PING msgs in TCPM

2017-08-27 Thread Guenter Roeck
On Sat, Aug 26, 2017 at 11:52:00PM -0700, Badhri Jagan Sridharan wrote: > PING messages are used to monitor the connect/disconnect. > However, when PD is carried over CC, so this is not required. > > Also, the spec does not clearly say if PD is possible when > Type-c is connected to Type-A/B. So,

Re: [PATCH 09/11] staging: typec: tcpm: typec: tcpm: Wait for CC debounce before PD excg

2017-08-27 Thread Guenter Roeck
On Sat, Aug 26, 2017 at 11:51:27PM -0700, Badhri Jagan Sridharan wrote: > Once, Rp or Rd is switched, wait for PD_T_CC_DEBOUNCE. If not the > PS_RDY message transmitted might result in failure. > Also, Only wait for PD_T_SRCSWAPSTDBY while in > PR_SWAP_SRC_SNK_TRANSITION_OFF. PD_T_PS_SOURCE_OFF is

Re: [PATCH 08/11] staging: typec: tcpm: add cc change handling in src states

2017-08-27 Thread Guenter Roeck
On Sat, Aug 26, 2017 at 11:50:31PM -0700, Badhri Jagan Sridharan wrote: > In the case that the lower layer driver reports a cc change directly > from SINK state to SOURCE state, TCPM doesn't handle these cc change > in SRC_SEND_CAPABILITIES, SRC_READY states. And with SRC_ATTACHED > state, the

Re: [PATCH 06/11 v2] staging: typec: tcpm: Comply with TryWait.SNK State

2017-08-27 Thread Guenter Roeck
On Sat, Aug 26, 2017 at 11:49:21PM -0700, Badhri Jagan Sridharan wrote: > 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

Re: [PATCH 07/11] staging: typec: tcpm: Consider port_type while determining unattached_state

2017-08-27 Thread Guenter Roeck
On Sat, Aug 26, 2017 at 11:32:54PM -0700, Badhri Jagan Sridharan wrote: > While performing PORT_RESET, upon receiving the cc disconnect > signal from the underlaying tcpc device, TCPM transitions into > unattached state. Consider, the current type of port while determining stray ,; not really

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

2017-08-27 Thread Guenter Roeck
On Sat, Aug 26, 2017 at 10:25:07PM -0700, Badhri Jagan Sridharan wrote: > 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

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

2017-08-27 Thread Guenter Roeck
On Sat, Aug 26, 2017 at 10:24:49PM -0700, Badhri Jagan Sridharan wrote: > 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

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

2017-08-27 Thread Guenter Roeck
On Sat, Aug 26, 2017 at 10:24:31PM -0700, Badhri Jagan Sridharan wrote: > 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

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

2017-08-27 Thread Guenter Roeck
On Sat, Aug 26, 2017 at 10:24:12PM -0700, Badhri Jagan Sridharan wrote: > 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 Reviewed-by: Guenter

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

2017-08-27 Thread Guenter Roeck
On Sat, Aug 26, 2017 at 10:23:24PM -0700, Badhri Jagan Sridharan wrote: > 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

Re: [PATCH 0/4] irda: move it to drivers/staging so we can delete it

2017-08-27 Thread Greg Kroah-Hartman
On Sun, Aug 27, 2017 at 09:19:19AM -0700, Joe Perches wrote: > On Sun, 2017-08-27 at 18:13 +0200, Greg Kroah-Hartman wrote: > > On Sun, Aug 27, 2017 at 08:35:43AM -0700, Joe Perches wrote: > > > On Sun, 2017-08-27 at 17:03 +0200, Greg Kroah-Hartman wrote: > > > > The IRDA code has long been

Re: [PATCH][staging-next] staging: typec: tcpm: make function tcpm_get_pwr_opmode

2017-08-27 Thread Guenter Roeck
On Tue, Aug 22, 2017 at 05:02:18PM +0100, Colin King wrote: > From: Colin Ian King > > The function pointer tcpm_get_pwr_opmode is local to the source and does > not need to be in global scope, so make it static. > > Cleans up sparse warning: > symbol

Re: [PATCH 0/4] irda: move it to drivers/staging so we can delete it

2017-08-27 Thread Joe Perches
On Sun, 2017-08-27 at 18:13 +0200, Greg Kroah-Hartman wrote: > On Sun, Aug 27, 2017 at 08:35:43AM -0700, Joe Perches wrote: > > On Sun, 2017-08-27 at 17:03 +0200, Greg Kroah-Hartman wrote: > > > The IRDA code has long been obsolete and broken. So, to keep people > > > from trying to use it, and

Re: [PATCH 0/4] irda: move it to drivers/staging so we can delete it

2017-08-27 Thread Greg Kroah-Hartman
On Sun, Aug 27, 2017 at 08:35:43AM -0700, Joe Perches wrote: > On Sun, 2017-08-27 at 17:03 +0200, Greg Kroah-Hartman wrote: > > The IRDA code has long been obsolete and broken. So, to keep people > > from trying to use it, and to prevent people from having to maintain it, > > let's move it to

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

2017-08-27 Thread Himanshu Jha
On Sun, Aug 27, 2017 at 10:06:47AM -0500, Larry Finger wrote: > On 08/26/2017 03:47 PM, Himanshu Jha wrote: > >Kfree on NULL pointer is a no-op and therefore checking is redundant. > > > >Signed-off-by: Himanshu Jha > >--- > > Acked-by: Larry Finger

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

2017-08-27 Thread Larry Finger
On 08/26/2017 03:47 PM, Himanshu Jha wrote: Kfree on NULL pointer is a no-op and therefore checking is redundant. Signed-off-by: Himanshu Jha --- Acked-by: Larry Finger For some reason not fully explained, gmail is placing ALL your

[PATCH 4/4] staging: irda: add a TODO file.

2017-08-27 Thread Greg Kroah-Hartman
The irda code will be deleted in a future kernel release, so no need to have anyone do any new work on it. Signed-off-by: Greg Kroah-Hartman --- drivers/staging/irda/TODO | 4 1 file changed, 4 insertions(+) create mode 100644 drivers/staging/irda/TODO diff

[PATCH 1/4] irda: move net/irda/ to drivers/staging/irda/net/

2017-08-27 Thread Greg Kroah-Hartman
It's time to get rid of IRDA. It's long been broken, and no one seems to use it anymore. So move it to staging and after a while, we can delete it from there. To start, move the network irda core from net/irda to drivers/staging/irda/net/ Signed-off-by: Greg Kroah-Hartman

[PATCH 2/4] irda: move drivers/net/irda to drivers/staging/irda/drivers

2017-08-27 Thread Greg Kroah-Hartman
Move the irda drivers from drivers/net/irda/ to drivers/staging/irda/drivers as they will be deleted in a future kernel release. Signed-off-by: Greg Kroah-Hartman --- drivers/net/Makefile| 1 - drivers/staging/Makefile

[PATCH 3/4] irda: move include/net/irda into staging subdirectory

2017-08-27 Thread Greg Kroah-Hartman
And finally, move the irda include files into drivers/staging/irda/include/net/irda. Yes, it's a long path, but it makes it easy for us to just add a Makefile directory path addition and all of the net and drivers code "just works". Signed-off-by: Greg Kroah-Hartman

[PATCH 0/4] irda: move it to drivers/staging so we can delete it

2017-08-27 Thread Greg Kroah-Hartman
The IRDA code has long been obsolete and broken. So, to keep people from trying to use it, and to prevent people from having to maintain it, let's move it to drivers/staging/ so that we can delete it entirely from the kernel in a few releases. Greg Kroah-Hartman (4): irda: move net/irda/ to

[PATCH] staging: r8822be: remove unnecessary call to memset

2017-08-27 Thread Himanshu Jha
call to memset to assign 0 value immediately after allocating memory with kzalloc is unnecesaary as kzalloc allocates the memory filled with 0 value. Build and tested it. Signed-off-by: Himanshu Jha --- drivers/staging/rtlwifi/halmac/halmac_88xx/halmac_api_88xx.c

[GIT PULL] Staging/IIO driver fixes for 4.13-rc7

2017-08-27 Thread Greg KH
The following changes since commit ef954844c7ace62f773f4f23e28d2d915adc419f: Linux 4.13-rc5 (2017-08-13 16:01:32 -0700) are available in the git repository at: git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging.git/ tags/staging-4.13-rc7 for you to fetch changes up to

[PATCH 11/11] staging: typec: tcpm: Switch to PORT_RESET instead of SNK_UNATTACHED

2017-08-27 Thread Badhri Jagan Sridharan
When VBUS is not discovered within PD_T_PS_SOURCE_ON although Rp is detected on CC, TCPM switches the port to SNK_UNATTACHED state. SNK_UNATTACHED, however does not force TYPEC_CC_OPEN which makes the partner(source) to think that it is connected. To overcome this issue, force the port into

[PATCH 10/11] staging: typec: tcpm: Do not send PING msgs in TCPM

2017-08-27 Thread Badhri Jagan Sridharan
PING messages are used to monitor the connect/disconnect. However, when PD is carried over CC, so this is not required. Also, the spec does not clearly say if PD is possible when Type-c is connected to Type-A/B. So, removing sending PING messages altogether. Signed-off-by: Badhri Jagan Sridharan

[PATCH 08/11] staging: typec: tcpm: add cc change handling in src states

2017-08-27 Thread Badhri Jagan Sridharan
In the case that the lower layer driver reports a cc change directly from SINK state to SOURCE state, TCPM doesn't handle these cc change in SRC_SEND_CAPABILITIES, SRC_READY states. And with SRC_ATTACHED state, the change is not handled as the port is still considered connected. [49606.131672]

[PATCH 05/11 v2] staging: typec: tcpm: Follow Try.SRC exit requirements

2017-08-27 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 03/11 v2] staging: typec: tcpm: Prevent TCPM from looping in SRC_TRYWAIT

2017-08-27 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 01/11 v2] staging: typec: tcpm: set port type callback

2017-08-27 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 07/11] staging: typec: tcpm: Consider port_type while determining unattached_state

2017-08-27 Thread Badhri Jagan Sridharan
While performing PORT_RESET, upon receiving the cc disconnect signal from the underlaying tcpc device, TCPM transitions into unattached state. Consider, the current type of port while determining the unattached state. In the below logs, although the port_type was set to sink, TCPM transitioned

[PATCH] staging: lustre: constify cl_lock_operations

2017-08-27 Thread Arvind Yadav
cl_lock_operations are not supposed to change at runtime. cl_lock_slice_add is working with const cl_lock_operations. So mark the non-const cl_lock_operations structs as const. Signed-off-by: Arvind Yadav --- drivers/staging/lustre/lustre/obdecho/echo_client.c | 2 +-