Re: [PATCH v1 1/1] ACPI: NFIT: Import GUID before use

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Apr 16, 2021 at 8:28 AM Dan Williams <dan.j.williams@xxxxxxxxx> wrote:
>
> On Thu, Apr 15, 2021 at 6:59 AM Andy Shevchenko
> <andriy.shevchenko@xxxxxxxxxxxxxxx> wrote:
> >
> > Strictly speaking the comparison between guid_t and raw buffer
> > is not correct. Import GUID to variable of guid_t type and then
> > compare.
>
> Hmm, what about something like the following instead, because it adds
> safety. Any concerns about evaluating x twice in a macro should be
> alleviated by the fact that ARRAY_SIZE() will fail the build if (x) is
> not an array.

ARRAY_SIZE doesn't check type.
I don't like hiding ugly casts like this.


-- 
With Best Regards,
Andy Shevchenko



[Index of Archives]     [Linux IBM ACPI]     [Linux Power Management]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]     [Linux Resources]

  Powered by Linux