kernek: use struct_group to wipe ar8216 volatile priv data
authorChristian Marangi <ansuelsmth@gmail.com>
Mon, 22 May 2023 00:34:20 +0000 (02:34 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Mon, 22 May 2023 20:28:18 +0000 (22:28 +0200)
commit0605fa693e3ae5266c6d9b0a291ee12a3adac09b
tree2b53981580abf7da86a2d18b087cbc1e709580e3
parentfb6de77a824d6d7542ad314721448fcb8c6ccc1a
kernek: use struct_group to wipe ar8216 volatile priv data

Instead of reference vlan and do strange subtraction, use the handy
struct_group() to create a virtual struct of the same size of the
members. This permits to have a more secure memset and fix compilation
warning in 6.1 where additional checks are done.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
target/linux/generic/files/drivers/net/phy/ar8216.c
target/linux/generic/files/drivers/net/phy/ar8216.h