All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: emxx_udc: Fixed coding style in places where lines should not end in '('
@ 2021-05-20 17:46 ` Hriday Hegde
  0 siblings, 0 replies; 6+ messages in thread
From: Hriday Hegde @ 2021-05-20 17:46 UTC (permalink / raw)
  Cc: hridayhegde1999, Greg Kroah-Hartman, Alex Dewar, Sean Behan,
	Colin Ian King, Kumar Kartikeya Dwivedi, linux-staging,
	linux-kernel

The fixes were for the following checkpatch outputs:

CHECK: Lines should not end with a '('
1076: FILE: drivers/staging/emxx_udc/emxx_udc.c:1076:
+				_nbu2ss_writel(

CHECK: Lines should not end with a '('
1228: FILE: drivers/staging/emxx_udc/emxx_udc.c:1228:
+		length = _nbu2ss_readl(

CHECK: Lines should not end with a '('
1465: FILE: drivers/staging/emxx_udc/emxx_udc.c:1465:
+			regdata = _nbu2ss_readl(

Signed-off-by: Hriday Hegde <hridayhegde1999@gmail.com>
---
 drivers/staging/emxx_udc/emxx_udc.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
index 741147a4f0fe..8364316c1d25 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -1073,8 +1073,8 @@ static int _nbu2ss_epn_in_pio(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep,
 		i_word_length = length / sizeof(u32);
 		if (i_word_length > 0) {
 			for (i = 0; i < i_word_length; i++) {
-				_nbu2ss_writel(
-					&preg->EP_REGS[ep->epnum - 1].EP_WRITE,
+				_nbu2ss_writel(&preg->EP_REGS[ep->epnum - 1]
+					.EP_WRITE,
 					p_buf_32->dw);
 
 				p_buf_32++;
@@ -1225,8 +1225,7 @@ static void _nbu2ss_restert_transfer(struct nbu2ss_ep *ep)
 		return;
 
 	if (ep->epnum > 0) {
-		length = _nbu2ss_readl(
-			&ep->udc->p_regs->EP_REGS[ep->epnum - 1].EP_LEN_DCNT);
+		length = _nbu2ss_readl(&ep->udc->p_regs->EP_REGS[ep->epnum - 1].EP_LEN_DCNT);
 
 		length &= EPN_LDATA;
 		if (length < ep->ep.maxpacket)
@@ -1462,8 +1461,7 @@ static void _nbu2ss_epn_set_stall(struct nbu2ss_udc *udc,
 		for (limit_cnt = 0
 			; limit_cnt < IN_DATA_EMPTY_COUNT
 			; limit_cnt++) {
-			regdata = _nbu2ss_readl(
-				&preg->EP_REGS[ep->epnum - 1].EP_STATUS);
+			regdata = _nbu2ss_readl(&preg->EP_REGS[ep->epnum - 1].EP_STATUS);
 
 			if ((regdata & EPN_IN_DATA) == 0)
 				break;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [PATCH] staging: emxx_udc: Fixed coding style in places where lines should not end in '('
@ 2021-05-20 17:46 ` Hriday Hegde
  0 siblings, 0 replies; 6+ messages in thread
From: Hriday Hegde @ 2021-05-20 17:46 UTC (permalink / raw)
  Cc: hridayhegde1999, Greg Kroah-Hartman, Alex Dewar, Sean Behan,
	Colin Ian King, Kumar Kartikeya Dwivedi, linux-staging,
	linux-kernel

The fixes were for the following checkpatch outputs:

