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)
commit8664240e303827de2d40f38fc397d1912309359c
treea66fb5abb214f3fd196f2bc9eb3792c93415707c
parent6ec99221d780b3b4b86cf9cdafc18699ff3d06c9
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