public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: Frank Li <Frank.Li@nxp.com>
Cc: Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>, Li Jun <jun.li@nxp.com>,
	Badhri Jagan Sridharan <badhri@google.com>,
	Heikki Krogerus <heikki.krogerus@linux.intel.com>,
	linux-usb@vger.kernel.org, imx@lists.linux.dev,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Xu Yang <xu.yang_2@nxp.com>
Subject: Re: [PATCH v2 2/2] usb: typec: tcpci: support setting orientation via GPIO
Date: Thu, 12 Mar 2026 21:27:09 +0100	[thread overview]
Message-ID: <2026031239-icky-volumes-f4f3@gregkh> (raw)
In-Reply-To: <20260312191243.3479247-1-Frank.Li@nxp.com>

On Thu, Mar 12, 2026 at 03:12:41PM -0400, Frank Li wrote:
> From: Frank Li (AI-BOT) <frank.li@nxp.com>
> 
> 
> > +		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

  reply	other threads:[~2026-03-12 20:29 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-12  8:07 [PATCH v2 0/2] usb: typec: tcpci: support setting orientation via GPIO Xu Yang
2026-03-12  8:07 ` [PATCH v2 1/2] dt-bindings: usb: nxp,ptn5110: add optional orientation-gpios property Xu Yang
2026-03-14  0:21   ` Rob Herring (Arm)
2026-03-12  8:07 ` [PATCH v2 2/2] usb: typec: tcpci: support setting orientation via GPIO Xu Yang
2026-03-12 19:12   ` Frank Li
2026-03-12 20:27     ` Greg Kroah-Hartman [this message]
2026-03-12 20:50       ` Frank Li
2026-03-13  2:03     ` Xu Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2026031239-icky-volumes-f4f3@gregkh \
    --to=gregkh@linuxfoundation.org \
    --cc=Frank.Li@nxp.com \
    --cc=badhri@google.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=imx@lists.linux.dev \
    --cc=jun.li@nxp.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=xu.yang_2@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox