RE: [PATCH 2/2] usb: typec: ucsi: Don't create power supplies for dGPUs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



[AMD Official Use Only - General]

> -----Original Message-----
> From: Andy Shevchenko <andriy.shevchenko@xxxxxxxxxxxxxxx>
> Sent: Wednesday, May 17, 2023 2:14 PM
> To: Greg KH <greg@xxxxxxxxx>
> Cc: Limonciello, Mario <Mario.Limonciello@xxxxxxx>;
> heikki.krogerus@xxxxxxxxxxxxxxx; rafael@xxxxxxxxxx; ajayg@xxxxxxxxxx; linux-
> i2c@xxxxxxxxxxxxxxx; linux-pm@xxxxxxxxxxxxxxx; linux-kernel@xxxxxxxxxxxxxxx;
> linux-usb@xxxxxxxxxxxxxxx; Quan, Evan <Evan.Quan@xxxxxxx>; Lazar, Lijo
> <Lijo.Lazar@xxxxxxx>; Goswami, Sanket <Sanket.Goswami@xxxxxxx>
> Subject: Re: [PATCH 2/2] usb: typec: ucsi: Don't create power supplies for
> dGPUs
>
> 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.
>

I tend to agree with Andy here, you should never be placing something after the
terminator entry and putting a comma there means a mistake /can/ happen.
I will pick up the tags and respin a v2 with this changed and patch 1 dropped
since it went through another tree.




[Index of Archives]     [Linux Media]     [Linux Input]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [Old Linux USB Devel Archive]

  Powered by Linux