firmware: turris-mox-rwtm: Use EOPNOTSUPP instead of ENOSYS
authorMarek Behún <kabel@kernel.org>
Sat, 31 Aug 2024 09:20:48 +0000 (11:20 +0200)
committerArnd Bergmann <arnd@arndb.de>
Mon, 2 Sep 2024 09:42:10 +0000 (09:42 +0000)
Checkpatch warns agains -ENOSYS:
  WARNING: ENOSYS means 'invalid syscall nr' and nothing else
Use EOPNOTSUPP instead.

Signed-off-by: Marek Behún <kabel@kernel.org>
Reviewed-by: Andy Shevchenko <andy@kernel.org>
Link: https://lore.kernel.org/r/20240831092050.23093-15-kabel@kernel.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
drivers/firmware/turris-mox-rwtm.c

index 52f9723..a939170 100644 (file)
@@ -137,7 +137,7 @@ static int mox_get_status(enum mbox_cmd cmd, u32 retval)
        else if (MBOX_STS_ERROR(retval) == MBOX_STS_FAIL)
                return -(int)MBOX_STS_VALUE(retval);
        else if (MBOX_STS_ERROR(retval) == MBOX_STS_BADCMD)
-               return -ENOSYS;
+               return -EOPNOTSUPP;
        else if (MBOX_STS_ERROR(retval) != MBOX_STS_SUCCESS)
                return -EIO;
        else
@@ -185,7 +185,7 @@ static int mox_get_board_info(struct mox_rwtm *rwtm)
        if (ret == -ENODATA) {
                dev_warn(dev,
                         "Board does not have manufacturing information burned!\n");
-       } else if (ret == -ENOSYS) {
+       } else if (ret == -EOPNOTSUPP) {
                dev_notice(dev,
                           "Firmware does not support the BOARD_INFO command\n");
        } else if (ret < 0) {
@@ -219,7 +219,7 @@ static int mox_get_board_info(struct mox_rwtm *rwtm)
        ret = mox_get_status(MBOX_CMD_ECDSA_PUB_KEY, reply->retval);
        if (ret == -ENODATA) {
                dev_warn(dev, "Board has no public key burned!\n");
-       } else if (ret == -ENOSYS) {
+       } else if (ret == -EOPNOTSUPP) {
                dev_notice(dev,
                           "Firmware does not support the ECDSA_PUB_KEY command\n");
        } else if (ret < 0) {