Re: [PATCH 1/4] regmap: sdw: move to -EOPNOTSUPP
From: Pierre-Louis Bossart
Date: Tue Aug 25 2020 - 18:09:01 EST
-ENOTSUPP is not a valid error code, use recommended value instead.
What makes you say this - it's what regmap uses internally for
unsupported operations?
This was flagged by scripts/checkpatch.pl (must be a new addition).
# ENOTSUPP is not a standard error code and should be avoided in new
patches.
# Folks usually mean EOPNOTSUPP (also called ENOTSUP), when they type
ENOTSUPP.
# Similarly to ENOSYS warning a small number of false positives is expected.
if (!$file && $line =~ /\bENOTSUPP\b/) {
if (WARN("ENOTSUPP",
"ENOTSUPP is not a SUSV4 error code, prefer EOPNOTSUPP\n" .
$herecurr) &&
$fix) {
$fixed[$fixlinenr] =~ s/\bENOTSUPP\b/EOPNOTSUPP/;
}
}
I was just blindly making checkpatch happy and tried to keep
regmap-sdw.c and regmap-sdw-mbq aligned.