On 19.12.23 15:26, Wen Gu wrote: > The structs of CLC accept and confirm messages for SMCv1 and SMCv2 are > separately defined and often casted to each other in the code, which may > increase the risk of errors caused by future divergence of them. So > unify them into one struct for better maintainability. > > Suggested-by: Alexandra Winter <wintera@xxxxxxxxxxxxx> > Signed-off-by: Wen Gu <guwen@xxxxxxxxxxxxxxxxx> > --- > net/smc/af_smc.c | 52 +++++++++++++------------------------ > net/smc/smc_clc.c | 65 ++++++++++++++++++++--------------------------- > net/smc/smc_clc.h | 42 +++++++++++++----------------- > 3 files changed, 62 insertions(+), 97 deletions(-) Thanks a lot Wen Gu, I really love this. Using an unnamed union is a great solution here. Now the code is so much more readable and maintainable Reviewed-by: Alexandra Winter <wintera@xxxxxxxxxxxxx>