CHECK: Lines should not end with a '('
1076: FILE: drivers/staging/emxx_udc/emxx_udc.c:1076:
+				_nbu2ss_writel(

CHECK: Lines should not end with a '('
1228: FILE: drivers/staging/emxx_udc/emxx_udc.c:1228:
+		length = _nbu2ss_readl(

CHECK: Lines should not end with a '('
1465: FILE: drivers/staging/emxx_udc/emxx_udc.c:1465:
+			regdata = _nbu2ss_readl(

Signed-off-by: Hriday Hegde <hridayhegde1999@gmail.com>
---
 drivers/staging/emxx_udc/emxx_udc.c | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
index 741147a4f0fe..8364316c1d25 100644
--- a/drivers/staging/emxx_udc/emxx_udc.c
+++ b/drivers/staging/emxx_udc/emxx_udc.c
@@ -1073,8 +1073,8 @@ static int _nbu2ss_epn_in_pio(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep,
 		i_word_length = length / sizeof(u32);
 		if (i_word_length > 0) {
 			for (i = 0; i < i_word_length; i++) {
-				_nbu2ss_writel(
-					&preg->EP_REGS[ep->epnum - 1].EP_WRITE,
+				_nbu2ss_writel(&preg->EP_REGS[ep->epnum - 1]
+					.EP_WRITE,
 					p_buf_32->dw);
 
 				p_buf_32++;
@@ -1225,8 +1225,7 @@ static void _nbu2ss_restert_transfer(struct nbu2ss_ep *ep)
 		return;
 
 	if (ep->epnum > 0) {
-		length = _nbu2ss_readl(
-			&ep->udc->p_regs->EP_REGS[ep->epnum - 1].EP_LEN_DCNT);
+		length = _nbu2ss_readl(&ep->udc->p_regs->EP_REGS[ep->epnum - 1].EP_LEN_DCNT);
 
 		length &= EPN_LDATA;
 		if (length < ep->ep.maxpacket)
@@ -1462,8 +1461,7 @@ static void _nbu2ss_epn_set_stall(struct nbu2ss_udc *udc,
 		for (limit_cnt = 0
 			; limit_cnt < IN_DATA_EMPTY_COUNT
 			; limit_cnt++) {
-			regdata = _nbu2ss_readl(
-				&preg->EP_REGS[ep->epnum - 1].EP_STATUS);
+			regdata = _nbu2ss_readl(&preg->EP_REGS[ep->epnum - 1].EP_STATUS);
 
 			if ((regdata & EPN_IN_DATA) == 0)
 				break;
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] staging: emxx_udc: Fixed coding style in places where lines should not end in '('
  2021-05-20 17:46 ` Hriday Hegde
  (?)
@ 2021-05-20 18:00 ` Greg Kroah-Hartman
  2021-05-20 19:11   ` Hriday Hegde
  -1 siblings, 1 reply; 6+ messages in thread
From: Greg Kroah-Hartman @ 2021-05-20 18:00 UTC (permalink / raw)
  To: Hriday Hegde
  Cc: Alex Dewar, Sean Behan, Colin Ian King, Kumar Kartikeya Dwivedi,
	linux-staging, linux-kernel

On Thu, May 20, 2021 at 10:46:57AM -0700, Hriday Hegde wrote:
> The fixes were for the following checkpatch outputs:
> 
> CHECK: Lines should not end with a '('
> 1076: FILE: drivers/staging/emxx_udc/emxx_udc.c:1076:
> +				_nbu2ss_writel(
> 
> CHECK: Lines should not end with a '('
> 1228: FILE: drivers/staging/emxx_udc/emxx_udc.c:1228:
> +		length = _nbu2ss_readl(
> 
> CHECK: Lines should not end with a '('
> 1465: FILE: drivers/staging/emxx_udc/emxx_udc.c:1465:
> +			regdata = _nbu2ss_readl(
> 
> Signed-off-by: Hriday Hegde <hridayhegde1999@gmail.com>
> ---
>  drivers/staging/emxx_udc/emxx_udc.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
> index 741147a4f0fe..8364316c1d25 100644
> --- a/drivers/staging/emxx_udc/emxx_udc.c
> +++ b/drivers/staging/emxx_udc/emxx_udc.c
> @@ -1073,8 +1073,8 @@ static int _nbu2ss_epn_in_pio(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep,
>  		i_word_length = length / sizeof(u32);
>  		if (i_word_length > 0) {
>  			for (i = 0; i < i_word_length; i++) {
> -				_nbu2ss_writel(
> -					&preg->EP_REGS[ep->epnum - 1].EP_WRITE,
> +				_nbu2ss_writel(&preg->EP_REGS[ep->epnum - 1]
> +					.EP_WRITE,

Please don't break the line at ".", that makes this really hard to
follow.

thanks,

greg k-h

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] staging: emxx_udc: Fixed coding style in places where lines should not end in '('
  2021-05-20 17:46 ` Hriday Hegde
  (?)
  (?)
@ 2021-05-20 18:18 ` Dan Carpenter
  2021-05-20 19:13   ` Hriday Hegde
  -1 siblings, 1 reply; 6+ messages in thread
From: Dan Carpenter @ 2021-05-20 18:18 UTC (permalink / raw)
  To: Hriday Hegde
  Cc: Greg Kroah-Hartman, Alex Dewar, Sean Behan, Colin Ian King,
	Kumar Kartikeya Dwivedi, linux-staging, linux-kernel

On Thu, May 20, 2021 at 10:46:57AM -0700, Hriday Hegde wrote:
> The fixes were for the following checkpatch outputs:
> 
> CHECK: Lines should not end with a '('
> 1076: FILE: drivers/staging/emxx_udc/emxx_udc.c:1076:
> +				_nbu2ss_writel(
> 
> CHECK: Lines should not end with a '('
> 1228: FILE: drivers/staging/emxx_udc/emxx_udc.c:1228:
> +		length = _nbu2ss_readl(
> 
> CHECK: Lines should not end with a '('
> 1465: FILE: drivers/staging/emxx_udc/emxx_udc.c:1465:
> +			regdata = _nbu2ss_readl(
> 
> Signed-off-by: Hriday Hegde <hridayhegde1999@gmail.com>
> ---
>  drivers/staging/emxx_udc/emxx_udc.c | 10 ++++------
>  1 file changed, 4 insertions(+), 6 deletions(-)
> 
> diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
> index 741147a4f0fe..8364316c1d25 100644
> --- a/drivers/staging/emxx_udc/emxx_udc.c
> +++ b/drivers/staging/emxx_udc/emxx_udc.c
> @@ -1073,8 +1073,8 @@ static int _nbu2ss_epn_in_pio(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep,
>  		i_word_length = length / sizeof(u32);
>  		if (i_word_length > 0) {
>  			for (i = 0; i < i_word_length; i++) {
> -				_nbu2ss_writel(
> -					&preg->EP_REGS[ep->epnum - 1].EP_WRITE,
> +				_nbu2ss_writel(&preg->EP_REGS[ep->epnum - 1]
> +					.EP_WRITE,
>  					p_buf_32->dw);

No, this is worse than before.

regards,
dan carpenter


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] staging: emxx_udc: Fixed coding style in places where lines should not end in '('
  2021-05-20 18:00 ` Greg Kroah-Hartman
@ 2021-05-20 19:11   ` Hriday Hegde
  0 siblings, 0 replies; 6+ messages in thread
From: Hriday Hegde @ 2021-05-20 19:11 UTC (permalink / raw)
  To: Greg Kroah-Hartman
  Cc: Alex Dewar, Sean Behan, Colin Ian King, Kumar Kartikeya Dwivedi,
	linux-staging, linux-kernel

On 20-05-2021 23:30, Greg Kroah-Hartman wrote:
> On Thu, May 20, 2021 at 10:46:57AM -0700, Hriday Hegde wrote:
>> The fixes were for the following checkpatch outputs:
>>
>> CHECK: Lines should not end with a '('
>> 1076: FILE: drivers/staging/emxx_udc/emxx_udc.c:1076:
>> +				_nbu2ss_writel(
>>
>> CHECK: Lines should not end with a '('
>> 1228: FILE: drivers/staging/emxx_udc/emxx_udc.c:1228:
>> +		length = _nbu2ss_readl(
>>
>> CHECK: Lines should not end with a '('
>> 1465: FILE: drivers/staging/emxx_udc/emxx_udc.c:1465:
>> +			regdata = _nbu2ss_readl(
>>
>> Signed-off-by: Hriday Hegde <hridayhegde1999@gmail.com>
>> ---
>>  drivers/staging/emxx_udc/emxx_udc.c | 10 ++++------
>>  1 file changed, 4 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
>> index 741147a4f0fe..8364316c1d25 100644
>> --- a/drivers/staging/emxx_udc/emxx_udc.c
>> +++ b/drivers/staging/emxx_udc/emxx_udc.c
>> @@ -1073,8 +1073,8 @@ static int _nbu2ss_epn_in_pio(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep,
>>  		i_word_length = length / sizeof(u32);
>>  		if (i_word_length > 0) {
>>  			for (i = 0; i < i_word_length; i++) {
>> -				_nbu2ss_writel(
>> -					&preg->EP_REGS[ep->epnum - 1].EP_WRITE,
>> +				_nbu2ss_writel(&preg->EP_REGS[ep->epnum - 1]
>> +					.EP_WRITE,
> Please don't break the line at ".", that makes this really hard to
> follow.
>
> thanks,
>
> greg k-h
Ok will keep that in mind. I don't yet see a way to make this into the
proper coding style without losing readability.

Thanks
Hriday

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] staging: emxx_udc: Fixed coding style in places where lines should not end in '('
  2021-05-20 18:18 ` Dan Carpenter
@ 2021-05-20 19:13   ` Hriday Hegde
  0 siblings, 0 replies; 6+ messages in thread
From: Hriday Hegde @ 2021-05-20 19:13 UTC (permalink / raw)
  To: Dan Carpenter
  Cc: Greg Kroah-Hartman, Alex Dewar, Sean Behan, Colin Ian King,
	Kumar Kartikeya Dwivedi, linux-staging, linux-kernel

On 20-05-2021 23:48, Dan Carpenter wrote:
> On Thu, May 20, 2021 at 10:46:57AM -0700, Hriday Hegde wrote:
>> The fixes were for the following checkpatch outputs:
>>
>> CHECK: Lines should not end with a '('
>> 1076: FILE: drivers/staging/emxx_udc/emxx_udc.c:1076:
>> +				_nbu2ss_writel(
>>
>> CHECK: Lines should not end with a '('
>> 1228: FILE: drivers/staging/emxx_udc/emxx_udc.c:1228:
>> +		length = _nbu2ss_readl(
>>
>> CHECK: Lines should not end with a '('
>> 1465: FILE: drivers/staging/emxx_udc/emxx_udc.c:1465:
>> +			regdata = _nbu2ss_readl(
>>
>> Signed-off-by: Hriday Hegde <hridayhegde1999@gmail.com>
>> ---
>>  drivers/staging/emxx_udc/emxx_udc.c | 10 ++++------
>>  1 file changed, 4 insertions(+), 6 deletions(-)
>>
>> diff --git a/drivers/staging/emxx_udc/emxx_udc.c b/drivers/staging/emxx_udc/emxx_udc.c
>> index 741147a4f0fe..8364316c1d25 100644
>> --- a/drivers/staging/emxx_udc/emxx_udc.c
>> +++ b/drivers/staging/emxx_udc/emxx_udc.c
>> @@ -1073,8 +1073,8 @@ static int _nbu2ss_epn_in_pio(struct nbu2ss_udc *udc, struct nbu2ss_ep *ep,
>>  		i_word_length = length / sizeof(u32);
>>  		if (i_word_length > 0) {
>>  			for (i = 0; i < i_word_length; i++) {
>> -				_nbu2ss_writel(
>> -					&preg->EP_REGS[ep->epnum - 1].EP_WRITE,
>> +				_nbu2ss_writel(&preg->EP_REGS[ep->epnum - 1]
>> +					.EP_WRITE,
>>  					p_buf_32->dw);
> No, this is worse than before.
>
> regards,
> dan carpenter
>
Yes sorry, didn't really take into account readability.

Thanks
Hriday

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-05-20 19:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-05-20 17:46 [PATCH] staging: emxx_udc: Fixed coding style in places where lines should not end in '(' Hriday Hegde
2021-05-20 17:46 ` Hriday Hegde
2021-05-20 18:00 ` Greg Kroah-Hartman
2021-05-20 19:11   ` Hriday Hegde
2021-05-20 18:18 ` Dan Carpenter
2021-05-20 19:13   ` Hriday Hegde

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.