On Mon, 2020-05-11 at 15:08 +0300, Luca Coelho wrote: > On Mon, 2020-05-11 at 14:47 +0300, Kalle Valo wrote: > > Luca Coelho <luca@xxxxxxxxx> writes: > > > > > From: Gil Adam <gil.adam@xxxxxxxxx> > > > > > > Evaluate the appropriate DSM from ACPI to enable 5.15,5.35 GHz > > > bands in Indonesia. If enabled send LARI_CONFIG_CHANGE cmd to fw. > > > > > > Signed-off-by: Gil Adam <gil.adam@xxxxxxxxx> > > > Signed-off-by: Luca Coelho <luciano.coelho@xxxxxxxxx> > > > > [...] > > > > > +static int iwl_mvm_eval_dsm_indonesia_5g2(struct iwl_mvm *mvm) > > > +{ > > > + int ret = iwl_acpi_get_dsm_u8((&mvm->fwrt)->dev, 0, > > > + DSM_FUNC_ENABLE_INDONESIA_5G2); > > > + > > > + IWL_DEBUG_RADIO(mvm, > > > + "Evaluated DSM function ENABLE_INDONESIA_5G2, ret=%d\n", > > > + ret); > > > + > > > + return ret == 1 ? 1 : 0; > > > > Ugh. If it's _really_ important not to return anything bigger than 1 > > maybe "!!ret"? Or maybe even just change the function to return boolean? > > Ugh, indeed. Guess who was not paying attention? Sorry. Actually the idea was to turn errors (negative numbers) into 0. But in any case, a boolean would be better here. This function was changed in a later patch snf handles more values, though. -- Luca.