On Mon, Sep 30, 2024 at 01:08:42PM +0530, Raag Jadav wrote: > Now that we have device wedged event in place, add wedge_recovery sysfs > attribute which will expose recovery methods supported by the DRM device. > This is useful for userspace consumers in cases where the device supports > multiple recovery methods which can be used as fallbacks. > > $ cat /sys/class/drm/card<N>/wedge_recovery > rebind > bus-reset > reboot ... > +static ssize_t wedge_recovery_show(struct device *device, > + struct device_attribute *attr, char *buf) Looking at the below line it seems you are fine with 100 limit, so, why two lines above if they perfectly fit 100? > +{ > + struct drm_minor *minor = to_drm_minor(device); > + struct drm_device *dev = minor->dev; > + unsigned int method, count = DRM_WEDGE_RECOVERY_REBIND; > + > + for_each_set_bit(method, &dev->wedge_recovery, DRM_WEDGE_RECOVERY_MAX) > + count += sysfs_emit_at(buf, count, "%s\n", drm_wedge_recovery_name(method)); > + > + return count; > +} -- With Best Regards, Andy Shevchenko