Re: [PATCH v2 2/2] usb: typec: tcpci: support setting orientation via GPIO

From: Greg Kroah-Hartman

Date: Thu Mar 12 2026 - 16:38:53 EST


On Thu, Mar 12, 2026 at 03:12:41PM -0400, Frank Li wrote:
> From: Frank Li (AI-BOT) <frank.li@xxxxxxx>
>
>
> > + err = orient_gpio ? 1 : 0;
>
> AI: Redundant ternary. Use `err = !!orient_gpio;` or `err = orient_gpio != NULL;`
> for clarity.

Better yet, never use ? :, just spell it out with a real if statement.
And ick, do NOT do that last option, go kick your AI bot, that's horrid.

thanks,

greg k-h