[PATCH][delayacct] Clean up coding style in taskstats interface (was Re: [updated] [Patch 5/8] taskstats interface)

From: Balbir Singh
Date: Wed May 10 2006 - 06:29:59 EST


On Mon, May 08, 2006 at 02:31:39PM -0700, Andrew Morton wrote:
> Balbir Singh <balbir@xxxxxxxxxx> 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@xxxxxxxxxx>
---

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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/