Re: [Intel-gfx] [RFC 1/8] drm/i915: Expose list of clients in sysfs

Chris Wilson
2020-01-10T13:37:12Z

Quoting Tvrtko Ursulin (2020-01-10 13:30:42)
> +static ssize_t
> +show_client_name(struct device *kdev, struct device_attribute *attr, char *buf)
> +{
> + struct i915_drm_client *client =
> + container_of(attr, typeof(*client), attr.name);
> +
> + return snprintf(buf, PAGE_SIZE, "%s%s%s",
> + client->closed ? "<" : "",
> + client->name,
> + client->closed ? ">" : "");

client->closed ? "<%s>" : "%s", unspeakably evil?
-Chris