All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] staging: rtl8712: Fix alignment checks
@ 2021-12-06  0:19 Ngo Tak Fong
  2021-12-06 14:22 ` Dan Carpenter
  0 siblings, 1 reply; 2+ messages in thread
From: Ngo Tak Fong @ 2021-12-06  0:19 UTC (permalink / raw)
  To: Larry.Finger, florian.c.schilhabel, gregkh; +Cc: linux-staging, linux-kernel

Fixed two CHECKs of Alignment should match open parenthesis.

Signed-off-by: Ngo Tak Fong <simon.fodin@gmail.com>
---
 drivers/staging/rtl8712/rtl8712_efuse.c | 13 ++++++-------
 1 file changed, 6 insertions(+), 7 deletions(-)

diff --git a/drivers/staging/rtl8712/rtl8712_efuse.c b/drivers/staging/rtl8712/rtl8712_efuse.c
index 4f3b54a7c3be..3555f612a066 100644
--- a/drivers/staging/rtl8712/rtl8712_efuse.c
+++ b/drivers/staging/rtl8712/rtl8712_efuse.c
@@ -300,16 +300,15 @@ static u8 fix_header(struct _adapter *adapter, u8 header, u16 header_addr)
 		for (i = 0; i < PGPKG_MAX_WORDS; i++) {
 			if (BIT(i) & word_en) {
 				if (BIT(i) & pkt.word_en) {
-					if (efuse_one_byte_read(
-							adapter, addr,
-							&value))
+					if (efuse_one_byte_read(adapter,
+								addr,
+								&value))
 						pkt.data[i * 2] = value;
 					else
 						return false;
-					if (efuse_one_byte_read(
-							adapter,
-							addr + 1,
-							&value))
+					if (efuse_one_byte_read(adapter,
+								addr + 1,
+								&value))
 						pkt.data[i * 2 + 1] =
 							value;
 					else
-- 
2.32.0


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

* Re: [PATCH] staging: rtl8712: Fix alignment checks
  2021-12-06  0:19 [PATCH] staging: rtl8712: Fix alignment checks Ngo Tak Fong
@ 2021-12-06 14:22 ` Dan Carpenter
  0 siblings, 0 replies; 2+ messages in thread
From: Dan Carpenter @ 2021-12-06 14:22 UTC (permalink / raw)
  To: Ngo Tak Fong
  Cc: Larry.Finger, florian.c.schilhabel, gregkh, linux-staging, linux-kernel

On Mon, Dec 06, 2021 at 08:19:49AM +0800, Ngo Tak Fong wrote:
> Fixed two CHECKs of Alignment should match open parenthesis.
> 
> Signed-off-by: Ngo Tak Fong <simon.fodin@gmail.com>
> ---
>  drivers/staging/rtl8712/rtl8712_efuse.c | 13 ++++++-------
>  1 file changed, 6 insertions(+), 7 deletions(-)
> 
> diff --git a/drivers/staging/rtl8712/rtl8712_efuse.c b/drivers/staging/rtl8712/rtl8712_efuse.c
> index 4f3b54a7c3be..3555f612a066 100644
> --- a/drivers/staging/rtl8712/rtl8712_efuse.c
> +++ b/drivers/staging/rtl8712/rtl8712_efuse.c
> @@ -300,16 +300,15 @@ static u8 fix_header(struct _adapter *adapter, u8 header, u16 header_addr)
>  		for (i = 0; i < PGPKG_MAX_WORDS; i++) {
>  			if (BIT(i) & word_en) {

The real problem is this code is jammed up against the right hand side
of the screen.  Just flip this condition around and pull the code in
one tab.

			if (!(BIT(i) & word_en)
				continue;

>  				if (BIT(i) & pkt.word_en) {
> -					if (efuse_one_byte_read(
> -							adapter, addr,
> -							&value))
> +					if (efuse_one_byte_read(adapter,
> +								addr,
> +								&value))

reards,
dan carpenter


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

end of thread, other threads:[~2021-12-06 14:23 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-06  0:19 [PATCH] staging: rtl8712: Fix alignment checks Ngo Tak Fong
2021-12-06 14:22 ` Dan Carpenter

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.