[PATCH] staging: rtl8192u: ieee80211: Remove braces for single line blocks

2021-03-10 Thread Atul Gopinathan
Remove braces around those `if` and `for` blocks which contain a single line and therefore fix the Checkpatch warning of the following type: "WARNING: braces {} are not necessary for single statement blocks" Signed-off-by: Atul Gopinathan --- .../staging/rtl8192u/ieee80211/ieee80211

Re: [PATCH 2/2] staging: rtl8192e: Change state information from u16 to u8

2021-03-02 Thread Atul Gopinathan
On Tue, Mar 02, 2021 at 03:38:52PM +0100, Greg KH wrote: > On Mon, Feb 22, 2021 at 10:53:30PM +0530, Atul Gopinathan wrote: > > On Mon, Feb 22, 2021 at 04:26:33PM +0100, Greg KH wrote: > > > On Sun, Feb 21, 2021 at 10:27:21PM +0530, Atul Gopinathan wrote: > > > > On S

Re: [PATCH 2/2] staging: rtl8192e: Change state information from u16 to u8

2021-02-22 Thread Atul Gopinathan
On Mon, Feb 22, 2021 at 04:26:33PM +0100, Greg KH wrote: > On Sun, Feb 21, 2021 at 10:27:21PM +0530, Atul Gopinathan wrote: > > On Sun, Feb 21, 2021 at 02:08:26PM +0100, Greg KH wrote: > > > On Sat, Feb 20, 2021 at 11:51:55PM +0530, Atul Gopinathan wrote: > > > > Th

Re: [PATCH 2/2] staging: rtl8192e: Change state information from u16 to u8

2021-02-21 Thread Atul Gopinathan
On Sun, Feb 21, 2021 at 02:08:26PM +0100, Greg KH wrote: > On Sat, Feb 20, 2021 at 11:51:55PM +0530, Atul Gopinathan wrote: > > The "CcxRmState" field in struct "rtllib_network" is defined > > as a u16 array of size 2 (so, 4 bytes in total). > > >

Re: [PATCH 1/2] staging: rtl8192e: Pass array value to memcpy instead of struct pointer

2021-02-20 Thread Atul Gopinathan
On Sat, Feb 20, 2021 at 12:34:15PM -0600, Gustavo A. R. Silva wrote: > > > On 2/20/21 12:21, Atul Gopinathan wrote: > > The variable "info_element" is of the following type: > > struct rtllib_info_element *info_element > > > > rtllib_info_element

[PATCH 2/2] staging: rtl8192e: Change state information from u16 to u8

2021-02-20 Thread Atul Gopinathan
rtllib_rx.c:1975: network->MBssidMask = network->CcxRmState[1] & 0x07; rtllib_rx.c:2520: memcpy(dst->CcxRmState, src->CcxRmState, 2); rtllib.h:1108: u8 CcxRmState[2]; //Note: The last line of output is my commit to this patch (u8 instead of u16

[PATCH 1/2] staging: rtl8192e: Pass array value to memcpy instead of struct pointer

2021-02-20 Thread Atul Gopinathan
>CcxRmState". Currently the code uses "memcpy()" with the source as "_element[4]" which would copy in wrong and unintended information. This patch rectifies this error by using "_element->data[4]" which rightly copies the last two bytes as the required st

Re: [PATCH v2 1/2] staging: comedi: cast function output to assigned variable type

2021-02-18 Thread Atul Gopinathan
On Fri, Feb 19, 2021 at 09:55:14AM +0300, Dan Carpenter wrote: > No problem. These days I have fibre to my house, but I still remember > trying to clone the kernel when I could only buy 20MB of data at a > time. :P Whoaa, that's tough! Respect to you for still trying to contribute to the

Re: [PATCH v2 1/2] staging: comedi: cast function output to assigned variable type

2021-02-18 Thread Atul Gopinathan
On Thu, Feb 18, 2021 at 06:51:59PM +0300, Dan Carpenter wrote: > On Thu, Feb 18, 2021 at 06:22:20PM +0530, Atul Gopinathan wrote: > > On Thu, Feb 18, 2021 at 01:21:05PM +0100, Greg KH wrote: > > > On Thu, Feb 18, 2021 at 04:17:55PM +0530, Atul Gopinathan wrote: > > > &

Re: [PATCH v2 1/2] staging: comedi: cast function output to assigned variable type

2021-02-18 Thread Atul Gopinathan
On Thu, Feb 18, 2021 at 02:46:48PM +0100, Greg KH wrote: > On Thu, Feb 18, 2021 at 06:22:20PM +0530, Atul Gopinathan wrote: > > On Thu, Feb 18, 2021 at 01:21:05PM +0100, Greg KH wrote: > > > On Thu, Feb 18, 2021 at 04:17:55PM +0530, Atul Gopinathan wrote: > > > > On T

