Skip to content

Commit 104e004

Browse files
Philipp Hortmanngregkh
authored andcommitted
staging: rtl8723bs: Remove constant result function CheckNegative()
Remove function CheckNegative() that returns always true to shorten code. Signed-off-by: Philipp Hortmann <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 51ece2c commit 104e004

File tree

3 files changed

+4
-37
lines changed

3 files changed

+4
-37
lines changed

drivers/staging/rtl8723bs/hal/HalHWImg8723B_BB.c

Lines changed: 2 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -70,13 +70,6 @@ static bool CheckPositive(
7070
return false;
7171
}
7272

73-
static bool CheckNegative(
74-
struct dm_odm_t *pDM_Odm, const u32 Condition1, const u32 Condition2
75-
)
76-
{
77-
return true;
78-
}
79-
8073
/******************************************************************************
8174
* AGC_TAB.TXT
8275
******************************************************************************/
@@ -244,10 +237,7 @@ void ODM_ReadAndConfig_MP_8723B_AGC_TAB(struct dm_odm_t *pDM_Odm)
244237
READ_NEXT_PAIR(v1, v2, i);
245238
} else {
246239
READ_NEXT_PAIR(v1, v2, i);
247-
if (!CheckNegative(pDM_Odm, v1, v2))
248-
bMatched = false;
249-
else
250-
bMatched = true;
240+
bMatched = true;
251241
READ_NEXT_PAIR(v1, v2, i);
252242
}
253243

@@ -506,10 +496,7 @@ void ODM_ReadAndConfig_MP_8723B_PHY_REG(struct dm_odm_t *pDM_Odm)
506496
READ_NEXT_PAIR(v1, v2, i);
507497
} else {
508498
READ_NEXT_PAIR(v1, v2, i);
509-
if (!CheckNegative(pDM_Odm, v1, v2))
510-
bMatched = false;
511-
else
512-
bMatched = true;
499+
bMatched = true;
513500
READ_NEXT_PAIR(v1, v2, i);
514501
}
515502

drivers/staging/rtl8723bs/hal/HalHWImg8723B_MAC.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -68,13 +68,6 @@ static bool CheckPositive(
6868
return false;
6969
}
7070

71-
static bool CheckNegative(
72-
struct dm_odm_t *pDM_Odm, const u32 Condition1, const u32 Condition2
73-
)
74-
{
75-
return true;
76-
}
77-
7871
/******************************************************************************
7972
* MAC_REG.TXT
8073
******************************************************************************/
@@ -214,10 +207,7 @@ void ODM_ReadAndConfig_MP_8723B_MAC_REG(struct dm_odm_t *pDM_Odm)
214207
READ_NEXT_PAIR(v1, v2, i);
215208
} else {
216209
READ_NEXT_PAIR(v1, v2, i);
217-
if (!CheckNegative(pDM_Odm, v1, v2))
218-
bMatched = false;
219-
else
220-
bMatched = true;
210+
bMatched = true;
221211
READ_NEXT_PAIR(v1, v2, i);
222212
}
223213

drivers/staging/rtl8723bs/hal/HalHWImg8723B_RF.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -78,13 +78,6 @@ static bool CheckPositive(
7878
return false;
7979
}
8080

81-
static bool CheckNegative(
82-
struct dm_odm_t *pDM_Odm, const u32 Condition1, const u32 Condition2
83-
)
84-
{
85-
return true;
86-
}
87-
8881
/******************************************************************************
8982
* RadioA.TXT
9083
******************************************************************************/
@@ -245,10 +238,7 @@ void ODM_ReadAndConfig_MP_8723B_RadioA(struct dm_odm_t *pDM_Odm)
245238
READ_NEXT_PAIR(v1, v2, i);
246239
} else {
247240
READ_NEXT_PAIR(v1, v2, i);
248-
if (!CheckNegative(pDM_Odm, v1, v2))
249-
bMatched = false;
250-
else
251-
bMatched = true;
241+
bMatched = true;
252242
READ_NEXT_PAIR(v1, v2, i);
253243
}
254244

0 commit comments

Comments
 (0)