> -----Original Message----- > From: Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx> > Sent: Friday, July 14, 2023 1:24 AM > To: Ping-Ke Shih <pkshih@xxxxxxxxxxx>; linux-wireless@xxxxxxxxxxxxxxx > Cc: Jes Sorensen <Jes.Sorensen@xxxxxxxxx> > Subject: Re: [PATCH RFC] wifi: rtl8xxxu: Fix the TX power of RTL8192CU, RTL8723AU > > On 10/07/2023 04:42, Ping-Ke Shih wrote: > > > > > >> -----Original Message----- > >> From: Bitterblue Smith <rtl8821cerfe2@xxxxxxxxx> > >> Sent: Monday, July 10, 2023 2:38 AM > >> To: linux-wireless@xxxxxxxxxxxxxxx > >> Cc: Jes Sorensen <Jes.Sorensen@xxxxxxxxx>; Ping-Ke Shih <pkshih@xxxxxxxxxxx> > >> Subject: [PATCH RFC] wifi: rtl8xxxu: Fix the TX power of RTL8192CU, RTL8723AU > >> > >> for (i = 0; i < 3; i++) { > >> if (i != 2) > >> - val8 = (mcsbase[0] > 8) ? (mcsbase[0] - 8) : 0; > >> + val8 = (val8 > 8) ? (val8 - 8) : 0; > >> else > >> - val8 = (mcsbase[0] > 6) ? (mcsbase[0] - 6) : 0; > >> + val8 = (val8 > 6) ? (val8 - 6) : 0; > > > > Would you like val8 = min_t(int, val8 - 6, 0); ? > > > > Even, merge two branches into one. > > base = i != 2 ? 8 : 6; > > val8 = min_t(int, val8 - base, 0); > > > > [...] > > > > I think max_t, but otherwise yes, that looks good. > Oops. You are right. Sorry for the mistakes.