lkml.org 
[lkml]   [2021]   [Nov]   [15]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v3 06/13] peci: Add device detection
On Mon, Nov 15, 2021 at 07:25:45PM +0100, Iwona Winiarska wrote:
> +void peci_device_destroy(struct peci_device *device)
> +{
> + bool killed;
> +
> + device_lock(&device->dev);
> + killed = kill_device(&device->dev);

Eeek, why call this?

> + device_unlock(&device->dev);
> +
> + if (!killed)
> + return;

What happened if something changed after you unlocked it?

Why is kill_device() required at all? That's a very rare function to
call, and one that only one "bus" calls today because it is very
special (i.e. crazy and broken...)

thanks,

greg k-h

\
 
 \ /
  Last update: 2021-11-16 01:43    [W:0.220 / U:5.924 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site