All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mahad Ibrahim <mahad.ibrahim.dev@gmail.com>
To: gregkh@linuxfoundation.org
Cc: linux-staging@lists.linux.dev, linux-kernel@vger.kernel.org,
	mahad.ibrahim.dev@gmail.com
Subject: [PATCH 08/10] staging: rtl8723bs: Fix style and alignment issues in HalHWImg8723B_RF.c
Date: Mon, 12 Jan 2026 22:42:25 +0500	[thread overview]
Message-ID: <20260112174227.14922-9-mahad.ibrahim.dev@gmail.com> (raw)
In-Reply-To: <20260112174227.14922-1-mahad.ibrahim.dev@gmail.com>

Fix multiple coding style issues to silence checkpatch.pl warnings.

- Move the first part of the conditional logic in 'if' statements to the
  same line as the opening parenthesis. This fixes the checkpatch warning:
  "Lines should not end with a '('".

- Fix the alignment of function arguments and long variable assignments.
  Use spaces to align subsequent lines with the opening parenthesis,
  adhering to the kernel coding style guidelines.

- Remove hanging parentheses to improve readability.

Signed-off-by: Mahad Ibrahim <mahad.ibrahim.dev@gmail.com>
---
 .../staging/rtl8723bs/hal/HalHWImg8723B_RF.c  | 97 +++++++------------
 1 file changed, 36 insertions(+), 61 deletions(-)

diff --git a/drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c b/drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c
index 0c7d0307b822..22be62ad8e0e 100644
--- a/drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c
+++ b/drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c
@@ -8,9 +8,7 @@
 #include <linux/kernel.h>
 #include "odm_precomp.h"
 
