Re: [PATCH v2 3/8] scsi: ufs: core: Add a vops to map clock frequency to gear speed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 1/22/25 11:40 PM, Ziqi Chen wrote:
In ufshcd-priv.h , the function name of all vop wrapping APIs have the same prefix "ufshcd_vops", I need to use the same format as them.

That sounds fair to me.

As for return the gear value as the function result. In our original design, we also return gear result for this function, but finally we want to use return value to indicate the status , e.g,, if vendor doesn't implement this vop, we return -EOPNOTSUPP , if there is no matched gear to the freq , we return -EINVAL. Although we didn't check the return value in this series, we still want to preserve this extensibility in case this function be used to other where in the future.

There are many functions in the Linux kernel that either return a
negative error code or a positive value in case of success. Regarding
future extensibility, we can't know how this function will evolve in the
future. This is not an argument to keep the approach of separate error
codes (return value) and gear values (gear argument).

Thanks,

Bart.





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [Linux for Sparc]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]

  Powered by Linux