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

Lucas De Marchi lucas.demarchi at intel.com
Wed Apr 10 13:49:31 UTC 2024


On Wed, Apr 10, 2024 at 01:46:12PM +0530, Ghimiray, Himal Prasad wrote:
>
>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.|

you are not ignoring, you are passing it to the caller. If the caller is
ignoring it, then it's another problem

Lucas De Marchi

>
>>
>>
>>Lucas De Marchi


More information about the Intel-xe mailing list