public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Greg KH <greg@kroah.com>
Cc: Mario Limonciello <mario.limonciello@amd.com>,
	heikki.krogerus@linux.intel.com, rafael@kernel.org,
	ajayg@nvidia.com, linux-i2c@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-usb@vger.kernel.org, Evan.Quan@amd.com, Lijo.Lazar@amd.com,
	Sanket.Goswami@amd.com
Subject: Re: [PATCH 2/2] usb: typec: ucsi: Don't create power supplies for dGPUs
Date: Wed, 17 May 2023 22:14:01 +0300	[thread overview]
Message-ID: <ZGUneSmV6dJBk7AO@smile.fi.intel.com> (raw)
In-Reply-To: <2023051742-guiding-footing-3527@gregkh>

On Wed, May 17, 2023 at 08:58:49PM +0200, Greg KH wrote:
> On Wed, May 17, 2023 at 08:14:13PM +0300, Andy Shevchenko wrote:
> > On Tue, May 16, 2023 at 01:25:41PM -0500, Mario Limonciello wrote:

...

> > > +static const struct property_entry dgpu_properties[] = {
> > > +	/* USB-C doesn't power the system */
> > > +	PROPERTY_ENTRY_U8("scope", POWER_SUPPLY_SCOPE_DEVICE),
> > > +	{},
> > 
> > Comma is not needed in terminator entry.
> 
> But it's encouraged!

Why?! This might lead to the subtle mistakes going unnoticed during rebases.
Yes, it's quite unlikely, but it might be still possible to have the empty
entry in the middle of the array. Why should we shoot ourselves in the foot
if we can avoid it without any effort?

Hence I can say it's discouraged.

-- 
With Best Regards,
Andy Shevchenko



  reply	other threads:[~2023-05-17 19:14 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-16 18:25 [PATCH 0/2] Adjust logic for power_supply_is_system_supplied() Mario Limonciello
2023-05-16 18:25 ` [PATCH 1/2] power: supply: Use the scope of power supplies to tell if power is system supplied Mario Limonciello
2023-05-16 20:41   ` Sebastian Reichel
2023-05-16 20:44     ` Limonciello, Mario
2023-05-16 21:54       ` Sebastian Reichel
2023-05-16 18:25 ` [PATCH 2/2] usb: typec: ucsi: Don't create power supplies for dGPUs Mario Limonciello
2023-05-17 17:14   ` Andy Shevchenko
2023-05-17 18:58     ` Greg KH
2023-05-17 19:14       ` Andy Shevchenko [this message]
2023-05-18 15:31         ` Limonciello, Mario
2023-05-17  1:22 ` [PATCH 0/2] Adjust logic for power_supply_is_system_supplied() Quan, Evan
2023-05-17 17:15   ` andriy.shevchenko

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=ZGUneSmV6dJBk7AO@smile.fi.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=Evan.Quan@amd.com \
    --cc=Lijo.Lazar@amd.com \
    --cc=Sanket.Goswami@amd.com \
    --cc=ajayg@nvidia.com \
    --cc=greg@kroah.com \
    --cc=heikki.krogerus@linux.intel.com \
    --cc=linux-i2c@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mario.limonciello@amd.com \
    --cc=rafael@kernel.org \
    /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