Re: [PATCH 01/11] scsi: ufs: core: Introduce a new ufshcd vops negotiate_pwr_mode()
From: Bart Van Assche
Date: Sun Mar 01 2026 - 12:53:33 EST
On 3/1/26 6:26 AM, Can Guo wrote:
On 2/28/2026 3:31 AM, Bart Van Assche wrote:Hi Can,
On 2/27/26 8:07 AM, Can Guo wrote:I got a warning from checkpatch.pl when I add the new vops, so I changed the same for
- return -ENOTSUPP;
+ return -EOPNOTSUPP;
Why has ENOTSUPP been changed into EOPNOTSUPP?
ufshcd_vops_pwr_change_notify() too.
WARNING: ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP
SUSv4 = Single UNIX Specification, Version 4. This is a standard that
defines how system calls should behave. Hence, ENOTSUPP must not be
returned as an error value by e.g. sysfs callbacks. As far as I know the
ufshcd_vops_pwr_change_notify() return value is never returned to user
space and hence returning ENOTSUPP from inside this function is fine.
If you want to keep this change in ufshcd_vops_pwr_change_notify()
please make it a separate patch.
Thanks,
Bart.