Jason A. Donenfeld
937ec9f7d5
staging: rtl8192e: remove bogus ssid character sign test
...
This error triggers on some architectures with unsigned `char` types:
drivers/staging/rtl8192e/rtllib_softmac_wx.c:459 rtllib_wx_set_essid() warn: impossible condition '(extra[i] < 0) => (0-255 < 0)'
But actually, the entire test is bogus, as ssids don't have any sign
validity rules like that. So just remove this check look all together.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
Cc: linux-staging@lists.linux.dev
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com >
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Link: https://lore.kernel.org/r/20221025122150.583617-1-Jason@zx2c4.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-10-25 19:13:48 +02:00
Yogesh Hegde
4256e500f6
staging: rtl8192e: Rename variable Bandwidth to avoid CamelCase
...
Rename variable Bandwidth to bandwidth to avoid CamelCase
which is not accepted by checkpatch.pl .
Signed-off-by: Yogesh Hegde <yogi.kernel@gmail.com >
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/20220928180350.GA82748@zephyrus
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-30 14:34:38 +02:00
Shang XiaoJing
280f669ba6
staging: rtl8192e: cmdpkt: Use skb_put_data() instead of skb_put/memcpy pair
...
Use skb_put_data() instead of skb_put() and memcpy(), which is shorter
and clear.
Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com >
Link: https://lore.kernel.org/r/20220927024220.14044-1-shangxiaojing@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-27 10:28:17 +02:00
Philipp Hortmann
9d92bb1d89
staging: rtl8192e: Remove unused variables ForcedAMSDUMaxSize, ...
...
Remove unused variables that are may just once written but never read
ForcedAMSDUMaxSize, PeerBandwidth, SwBwStep, bIsPeerBcm and
bAcceptAddbaReq to avoid CamelCase which is not accepted by checkpatch.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/0f3e63030511f72dbadc0368fd5e2dbd3ff84e07.1664055213.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-26 10:34:29 +02:00
Philipp Hortmann
53be6238f8
staging: rtl8192e: Rename CurrentMPDU..., ForcedAMPDU... and ForcedMPDU...
...
Rename variable CurrentMPDUDensity to current_mpdu_density,
ForcedAMPDUFactor to forced_ampdu_factor and ForcedMPDUDensity to
forced_mpdu_density to avoid CamelCase which is not accepted by
checkpatch.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/4fb37ad6dab9addccf99a41a861220840c123e9b.1664055213.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-26 10:34:29 +02:00
Philipp Hortmann
be13eda506
staging: rtl8192e: Rename SelfMimoPs, CurrentOpMode and bForcedShortGI
...
Rename variable SelfMimoPs to self_mimo_ps, CurrentOpMode to
current_op_mode and bForcedShortGI to forced_short_gi to avoid CamelCase
which is not accepted by checkpatch.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/4c59f62a95b9a77711284998b98fbc559b8db813.1664055213.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-26 10:34:29 +02:00
Philipp Hortmann
9c63f13358
staging: rtl8192e: Rename PeerMimoPs, IOTAction and IOTRaFunc
...
Rename variable PeerMimoPs to peer_mimo_ps, IOTAction to iot_action and
IOTRaFunc to iot_ra_func to avoid CamelCase which is not accepted by
checkpatch. Added spaces around '&' as proposed by checkpatch.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/2a8ce7bff9a00fe44c057242cedb27ca91219137.1664055213.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-26 10:34:29 +02:00
Philipp Hortmann
155c89f195
staging: rtl8192e: Rename RxRe...WinSize, RxReorder... and RxReorderDr...
...
Rename variable RxReorderWinSize to rx_reorder_win_size,
RxReorderPendingTime to rx_reorder_pending_time and RxReorderDropCounter
to rx_reorder_drop_counter to avoid CamelCase which is not accepted by
checkpatch.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/e09ef6e2edc88e32782202589a9230204b547a9c.1664055213.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-26 10:34:29 +02:00
Philipp Hortmann
55bce0ae36
staging: rtl8192e: Rename szRT2RTAggBuffer, bRegRxRe... and bCurRxReo...
...
Rename variable szRT2RTAggBuffer to sz_rt2rt_agg_buf, bRegRxReorderEnable
to reg_rx_reorder_enable and bCurRxReorderEnable to cur_rx_reorder_enable
to avoid CamelCase which is not accepted by checkpatch.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/af445e0a80dc8e153a1ba81df99309f19a69d6cb.1664055213.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-26 10:34:29 +02:00
Philipp Hortmann
27dd3f00a7
staging: rtl8192e: Rename bSwBwInPro..., bRegRT2RTAg... and bCurrentRT...
...
Rename variable bSwBwInProgress to sw_bw_in_progress, bRegRT2RTAggregation
to reg_rt2rt_aggregation and bCurrentRT2RTAggregation to
current_rt2rt_aggregation to avoid CamelCase which is not accepted by
checkpatch.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/868f9db0e29bd170129f90bdbcc14238a750c440.1664055213.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-26 10:34:29 +02:00
Philipp Hortmann
92b2f4b851
staging: rtl8192e: Rename dot11Cur..., bCurTxBW40MHz and bCurrentRT2...
...
Rename variable dot11CurrentPreambleMode to dot11_current_preamble_mode,
bCurTxBW40MHz to cur_tx_bw40mhz and bCurrentRT2RTLongSlotTime to
current_rt2rt_long_slot_time to avoid CamelCase which is not accepted
by checkpatch.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/97c4f62da9a98b0ddcdaafae68182e3eb47f9a17.1664055213.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-26 10:34:28 +02:00
Philipp Hortmann
b7dd95be88
staging: rtl8192e: Rename eRfSleep, eRfPowerStateToSet and RfOffReason
...
Rename variable eRfSleep to rf_sleep, eRfPowerStateToSet to
rf_power_state_to_set and RfOffReason to rf_off_reason to avoid CamelCase
which is not accepted by checkpatch. Omit the upfront "e" as no RfSleep
and RfPowerStateToSet exist and it makes the variables unnecessary long.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/58e21e5cf86270edae93162db2395e6348c9c424.1664055213.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-26 10:34:28 +02:00
Philipp Hortmann
ec07986067
staging: rtl8192e: Rename eRFPowerState, eRfOff and eRfOn
...
Rename variable eRFPowerState to rf_power_state, eRfOff to rf_off and
eRfOn to rf_on to avoid CamelCase which is not accepted by checkpatch.
Omit the upfront "e" as no RFPowerState, RfOff and RfOn exist and it
makes the variables unnecessary long.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/52c676bbaf1f894e30971c5c409b4bcb71c8ef7e.1664055213.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-26 10:34:28 +02:00
Valentin Vidic
877fe503e6
staging: rtl8192e: fix CamelCase variables
...
Fix checkpatch warnings for variables: LinkCtrlReg, DeviceID,
RevisionID, IrqLine.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Signed-off-by: Valentin Vidic <vvidic@valentin-vidic.from.hr >
Link: https://lore.kernel.org/r/20220925123810.2492865-1-vvidic@valentin-vidic.from.hr
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-26 10:32:33 +02:00
Dragan Cvetic
2e2cb44c03
staging: rtl8192e: Rename Tx_Retry_Count_Reg
...
Rename: Current_Tx_Rate_Reg to CURRENT_TX_RATE_REG, Initial_Tx_Rate_Reg to
INITIAL_TX_RATE_REG and Tx_Retry_Count_Reg to TX_RETRY_COUNT_REG to avoid
CamelCase which is not accepted by checkpatch.pl.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Signed-off-by: Dragan Cvetic <dragan.m.cvetic@gmail.com >
Link: https://lore.kernel.org/r/20220924225126.10527-1-dragan.m.cvetic@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-26 10:32:27 +02:00
Philipp Hortmann
9bbf2f3285
staging: rtl8192e: Remove ftrace-like logging in rtl819x_BAProc.c, ...
...
Remove "Unnecessary ftrace-like logging" as requested by checkpatch.
Remove multiline macro as it is not needed anymore and not liked by
kernel community.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/2c41e6856cd37b4f3e5cb1108272bcc24032bf64.1663387785.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-24 12:59:53 +02:00
Philipp Hortmann
42e3a68e2e
staging: rtl8192e: Remove ftrace-like logging in rtl_ps.c
...
Remove "Unnecessary ftrace-like logging" as requested by checkpatch.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/6d942ba65f62643af2ff7104911f7947cca21790.1663387785.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-24 12:59:53 +02:00
Philipp Hortmann
f7624a76e6
staging: rtl8192e: Remove ftrace-like logging in rtl_dm.c
...
Remove "Unnecessary ftrace-like logging" as requested by checkpatch.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/bc0e2c9551ccf78fe388b27d18576b5bb195e2f7.1663387785.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-24 12:59:53 +02:00
Philipp Hortmann
7d1409dede
staging: rtl8192e: Remove ftrace-like logging in r8192E_phy.c
...
Remove "Unnecessary ftrace-like logging" as requested by checkpatch.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/7315b22f54d62c5b56e8b9284426eca4cb641f77.1663387785.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-24 12:59:53 +02:00
Philipp Hortmann
0e260856b7
staging: rtl8192e: Remove ftrace-like logging in r8192E_dev.c
...
Remove "Unnecessary ftrace-like logging" as requested by checkpatch.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/425e1b015c34ddb6df425bc516df64c40a70a58a.1663387785.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-24 12:59:53 +02:00
Philipp Hortmann
bbc8c3a4c4
staging: rtl8192e: Remove ftrace-like logging in r8192E_firmware.c, ...
...
Remove "Unnecessary ftrace-like logging" as requested by checkpatch.
Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com >
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/370f47919a69f2f1717f50123c1617cabc78ceca.1663387785.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-24 12:59:53 +02:00
Philipp Hortmann
98bbc15313
staging: rtl8192e: Rename CurSlotTime
...
Rename variable CurSlotTime to cur_slot_time to avoid CamelCase which is
not accepted by checkpatch.pl.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/1b71366d87b2b178fcd8f182127a51c7a7507936.1662402870.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-11 13:58:22 +02:00
Philipp Hortmann
007314000c
staging: rtl8192e: Rename bHwRadioOff
...
Rename variable bHwRadioOff to hw_radio_off to avoid CamelCase which is
not accepted by checkpatch.pl.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/bb977791e835310e51e9c38cc5c547e0b8a35e0c.1662402870.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-11 13:58:22 +02:00
Philipp Hortmann
43c64c0655
staging: rtl8192e: Rename RFChangeInProgress
...
Rename variable RFChangeInProgress to rf_change_in_progress to avoid
CamelCase which is not accepted by checkpatch.pl.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/29739986e76750395941ddaa6c4f0ffab6eb26a9.1662402870.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-11 13:58:22 +02:00
Philipp Hortmann
e13a47bef2
staging: rtl8192e: Rename RFWaitCounter
...
Rename variable RFWaitCounter to rf_wait_counter to avoid CamelCase which
is not accepted by checkpatch.pl.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/11acf28a0b9f56dde4fa4fbd74a085cf2fa1c20d.1662402870.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-11 13:58:22 +02:00
Philipp Hortmann
7fa8916e24
staging: rtl8192e: Rename rtState
...
Rename variable rtState to rt_state to avoid CamelCase which
is not accepted by checkpatch.pl.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/e888fa7e6edaa68e741236ea012f8230f6817882.1662402870.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-11 13:58:22 +02:00
Philipp Hortmann
142509f66b
staging: rtl8192e: Rename bConnectBySSID
...
Rename variable bConnectBySSID to connect_by_ssid to avoid CamelCase which
is not accepted by checkpatch.pl.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/2b193be93598348994b1f890b6dc5c2ffb84a9b6.1662402870.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-11 13:58:22 +02:00
Philipp Hortmann
a2574a32c3
staging: rtl8192e: Rename bActionAllowed
...
Rename variable bActionAllowed to action_allowed to avoid CamelCase which
is not accepted by checkpatch.pl.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/e8b617ab58c360bb485cb51d080a8ef81cd47869.1662402870.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-11 13:58:22 +02:00
Philipp Hortmann
45b90cb040
staging: rtl8192e: Rename ChangeSource
...
Rename variable ChangeSource to change_source to avoid CamelCase which
is not accepted by checkpatch.pl.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/0d934bb707510692ccd161ea6034b69133aac14c.1662402870.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-11 13:58:21 +02:00
GUO Zihua
513d9a6115
staging: rtl8192e: Fix return type for implementation of ndo_start_xmit
...
CFI (Control Flow Integrity) is a safety feature allowing the system to
detect and react should a potential control flow hijacking occurs. In
particular, the Forward-Edge CFI protects indirect function calls by
ensuring the prototype of function that is actually called matches the
definition of the function hook.
Since Linux now supports CFI, it will be a good idea to fix mismatched
return type for implementation of hooks. Otherwise this would get
cought out by CFI and cause a panic.
Use enums from netdev_tx_t as return value instead, then change return
type to netdev_tx_t. Note that rtllib_xmit_inter() would return 1 only
on allocation failure and the queue is stopped if that happens, meeting
the documented requirement if NETDEV_TX_BUSY should be returned by
ndo_start_xmit.
Signed-off-by: GUO Zihua <guozihua@huawei.com >
Link: https://lore.kernel.org/r/20220905130053.10731-1-guozihua@huawei.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-09-09 09:57:50 +02:00
Alman Khan
a9289fed1d
staging: rtl8192e: Describe each kernel config option
...
An important thing people want to know is what each option that
they select in their kernel configuration file actually does, so
that they can select the right options for their system, and, once
booted, make sure their hardware works as expected.
Add more details describing each option in the kernel configuration
for the rtl8192e (rtllib) driver so that the end-user understands what
they mean, and, if necessary, enables/disables those features
if they are not required.
Signed-off-by: Alman Khan <ak47.almank@gmail.com >
Link: https://lore.kernel.org/r/d053abd3e60d3f2d7724d6857c28a6a255b4f46b.camel@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-08-30 17:17:03 +02:00
Jilin Yuan
700f7e2909
staging/rtl8192e: fix repeated words in comments
...
Delete the redundant word 'new'.
Signed-off-by: Jilin Yuan <yuanjilin@cdjrlc.com >
Link: https://lore.kernel.org/r/20220825122645.27588-1-yuanjilin@cdjrlc.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-08-30 17:16:34 +02:00
Philipp Hortmann
cc3f011b6e
staging: rtl8192e: Remove PHY_SetRFPowerState and rename StateToSet
...
Remove macro that replaces PHY_SetRFPowerState with
rtl92e_set_rf_power_state and rename StateToSet to avoid CamelCase
which is not accepted by checkpatch.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/ae69fd4a09900a395de40b7cfc4fd8af81e63e13.1661370978.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-08-30 17:16:22 +02:00
Philipp Hortmann
e725414555
staging: rtl8192e: Remove Unnecessary ftrace-like logging
...
Remove "Unnecessary ftrace-like logging" as requested by checkpatch.
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/5240b86941ebf3a290d384744d117d436e7bad41.1661370978.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-08-30 17:16:22 +02:00
Philipp Hortmann
254d6fca9d
staging: rtl8192e: Rename Tx... and RxCheckStuckHandler
...
Variable name TxCheckStuckHandler and RxCheckStuckHandler is changed to
avoid CamelCase which is not accepted by checkpatch.pl
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/3041cec77df10cdff18d5466beb3b0616370b112.1661370978.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-08-30 17:16:22 +02:00
Philipp Hortmann
f9ec100614
staging: rtl8192e: Remove blank lines in rtl_core.c
...
Remove blank lines as requested by checkpatch. Reasons are "multiple
blank lines", "Blank lines aren't necessary after an open brace" and
"Blank lines aren't necessary before a close brace".
Signed-off-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Link: https://lore.kernel.org/r/32e831619a91f00cc37e04a2da1a9aeda2ad90a0.1661370978.git.philipp.g.hortmann@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-08-30 17:16:22 +02:00
Felix Schlepper
a27e2eb5e9
Staging: rtl8192e: Added spaces around '+'
...
This addresses two issues raised by checkpatch.pl:
$ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c
CHECK: spaces preferred around that '+' (ctx:VxV)
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Signed-off-by: Felix Schlepper <f3sch.git@outlook.com >
Link: https://lore.kernel.org/r/87628a2dd08ec0e5b02090485e7a9a1d91b7d2a5.1656667089.git.f3sch.git@outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-08 14:25:46 +02:00
Felix Schlepper
ea32f580e8
Staging: rtl8192e: Remove unnecessary blank line
...
This addresses an issue raised by checkpatch.pl:
$ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c
CHECK: Blank lines aren't necessary before a close brace '}'
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Signed-off-by: Felix Schlepper <f3sch.git@outlook.com >
Link: https://lore.kernel.org/r/f3c6bd5c79331e82f006fb2694f791030b07c5ba.1656667089.git.f3sch.git@outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-08 14:25:46 +02:00
Felix Schlepper
58f364ecb1
Staging: rtl8192e: Added braces around else
...
This addresses two issues raised by checkpatch.pl:
$ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c
CHECK: braces {} should be used on all arms of this statement
CHECK: Unbalanced braces around else statement
The coding style rule with not using unnecessary braces around if/else
does not apply if only one branch is a single statement.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Signed-off-by: Felix Schlepper <f3sch.git@outlook.com >
Link: https://lore.kernel.org/r/651f51d9f92e8a445ceaf9f2073f16dd10458a74.1656667089.git.f3sch.git@outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-08 14:25:46 +02:00
Felix Schlepper
907d2772f7
Staging: rtl8192e: Remove unnecessary parentheses
...
This addresses an issue raised by checkpatch.pl:
$ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c
Unnecessary parentheses around wrqu->encoding
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Signed-off-by: Felix Schlepper <f3sch.git@outlook.com >
Link: https://lore.kernel.org/r/0e4e340be3f4c7f35a5381b726b1db5fc6842f10.1656667089.git.f3sch.git@outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-08 14:25:46 +02:00
Felix Schlepper
2393ef09ca
Staging: rtl8192e: Avoid multiple assignments
...
This addresses an issue raised by checkpatch.pl:
$ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c
CHECK: multiple assignments should be avoided
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Signed-off-by: Felix Schlepper <f3sch.git@outlook.com >
Link: https://lore.kernel.org/r/899a1010643a05668465069951518e5dcab9c77e.1656667089.git.f3sch.git@outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-08 14:25:45 +02:00
Felix Schlepper
177a561e0b
Staging: rtl8192e: Refactored rtllib_modes
...
The initial reason for looking at this code was an
issue raised by checkpatch.pl:
$ ./scripts/checkpatch.pl --terse -f drivers/staging/rtl8192e/rtllib_wx.c
CHECK: Please use a blank line after function/struct/union/enum
declarations
The additional blank line above the struct/before the headers is
just cleaner.
However, as it turns out since there is no str formatting required
One can replace the error prone str + size struct with a char array.
The rest of this patch fixes the usecases.
Tested-by: Philipp Hortmann <philipp.g.hortmann@gmail.com >
Signed-off-by: Felix Schlepper <f3sch.git@outlook.com >
Link: https://lore.kernel.org/r/4dbc4939e88a2c94f1819b4b0cc2c81dc332710b.1656667089.git.f3sch.git@outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-07-08 14:25:45 +02:00
Felix Schlepper
acde2522fa
Staging: rtl8192e: Cleaning up error handling
...
Moved error handling to one common block.
This removes double checking if all txb->fragments[]
were initialized.
The original code worked fine, but this is cleaner.
Signed-off-by: Felix Schlepper <f3sch.git@outlook.com >
Link: https://lore.kernel.org/r/13b32131cd00a1f0b8793657a24ada71240a8350.1656078068.git.f3sch.git@outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-06-27 13:50:03 +02:00
Felix Schlepper
9fdc63fe40
Staging: rtl8192e: Using kzalloc and delete memset
...
By using kzalloc, we can delete a memset. The practical difference
is that using kzalloc() will zero out the txb->fragments[] array.
The original code worked fine, but zeroing everything seems nicer.
Signed-off-by: Felix Schlepper <f3sch.git@outlook.com >
Link: https://lore.kernel.org/r/9727fe31c675f2f3052ca2fa586d137dd856ac91.1656078068.git.f3sch.git@outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-06-27 13:50:03 +02:00
Felix Schlepper
71eac0c07c
Staging: rtl8192e: Use struct_size
...
Using struct_size is encouraged because it is safer
than using sizeof and calculations by hand.
Signed-off-by: Felix Schlepper <f3sch.git@outlook.com >
Link: https://lore.kernel.org/r/54ea62a2b7628d3bdd5aa52df82c3e91704a2127.1656078068.git.f3sch.git@outlook.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-06-27 13:50:03 +02:00
Haowen Bai
37a3929feb
staging: rtl8192e: remove null check after call container_of()
...
container_of() will never return NULL, so remove useless code.
Signed-off-by: Haowen Bai <baihaowen@meizu.com >
Link: https://lore.kernel.org/r/1652696403-17852-1-git-send-email-baihaowen@meizu.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-05-19 17:42:43 +02:00
Solomon Tan
a7d1a80671
staging: rtl8192e: Remove u16 cast for u16 return value
...
Remove explicit u16 cast of the function Mk16 return value.
The variable hi does not need to be casted explicitly to u16 as it will
already be casted implicitly.
Signed-off-by: Solomon Tan <wjsota@gmail.com >
Link: https://lore.kernel.org/r/20220423130150.161903-8-wjsota@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-04-26 11:35:19 +02:00
Solomon Tan
c9c5f7e02b
staging: rtl8192e: Remove u16 cast for u32 parameter
...
The explicit u16 cast is not necessary because rtl92e_eeprom_read's
second parameter is defined to be u32.
Signed-off-by: Solomon Tan <wjsota@gmail.com >
Link: https://lore.kernel.org/r/20220423130150.161903-7-wjsota@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-04-26 11:35:18 +02:00
Solomon Tan
bd0b9adf35
staging: rtl8192e: Remove unnecessary u16 argument cast
...
Remove the explicit u16 casts for u16 argument in the function call. This
function has declared its parameter to be of type u16, so the argument
given to that parameter will be automatically coerced to u16. Therefore,
an explicit cast is unnecessary.
Signed-off-by: Solomon Tan <wjsota@gmail.com >
Link: https://lore.kernel.org/r/20220423130150.161903-6-wjsota@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-04-26 11:35:18 +02:00
Solomon Tan
0bc8b4b97b
staging: rtl8192e: Remove unnecessary u16 assignment cast
...
Remove the explicit casts in assignment statements for u16 variables.
Because these variables are declared as u16, there is implicit
conversion to u16 during the assignment, so an explicit cast is
unnecessary.
Signed-off-by: Solomon Tan <wjsota@gmail.com >
Link: https://lore.kernel.org/r/20220423130150.161903-5-wjsota@gmail.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org >
2022-04-26 11:35:18 +02:00