lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAHp75Vfj1RDSv2gX=NokEaXgcD9W83V_sYwyTP35a1BfosCFXg@mail.gmail.com>
Date: Sat, 6 May 2023 14:34:30 +0300
From: Andy Shevchenko <andy.shevchenko@...il.com>
To: Jiawen Wu <jiawenwu@...stnetic.com>
Cc: netdev@...r.kernel.org, jarkko.nikula@...ux.intel.com, 
	andriy.shevchenko@...ux.intel.com, mika.westerberg@...ux.intel.com, 
	jsd@...ihalf.com, Jose.Abreu@...opsys.com, andrew@...n.ch, 
	hkallweit1@...il.com, linux@...linux.org.uk, linux-i2c@...r.kernel.org, 
	linux-gpio@...r.kernel.org, mengyuanlou@...-swift.com
Subject: Re: [RFC PATCH net-next v6 2/9] i2c: designware: Add driver support
 for Wangxun 10Gb NIC

On Sat, May 6, 2023 at 12:29 PM Jiawen Wu <jiawenwu@...stnetic.com> wrote:
> On Saturday, May 6, 2023 4:11 AM, andy.shevchenko@...il.com wrote:
> > Fri, May 05, 2023 at 09:48:01PM +0300, andy.shevchenko@...il.com kirjoitti:
> > > Fri, May 05, 2023 at 03:42:21PM +0800, Jiawen Wu kirjoitti:

...

> > > > + device_property_read_u32(&pdev->dev, "wx,i2c-snps-model", &dev->flags);
> > >
> > > I believe in your case it should be named something like
> > > "linux,i2c-synopsys-platform". But in any case this I leave
> > > to the more experienced people.
> >
> > Or "snps,i2c-platform", I dunno...
>
> I thought you wanted me to introduce a property specific to my device,
> so I named it "wx,...".

But the property meaning is not in this case. If you want the specific
one, it should be boolean (it's also a possible way to go):

  if (device_property_present(...))
    dev->flags |= MODEL_...;

> But if it's a universal property for platform device,
> maybe it's necessary to check if flag is NULL, otherwise the second result
> will overwrite it.

Right. With boolean like above it will be more robust.

-- 
With Best Regards,
Andy Shevchenko

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