[PATCH v2 2/4] drm/xe: Incase of action add failure, remove sysfs only once.

Ghimiray, Himal Prasad himal.prasad.ghimiray at intel.com
Wed Apr 10 08:16:12 UTC 2024


On 10-04-2024 01:22, Lucas De Marchi wrote:
> On Mon, Apr 08, 2024 at 08:19:42PM +0530, Himal Prasad Ghimiray wrote:
>> The drmm_add_action_or_reset function automatically invokes the action
>> (sysfs removal) in the event of a failure; therefore, there's no
>> necessity to call it within the return check. Additionally, it issues a
>> warning regarding the failure to add the action. Consequently, there's
>> no requirement to print a nearly identical warning within the xe driver.
>
> there's actually no need to print a warning at all? If we already add a
> warning in drmm_add_action_or_reset(), that should be sufficient.

Indeed, you are correct regarding the warning need. Including the 
warning print from driver doesn't offer any additional benefit. However, 
I opted to modify it and maintain the warning print in this scenario to 
prevent the potential noise that might arise from the static analyzer 
detecting an unhandled return type from |drmm_add_action_or_reset.|

>
>
> Lucas De Marchi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/intel-xe/attachments/20240410/51fc1f6b/attachment.htm>


More information about the Intel-xe mailing list