Messages in this thread Patch in this message | | | Date | Wed, 10 May 2006 15:56:20 +0530 | From | Balbir Singh <> | Subject | [PATCH][delayacct] Clean up coding style in taskstats interface (was Re: [updated] [Patch 5/8] taskstats interface) |
| |
On Mon, May 08, 2006 at 02:31:39PM -0700, Andrew Morton wrote: > Balbir Singh <balbir@in.ibm.com> wrote: > > > > + > > + if ((rc = genl_register_ops(&family, &taskstats_ops)) < 0) > > + goto err; > > rc = genl_register_ops(&family, &taskstats_ops); > if (rc < 0) > goto err; > > please.
Sure, here you go Andrew
I have updated the coding style as per your suggestion
Balbir Singh, Linux Technology Center, IBM Software Labs
Changelog
1. Split the complex if condition into a. function call b. check return status for error
Signed-off-by: Balbir Singh <balbir@in.ibm.com> ---
kernel/taskstats.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletion(-)
diff -puN kernel/taskstats.c~taskstats-interface-coding-style-cleanup kernel/taskstats.c --- linux-2.6.17-rc3/kernel/taskstats.c~taskstats-interface-coding-style-cleanup 2006-05-10 15:08:53.000000000 +0530 +++ linux-2.6.17-rc3-balbir/kernel/taskstats.c 2006-05-10 15:09:50.000000000 +0530 @@ -322,7 +322,8 @@ static int __init taskstats_init(void) return rc; family_registered = 1; - if ((rc = genl_register_ops(&family, &taskstats_ops)) < 0) + rc = genl_register_ops(&family, &taskstats_ops); + if (rc < 0) goto err; return 0; _ - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |