Skip to content

Commit

Permalink
wifi: rtl8xxxu: Remove always true condition in rtl8xxxu_print_chipinfo
Browse files Browse the repository at this point in the history
[ Upstream commit b9b1e4f ]

Fix a new smatch warning:
drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c:1580 rtl8xxxu_print_chipinfo() warn: always true condition '(priv->chip_cut <= 15) => (0-15 <= 15)'

Reported-by: kernel test robot <lkp@intel.com>
Link: https://lore.kernel.org/oe-kbuild-all/202302140753.71IgU77A-lkp@intel.com/
Fixes: 7b0ac46 ("wifi: rtl8xxxu: Recognise all possible chip cuts")
Signed-off-by: Bitterblue Smith <rtl8821cerfe2@gmail.com>
Reviewed-by: Ping-Ke Shih <pkshih@realtek.com>
Signed-off-by: Kalle Valo <kvalo@kernel.org>
Link: https://lore.kernel.org/r/68eff98b-a022-5a00-f330-adf623a35772@gmail.com
Signed-off-by: Sasha Levin <sashal@kernel.org>
  • Loading branch information
Bitterblue Smith authored and gregkh committed May 11, 2023
1 parent 5d7aeb3 commit 3f15d8e
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions drivers/net/wireless/realtek/rtl8xxxu/rtl8xxxu_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -1575,11 +1575,7 @@ rtl8xxxu_set_spec_sifs(struct rtl8xxxu_priv *priv, u16 cck, u16 ofdm)
static void rtl8xxxu_print_chipinfo(struct rtl8xxxu_priv *priv)
{
struct device *dev = &priv->udev->dev;
char cut = '?';

/* Currently always true: chip_cut is 4 bits. */
if (priv->chip_cut <= 15)
cut = 'A' + priv->chip_cut;
char cut = 'A' + priv->chip_cut;

dev_info(dev,
"RTL%s rev %c (%s) romver %d, %iT%iR, TX queues %i, WiFi=%i, BT=%i, GPS=%i, HI PA=%i\n",
Expand Down

0 comments on commit 3f15d8e

Please sign in to comment.