RE: [PATCH v1 1/2] mlxbf-bootctl: Support the large icmc write/read
From: Asmaa Mnebhi
Date: Wed Aug 09 2023 - 12:13:30 EST
> > + err = kstrtoul(buf, 16, &icm_data);
> > + if (err)
> > + return err;
>
> I suggest using define instead of 16.
Done.
> > +
> > + if (((icm_data != 0) && (icm_data < 0x80)) ||
> > + (icm_data > 0x100000) || (icm_data % 128))
> > + return -EPERM;
>
> You can remove reduce '()' and I suggest for to use for consistency 128:
> Instead of 128 and 0x80
> If ((icm_data > 0 && icm_data < 128)
>
> Probably consider to use defines also for the above magic.
Done.