[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200724074038.5597-21-krzk@kernel.org>
Date: Fri, 24 Jul 2020 09:40:29 +0200
From: Krzysztof Kozlowski <krzk@...nel.org>
To: Arnd Bergmann <arnd@...db.de>, Olof Johansson <olof@...om.net>,
Markus Mayer <mmayer@...adcom.com>,
bcm-kernel-feedback-list@...adcom.com,
Florian Fainelli <f.fainelli@...il.com>,
Santosh Shilimkar <ssantosh@...nel.org>,
Matthias Brugger <matthias.bgg@...il.com>,
Roger Quadros <rogerq@...com>,
Tony Lindgren <tony@...mide.com>,
Vladimir Zapolskiy <vz@...ia.com>,
Kukjin Kim <kgene@...nel.org>,
Thierry Reding <thierry.reding@...il.com>,
Jonathan Hunter <jonathanh@...dia.com>,
linux-kernel@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-omap@...r.kernel.org,
linux-samsung-soc@...r.kernel.org, linux-tegra@...r.kernel.org
Cc: Andrew Morton <akpm@...ux-foundation.org>,
Linus Torvalds <torvalds@...ux-foundation.org>,
Krzysztof Kozlowski <krzk@...nel.org>
Subject: [RFT v2 20/29] memory: omap-gpmc: Return meaningful error codes in gpmc_cs_set_timings()
The callers of gpmc_cs_set_timings() expect to receive -ERRNO on errors
and they pass further what they have received.
However gpmc_cs_set_timings() was returning -1 (equal to -EPERM) which
does not make sense in this context.
Signed-off-by: Krzysztof Kozlowski <krzk@...nel.org>
---
Not tested
Changes since v1:
1. New patch
---
drivers/memory/omap-gpmc.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/memory/omap-gpmc.c b/drivers/memory/omap-gpmc.c
index c158b6cae9a9..1e370142dfca 100644
--- a/drivers/memory/omap-gpmc.c
+++ b/drivers/memory/omap-gpmc.c
@@ -638,7 +638,7 @@ static int set_gpmc_timing_reg(int cs, int reg, int st_bit, int end_bit, int max
#define GPMC_SET_ONE_CD_MAX(reg, st, end, max, field, cd) \
if (set_gpmc_timing_reg(cs, (reg), (st), (end), (max), \
t->field, (cd), #field) < 0) \
- return -1
+ return -ENXIO
#define GPMC_SET_ONE(reg, st, end, field) \
GPMC_SET_ONE_CD_MAX(reg, st, end, 0, field, GPMC_CD_FCLK)
@@ -708,7 +708,7 @@ int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t,
div = gpmc_calc_divider(t->sync_clk);
if (div < 0)
- return div;
+ return -EINVAL;
/*
* See if we need to change the divider for waitmonitoringtime.
@@ -733,7 +733,7 @@ int gpmc_cs_set_timings(int cs, const struct gpmc_timings *t,
__func__,
t->wait_monitoring
);
- return -1;
+ return -ENXIO;
}
}
--
2.17.1
Powered by blists - more mailing lists