]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
soc/tegra: bpmp: Use ENODEV instead of ENOTSUPP
authorThierry Reding <treding@nvidia.com>
Thu, 26 Mar 2026 11:28:31 +0000 (12:28 +0100)
committerThierry Reding <treding@nvidia.com>
Fri, 27 Mar 2026 15:30:54 +0000 (16:30 +0100)
ENOTSUPP is not a SUSV4 error code and checkpatch will warn about it.
It is also not very descriptive in the context of BPMP, so use the
ENODEV error code instead. For the stub implementations this is a more
accurate description of what the failure is.

Signed-off-by: Thierry Reding <treding@nvidia.com>
include/soc/tegra/bpmp.h

index 822851ef4bf8817291c5409accb1b7d3de76005a..a33582590a3b53c1935c2d15510226ef7197b5c8 100644 (file)
@@ -144,7 +144,7 @@ bool tegra_bpmp_mrq_is_supported(struct tegra_bpmp *bpmp, unsigned int mrq);
 #else
 static inline struct tegra_bpmp *tegra_bpmp_get(struct device *dev)
 {
-       return ERR_PTR(-ENOTSUPP);
+       return ERR_PTR(-ENODEV);
 }
 
 static inline struct tegra_bpmp *tegra_bpmp_get_with_id(struct device *dev,
@@ -156,16 +156,19 @@ static inline struct tegra_bpmp *tegra_bpmp_get_with_id(struct device *dev,
 static inline void tegra_bpmp_put(struct tegra_bpmp *bpmp)
 {
 }
+
 static inline int tegra_bpmp_transfer_atomic(struct tegra_bpmp *bpmp,
                                             struct tegra_bpmp_message *msg)
 {
-       return -ENOTSUPP;
+       return -ENODEV;
 }
+
 static inline int tegra_bpmp_transfer(struct tegra_bpmp *bpmp,
                                      struct tegra_bpmp_message *msg)
 {
-       return -ENOTSUPP;
+       return -ENODEV;
 }
+
 static inline void tegra_bpmp_mrq_return(struct tegra_bpmp_channel *channel,
                                         int code, const void *data,
                                         size_t size)
@@ -177,8 +180,9 @@ static inline int tegra_bpmp_request_mrq(struct tegra_bpmp *bpmp,
                                         tegra_bpmp_mrq_handler_t handler,
                                         void *data)
 {
-       return -ENOTSUPP;
+       return -ENODEV;
 }
+
 static inline void tegra_bpmp_free_mrq(struct tegra_bpmp *bpmp,
                                       unsigned int mrq, void *data)
 {