Re: [PATCH] staging: rtl8723bs: remove copy function

From: Andy Shevchenko

Date: Fri Mar 20 2026 - 15:26:52 EST


On Fri, Mar 20, 2026 at 10:19:59PM +0300, Bera Yüzlü wrote:
> On Fri, 20 Mar 2026 11:25:08 -0700, Bera Yüzlü wrote:
> > On Fri, 20 Mar 2026 08:27:22 +0000, Andy Shevchenko wrote:

...

> > > > - GetU1ByteIntegerFromStringInDecimal((s8 *)Channel, &channel);
> > > > - GetU1ByteIntegerFromStringInDecimal((s8 *)PowerLimit, &powerLimit);
> > > > + ret = kstrtou8((const char *)Channel, 10, &channel);
> > > > + if (ret)
> > > > + return;
> > > > +
> > > > + ret = kstrtou8((const char *)PowerLimit, 10, &powerLimit);
> > > > + if (ret)
> > > > + return;
> > >
> > > This will change behaviour on the invalid data. Before it was just partially
> > > converted here and continue, now it breaks an execution. The commit message
> > > does not explain if it's safe to do or not (i.o.w. if there is a guarantee
> > > that in current state the input will be always in the correct form).
> >
> > > Otherwise, you probably want to use one of simple_strtou*().
> >
> > It only indirectly called from ODM_ReadAndConfig_MP_8723B_TXPWR_LMT() with constant values.
> > Maybe we can convert this strings to ints so we don't need to do it at runtime.
> > We can also remove the wrapper odm_ConfigBB_TXPWR_LMT_8723B(). This should be a seperate
> > patch, right?
>
> Just noticed ODM_ReadAndConfig_MP_8723B_TXPWR_LMT() didn't called anywhere.
> I will remove:
> GetU1ByteIntegerFromStringInDecimal()
> PHY_SetTxPowerLimit()
> odm_ConfigBB_TXPWR_LMT_8723B()
> ODM_ReadAndConfig_MP_8723B_TXPWR_LMT()
> in v2. They are all unusued.

Sounds good to me.

--
With Best Regards,
Andy Shevchenko