nfit: Account for table size length variation
authorLinda Knippers <linda.knippers@hpe.com>
Sat, 21 Nov 2015 00:05:47 +0000 (19:05 -0500)
committerDan Williams <dan.j.williams@intel.com>
Mon, 30 Nov 2015 22:22:35 +0000 (14:22 -0800)
commit826c416f3c9493b69630a811832cfb7c9007f840
tree399a6a298666c9e39f288acbfd67fdb541d6babc
parentbc0d0d093b379b0b379c429e3348498287c8a9ca
nfit: Account for table size length variation

The size of NFIT tables don't necessarily match the size of the
data structures that we use for them.  For example, the NVDIMM
Control Region Structure table is shorter for a device with
no block control windows than for a device with block control windows.
Other tables, such as Flush Hint Address Structure and the Interleave
Structure are variable length by definition.

Account for the size difference when comparing table entries by
using the actual table size from the table header if it's less
than the structure size.

Signed-off-by: Linda Knippers <linda.knippers@hpe.com>
Acked-by: Vishal Verma <vishal.l.verma@intel.com>
Signed-off-by: Dan Williams <dan.j.williams@intel.com>
drivers/acpi/nfit.c