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

From: Frank Li

Date: Thu Mar 12 2026 - 16:50:36 EST


On Thu, Mar 12, 2026 at 09:27:09PM +0100, Greg Kroah-Hartman wrote:
> 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.

last option is bad, I have not remove it when I review AI's result because
I think first one look good. I generally just remove whole sentense from AI.

Frank
>
> thanks,
>
> greg k-h