]> git.baikalelectronics.ru Git - kernel.git/commit
NTB: Fix macro parameter conflict with field name
authorAllen Hubbe <Allen.Hubbe@emc.com>
Thu, 21 Jan 2016 17:53:50 +0000 (12:53 -0500)
committerJon Mason <jdmason@kudzu.us>
Fri, 22 Jan 2016 00:53:10 +0000 (19:53 -0500)
commitae41f31171d89b07ec2b40ebc74f3f78f169d0fa
tree422138c80c662335ebe55f9cd84c2cb1685d317f
parentdbd66e2cf2c2acaff8cd8a9fe7c74fdb1b0e1df3
NTB: Fix macro parameter conflict with field name

If the parameter given to the macro is replaced throughout the macro as
it is evaluated.  The intent is that the macro parameter should replace
the only the first parameter to container_of().  However, the way the
macro was written, it would also inadvertantly replace a structure field
name.  If a parameter of any other name is given to the macro, it will
fail to compile, if the structure does not contain a field of the same
name.  At worst, it will compile, and hide improper access of an
unintended field in the structure.

Change the macro parameter name, so it does not conflict with the
structure field name.

Signed-off-by: Allen Hubbe <Allen.Hubbe@emc.com>
Acked-by: Dave Jiang <dave.jiang@intel.com>
Signed-off-by: Jon Mason <jdmason@kudzu.us>
drivers/ntb/hw/intel/ntb_hw_intel.h