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: <aRHBxiOy5ecYkggI@smile.fi.intel.com>
Date: Mon, 10 Nov 2025 12:43:18 +0200
From: Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To: Praveen Kumar <kpraveen.lkml@...il.com>
Cc: dmaengine@...r.kernel.org, linux-kernel@...r.kernel.org,
	Vinod Koul <vkoul@...nel.org>
Subject: Re: [PATCH v2 2/3] dmaengine: Use device_match_of_node() helper

On Mon, Nov 10, 2025 at 11:20:33AM +0100, Praveen Kumar wrote:
> On Mon, Nov 10, 2025 at 09:47:44AM +0100, Andy Shevchenko wrote:
> > Instead of open coding, use device_match_of_node() helper.

...

> > -		if (np && device->dev->of_node && np != device->dev->of_node)
> > +		if (np && !device_match_of_node(device->dev, np))
> 
> I see a difference in what device_match_of_node does vs what was
> happening in the previous check. And, we have an unwanted double
> check of np.

Nope.

> int device_match_of_node(struct device *dev, const void *np)
> {
>         return np && dev->of_node == np;
> }
> 
> Instead, I would recommend,
> 
>         if (device->dev->of_node && !device_match_of_node(device->dev, np))
>                 continue;

This will be the wrong check. Think about it, yeah, it's not so trivial check
and hence the change.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