Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit fd181f7d authored by Arnd Bergmann's avatar Arnd Bergmann Committed by Greg Kroah-Hartman
Browse files

staging/rtl8192e: avoid comparing unsigned type >= 0



There is one remaining warning about a type limit check in rtl8192e:

staging/rtl8192e/rtl819x_TSProc.c:326:14: error: comparison is always true due to limited range of data type [-Werror=type-limits]

This changes a macro into a local function to clarify the types and simplify
the check while removing the warning.

Signed-off-by: default avatarArnd Bergmann <arnd@arndb.de>
Acked-by: default avatarJes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 5d5fd353
Loading
Loading
Loading
Loading
+0 −3
Original line number Original line Diff line number Diff line
@@ -169,9 +169,6 @@ union qos_tclas {
	} TYPE2_8021Q;
	} TYPE2_8021Q;
};
};


#define IsACValid(ac)		((ac >= 0 && ac <= 7) ? true : false)


union aci_aifsn {
union aci_aifsn {
	u8	charData;
	u8	charData;


+5 −0
Original line number Original line Diff line number Diff line
@@ -306,6 +306,11 @@ static void MakeTSEntry(struct ts_common_info *pTsCommonInfo, u8 *Addr,
	pTsCommonInfo->TClasNum = TCLAS_Num;
	pTsCommonInfo->TClasNum = TCLAS_Num;
}
}


static bool IsACValid(unsigned int tid)
{
	return tid < 7;
}

bool GetTs(struct rtllib_device *ieee, struct ts_common_info **ppTS,
bool GetTs(struct rtllib_device *ieee, struct ts_common_info **ppTS,
	   u8 *Addr, u8 TID, enum tr_select TxRxSelect, bool bAddNewTs)
	   u8 *Addr, u8 TID, enum tr_select TxRxSelect, bool bAddNewTs)
{
{