lkml.org 
[lkml]   [2023]   [Aug]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRE: [PATCH v1 1/2] mlxbf-bootctl: Support the large icmc write/read
Date
> > +	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.


\
 
 \ /
  Last update: 2023-08-09 18:14    [W:0.095 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site