]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
pseries/papr-hvpipe: Refactor and simplify hvpipe_rtas_recv_msg()
authorRitesh Harjani (IBM) <ritesh.list@gmail.com>
Fri, 1 May 2026 04:11:47 +0000 (09:41 +0530)
committerMadhavan Srinivasan <maddy@linux.ibm.com>
Wed, 6 May 2026 02:00:25 +0000 (07:30 +0530)
commitfe53d2ae82c06aa2d6402624af01e8f8ddfcd5b3
tree1cf5d97dc4123787a762deff6e819c20f588d920
parent4e2d83c80495a9327141e8636f25dde13155f14f
pseries/papr-hvpipe: Refactor and simplify hvpipe_rtas_recv_msg()

Simplify hvpipe_rtas_recv_msg() by removing three levels of nesting...
if (!ret)
    if (buf)
if (size < bytes_written)
... this refactoring of the function bails out to "out:" label first, in case
of any error. This simplifies the init flow.

Signed-off-by: Ritesh Harjani (IBM) <ritesh.list@gmail.com>
Signed-off-by: Madhavan Srinivasan <maddy@linux.ibm.com>
Link: https://patch.msgid.link/bbe7ddf8b8e25c9be8fc5e2c4aea9e5fca128bf4.1777606826.git.ritesh.list@gmail.com
arch/powerpc/platforms/pseries/papr-hvpipe.c