]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitf7b0e613d7a5d19884e4d4eb19e7c23a3bbc7376
tree399a6a298666c9e39f288acbfd67fdb541d6babc
parent67e78b2a517fe3e00e56a930a5f39d20ffc8691b
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