On Wed, Feb 10, 2016 at 4:15 PM, Oliver Neukum <oneukum@xxxxxxxx> wrote: > On Wed, 2016-02-10 at 13:56 +0200, Andy Shevchenko wrote: >> > +err: >> > + if (i > 0) >> > + for (; i >= 0; i--, con--) >> > + typec_unregister_port(con->port); >> >> Perhaps >> >> while (--i >= 0) { >> ... >> } > > While we are at it. No we should not change the semantics > of conditionals for the sake of appearance. I'm sorry I didn't get you. How this more or less standard pattern to clean up stuff on error path does with conditional semantics? I also noticed that this code might be factored out to helper which will do same things (only number of loops is different) in both cases. What did I miss? -- With Best Regards, Andy Shevchenko -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html