-static bool CheckPositive(
-	struct dm_odm_t *pDM_Odm, const u32 Condition1, const u32 Condition2
-)
+static bool CheckPositive(struct dm_odm_t *pDM_Odm, const u32 Condition1, const u32 Condition2)
 {
 	u8 _BoardType =
 			((pDM_Odm->BoardType & BIT4) >> 4) << 0 | /*  _GLNA */
@@ -36,16 +34,12 @@ static bool CheckPositive(
 	/*  Value Defined Check =============== */
 	/* QFN Type [15:12] and Cut Version [27:24] need to do value check */
 
-	if (
-		((cond1 & 0x0000F000) != 0) &&
-		((cond1 & 0x0000F000) != (driver1 & 0x0000F000))
-	)
+	if (((cond1 & 0x0000F000) != 0) &&
+	    ((cond1 & 0x0000F000) != (driver1 & 0x0000F000)))
 		return false;
 
-	if (
-		((cond1 & 0x0F000000) != 0) &&
-		((cond1 & 0x0F000000) != (driver1 & 0x0F000000))
-	)
+	if (((cond1 & 0x0F000000) != 0) &&
+	    ((cond1 & 0x0F000000) != (driver1 & 0x0F000000)))
 		return false;
 
 	/*  Bit Defined Check ================ */
@@ -311,47 +305,30 @@ void ODM_ReadAndConfig_MP_8723B_TxPowerTrack_SDIO(struct dm_odm_t *pDM_Odm)
 	struct odm_rf_cal_t *pRFCalibrateInfo = &pDM_Odm->RFCalibrateInfo;
 
 
-	memcpy(
-		pRFCalibrateInfo->DeltaSwingTableIdx_2GA_P,
-		gDeltaSwingTableIdx_MP_2GA_P_TxPowerTrack_SDIO_8723B,
-		DELTA_SWINGIDX_SIZE
-	);
-	memcpy(
-		pRFCalibrateInfo->DeltaSwingTableIdx_2GA_N,
-		gDeltaSwingTableIdx_MP_2GA_N_TxPowerTrack_SDIO_8723B,
-		DELTA_SWINGIDX_SIZE
-	);
-	memcpy(
-		pRFCalibrateInfo->DeltaSwingTableIdx_2GB_P,
-		gDeltaSwingTableIdx_MP_2GB_P_TxPowerTrack_SDIO_8723B,
-		DELTA_SWINGIDX_SIZE
-	);
-	memcpy(
-		pRFCalibrateInfo->DeltaSwingTableIdx_2GB_N,
-		gDeltaSwingTableIdx_MP_2GB_N_TxPowerTrack_SDIO_8723B,
-		DELTA_SWINGIDX_SIZE
-	);
-
-	memcpy(
-		pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKA_P,
-		gDeltaSwingTableIdx_MP_2GCCKA_P_TxPowerTrack_SDIO_8723B,
-		DELTA_SWINGIDX_SIZE
-	);
-	memcpy(
-		pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKA_N,
-		gDeltaSwingTableIdx_MP_2GCCKA_N_TxPowerTrack_SDIO_8723B,
-		DELTA_SWINGIDX_SIZE
-	);
-	memcpy(
-		pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKB_P,
-		gDeltaSwingTableIdx_MP_2GCCKB_P_TxPowerTrack_SDIO_8723B,
-		DELTA_SWINGIDX_SIZE
-	);
-	memcpy(
-		pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKB_N,
-		gDeltaSwingTableIdx_MP_2GCCKB_N_TxPowerTrack_SDIO_8723B,
-		DELTA_SWINGIDX_SIZE
-	);
+	memcpy(pRFCalibrateInfo->DeltaSwingTableIdx_2GA_P,
+	       gDeltaSwingTableIdx_MP_2GA_P_TxPowerTrack_SDIO_8723B,
+	       DELTA_SWINGIDX_SIZE);
+	memcpy(pRFCalibrateInfo->DeltaSwingTableIdx_2GA_N,
+	       gDeltaSwingTableIdx_MP_2GA_N_TxPowerTrack_SDIO_8723B,
+	       DELTA_SWINGIDX_SIZE);
+	memcpy(pRFCalibrateInfo->DeltaSwingTableIdx_2GB_P,
+	       gDeltaSwingTableIdx_MP_2GB_P_TxPowerTrack_SDIO_8723B,
+	       DELTA_SWINGIDX_SIZE);
+	memcpy(pRFCalibrateInfo->DeltaSwingTableIdx_2GB_N,
+	       gDeltaSwingTableIdx_MP_2GB_N_TxPowerTrack_SDIO_8723B,
+	       DELTA_SWINGIDX_SIZE);
+	memcpy(pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKA_P,
+	       gDeltaSwingTableIdx_MP_2GCCKA_P_TxPowerTrack_SDIO_8723B,
+	       DELTA_SWINGIDX_SIZE);
+	memcpy(pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKA_N,
+	       gDeltaSwingTableIdx_MP_2GCCKA_N_TxPowerTrack_SDIO_8723B,
+	       DELTA_SWINGIDX_SIZE);
+	memcpy(pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKB_P,
+	       gDeltaSwingTableIdx_MP_2GCCKB_P_TxPowerTrack_SDIO_8723B,
+	       DELTA_SWINGIDX_SIZE);
+	memcpy(pRFCalibrateInfo->DeltaSwingTableIdx_2GCCKB_N,
+	       gDeltaSwingTableIdx_MP_2GCCKB_N_TxPowerTrack_SDIO_8723B,
+	       DELTA_SWINGIDX_SIZE);
 }
 
 /******************************************************************************
@@ -542,14 +519,12 @@ void ODM_ReadAndConfig_MP_8723B_TXPWR_LMT(struct dm_odm_t *pDM_Odm)
 		u8 *chnl = Array[i+4];
 		u8 *val = Array[i+5];
 
-		odm_ConfigBB_TXPWR_LMT_8723B(
-			pDM_Odm,
-			regulation,
-			bandwidth,
-			rate,
-			rfPath,
-			chnl,
-			val
-		);
+		odm_ConfigBB_TXPWR_LMT_8723B(pDM_Odm,
+					     regulation,
+					     bandwidth,
+					     rate,
+					     rfPath,
+					     chnl,
+					     val);
 	}
 }
-- 
2.47.3


  parent reply	other threads:[~2026-01-12 17:42 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-12 17:42 [PATCH 00/10] staging: rtl8723bs: HAL coding style cleanup Mahad Ibrahim
2026-01-12 17:42 ` [PATCH 01/10] staging: rtl8723bs: Fix block comment alignment in HalHWImg8723B_MAC.c Mahad Ibrahim
2026-01-12 17:42 ` [PATCH 02/10] staging: rtl8723bs: Fix spaces around operator checks " Mahad Ibrahim
2026-01-12 17:42 ` [PATCH 03/10] staging: rtl8723bs: Fix style and formatting " Mahad Ibrahim
2026-01-16 13:01   ` Greg KH
2026-01-12 17:42 ` [PATCH 04/10] staging: rtl8723bs: Fix block comment alignment in HalHWImg8723B_BB.c Mahad Ibrahim
2026-01-12 17:42 ` [PATCH 05/10] staging: rtl8723bs: Fix spacing coding style issues " Mahad Ibrahim
2026-01-12 17:42 ` [PATCH 06/10] staging: rtl8723bs: Fix parenthesis and blank line " Mahad Ibrahim
2026-01-16 13:03   ` Greg KH
2026-01-17 15:29     ` Mahad Ibrahim
2026-01-12 17:42 ` [PATCH 07/10] staging: rtl8723bs: Fix block comment alignment in HalHWImg8723B_RF.c Mahad Ibrahim
2026-01-12 17:42 ` Mahad Ibrahim [this message]
2026-01-12 17:42 ` [PATCH 09/10] staging: rtl8723bs: Fix operator spacing issues " Mahad Ibrahim
2026-01-12 17:42 ` [PATCH 10/10] staging: rtl8723bs: Fix blank line checks " Mahad Ibrahim

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20260112174227.14922-9-mahad.ibrahim.dev@gmail.com \
    --to=mahad.ibrahim.dev@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-staging@lists.linux.dev \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.