]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: dsa: mt7530: simplify core operations
authorArınç ÜNAL <arinc.unal@arinc9.com>
Thu, 18 Apr 2024 05:35:31 +0000 (08:35 +0300)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 23 Apr 2024 08:32:40 +0000 (10:32 +0200)
commit7c5e37d7ee78d163cb6e04dd00f44731e0d5d8fb
tree2fb98640fa1c6613d94c26ae1b5e92a029fb4ff9
parent868ff5f4944aa90f649de59440abf48bf693680e
net: dsa: mt7530: simplify core operations

The core_rmw() function calls core_read_mmd_indirect() to read the
requested register, and then calls core_write_mmd_indirect() to write the
requested value to the register. Because Clause 22 is used to access Clause
45 registers, some operations on core_write_mmd_indirect() are
unnecessarily run. Get rid of core_read_mmd_indirect() and
core_write_mmd_indirect(), and run only the necessary operations on
core_write() and core_rmw().

Reviewed-by: Daniel Golle <daniel@makrotopia.org>
Tested-by: Daniel Golle <daniel@makrotopia.org>
Signed-off-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/dsa/mt7530.c