Messages in this thread | | | From | "Yu, Fenghua" <> | Date | Mon, 7 Nov 2011 11:57:37 -0800 | Subject | RE: [PATCH 7/9] x86/topology.c: Support functions for BSP online/offline |
| |
> > +static int bsp_hotpluggable; > > + > > +static int __init enable_bsp_hotplug(char *str) > > +{ > > + bsp_hotpluggable = 1; > > + return 0; > > Any reason why you return 0 here? Most code I have seen similar to this, > return 1. I understand that anything declared using early_param() would > generate a warning if it returns non-zero, but I am not exactly sure > about how it behaves with __setup(). Kindly give this some thought.
You're right. This function should return 1 here. The parameter setup function returns 1 for success and 0 for failure. The return value is checked in obsolete_checksetup(): } else if (p->setup_func(line + n)) return 1;
I will change this return value to 1 in the next version of the patch set.
BTW, some places in the current upstream do return 0 for success and return an error number for failure. Maybe we need to clean up them.
Thanks.
-Fenghua
| |