[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <MN2PR12MB39020C538F982DB0B1F0434CD712A@MN2PR12MB3902.namprd12.prod.outlook.com>
Date: Wed, 9 Aug 2023 16:13:23 +0000
From: Asmaa Mnebhi <asmaa@...dia.com>
To: Vadim Pasternak <vadimp@...dia.com>,
"markgross@...nel.org" <markgross@...nel.org>,
"hdegoede@...hat.com" <hdegoede@...hat.com>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: RE: [PATCH v1 1/2] mlxbf-bootctl: Support the large icmc write/read
> > + 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.
Powered by blists - more mailing lists