]> 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)
commit1234029ff5413c7688e5c4c4af30854dfdcf196b
tree399a6a298666c9e39f288acbfd67fdb541d6babc
parentfc15cc2036e8c0b2e384887c77daa1947483f0f6
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