]> git.baikalelectronics.ru Git - kernel.git/commit
net: atlantic: add alignment checks in hw_atl2_utils_fw.c
authorMark Starovoytov <mstarovoitov@marvell.com>
Fri, 26 Jun 2020 18:40:37 +0000 (21:40 +0300)
committerDavid S. Miller <davem@davemloft.net>
Fri, 26 Jun 2020 23:32:51 +0000 (16:32 -0700)
commitd2900e91522744d7fff1cab786186e2bd4199f24
treea66fb5abb214f3fd196f2bc9eb3792c93415707c
parent82983fca74a6793105e0741bf38b1a2ee5d8e888
net: atlantic: add alignment checks in hw_atl2_utils_fw.c

This patch adds alignment checks in all the helper macros in
hw_atl2_utils_fw.c
These alignment checks are compile-time, so runtime is not affected.

All these helper macros assume the length to be aligned (multiple of 4).
If it's not aligned, then there might be issues, e.g. stack corruption.

Signed-off-by: Mark Starovoytov <mstarovoitov@marvell.com>
Signed-off-by: Igor Russkikh <irusskikh@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/aquantia/atlantic/hw_atl2/hw_atl2_utils_fw.c