Re: [PATCH v2 1/2] staging: comedi: cast function output to assigned variable type

2021-02-18 Thread Atul Gopinathan
On Thu, Feb 18, 2021 at 01:21:05PM +0100, Greg KH wrote: > On Thu, Feb 18, 2021 at 04:17:55PM +0530, Atul Gopinathan wrote: > > On Thu, Feb 18, 2021 at 10:31:15AM +, Ian Abbott wrote: > > > On 18/02/2021 08:44, Atul Gopinathan wrote: > > > > Fix the followi

Re: [PATCH v2 1/2] staging: comedi: cast function output to assigned variable type

2021-02-18 Thread Atul Gopinathan
On Thu, Feb 18, 2021 at 10:31:15AM +, Ian Abbott wrote: > On 18/02/2021 08:44, Atul Gopinathan wrote: > > Fix the following warning generated by sparse: > > > > drivers/staging//comedi/comedi_fops.c:2956:23: warning: incorrect type in > > assignment (different

[PATCH v2 2/2] staging: comedi: cast function argument to expected type (void __user *)

2021-02-18 Thread Atul Gopinathan
int *chanlist cmd->chanlist is of type (unsigned int *) as defined in "struct comedi_cmd" in file drivers/staging/comedi/comedi.h The function "ptr_to_compat()" expects argument of type (void __user *) as defined in include/linux/compat.h Signed-off-by: Atul Gopinathan ---

[PATCH v2 1/2] staging: comedi: cast function output to assigned variable type

2021-02-18 Thread Atul Gopinathan
void [noderef] * compat_ptr() has a return type of "void __user *" as defined in "include/linux/compat.h" cmd->chanlist is of type "unsigned int *" as defined in drivers/staging/comedi/comedi.h" in struct comedi_cmd. Signed-off-by: Atul Gopinathan --- dr

Re: [PATCH] staging: comedi: cast to (void __user *)

2021-02-18 Thread Atul Gopinathan
On Thu, Feb 18, 2021 at 08:10:28AM +0100, Greg KH wrote: > On Thu, Feb 18, 2021 at 11:58:40AM +0530, Atul Gopinathan wrote: > > Resolve the following sparse warning: > > drivers/staging//comedi/comedi_fops.c:2983:41: warning: incorrect type in > > argument 1 (different addres

[PATCH] staging: comedi: cast to (void __user *)

2021-02-17 Thread Atul Gopinathan
int *chanlist cmd->chanlist is of type (unsigned int *) as defined in "struct comedi_cmd" in file drivers/staging/comedi/comedi.h The function "ptr_to_compat()" expects argument of type (void __user *) as defined in include/linux/compat.h Signed-off-by: Atul Gopinathan ---

Re: [PATCH] staging: comedi: cast to (unsigned int *)

2021-02-17 Thread Atul Gopinathan
On Wed, Feb 17, 2021 at 06:35:15PM +0100, Greg KH wrote: > On Wed, Feb 17, 2021 at 10:29:08PM +0530, Atul Gopinathan wrote: > > Resolve the following warning generated by sparse: > > > > drivers/staging//comedi/comedi_fops.c:2956:23: warning: incorrect type in > > as

[PATCH] staging: comedi: cast to (unsigned int *)

2021-02-17 Thread Atul Gopinathan
:got void [noderef] * compat_ptr() has a return type of "void __user *" as defined in "include/linux/compat.h" cmd->chanlist is of type "unsigned int *" as defined in drivers/staging/comedi/comedi.h" in struct comedi_cmd. Signed-off-by: Atul Gopinathan ---

[PATCH v2 2/2] staging: hikey9xx: make phy_ops struct const

2021-02-09 Thread Atul Gopinathan
Fix the following type of checkpatch warning: "WARNING: struct phy_ops should normally be const" Signed-off-by: Atul Gopinathan --- drivers/staging/hikey9xx/phy-hi3670-usb3.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/hikey9xx/phy-hi3670

[PATCH v2 1/2] staging: hikey9xx: change spaces to tabs

2021-02-09 Thread Atul Gopinathan
Fix the following type of checkpatch error: "ERROR: code indent should use tabs where possible" Signed-off-by: Atul Gopinathan --- drivers/staging/hikey9xx/hi6421-spmi-pmic.c | 2 +- drivers/staging/hikey9xx/hi6421v600-regulator.c | 2 +- 2 files changed, 2 insertions(+), 2

[PATCH] staging: hikey9xx: fix checkpatch error and warning

2021-02-08 Thread Atul Gopinathan
Fix the following types of checkpatch error and warning: ERROR: code indent should use tabs where possible WARNING: struct phy_ops should normally be const Signed-off-by: Atul Gopinathan --- drivers/staging/hikey9xx/hi6421-spmi-pmic.c | 2 +- drivers/staging/hikey9xx/hi6421v600-regulator.c