Hi Greg,
Here is a few minor fixes in u-boot-env, rmem and lan9662-otp nvmem providers.
-two lan9662 fixes are to fix the compatible string and fix a smatch
warning.
- rmem fixes an error handling path.
- u-boot env has fix for data offset.
If its not too late, can you take them for 6.1.
Many thanks,
Srini
*** BLURB HERE ***
Christian Lamparter (1):
nvmem: u-boot-env: fix crc32_data_offset on redundant u-boot-env
Claudiu Beznea (1):
nvmem: lan9662-otp: fix compatible name
Horatiu Vultur (1):
nvmem: lan9662-otp: Change return type of
lan9662_otp_wait_flag_clear()
Wei Yongjun (1):
nvmem: rmem: Fix return value check in rmem_read()
drivers/nvmem/lan9662-otpc.c | 4 ++--
drivers/nvmem/rmem.c | 4 ++--
drivers/nvmem/u-boot-env.c | 2 +-
3 files changed, 5 insertions(+), 5 deletions(-)
--
2.25.1
From: Horatiu Vultur <[email protected]>
The blamed commit introduced the following smatch warning in the
function lan9662_otp_wait_flag_clear:
drivers/nvmem/lan9662-otpc.c:43 lan9662_otp_wait_flag_clear() warn: signedness bug returning '(-110)'
Fix this by changing the return type of the function
lan9662_otp_wait_flag_clear() to be int instead of bool.
Fixes: 9e8f208ad5229d ("nvmem: lan9662-otp: add support")
Reported-by: kernel test robot <[email protected]>
Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Horatiu Vultur <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
---
drivers/nvmem/lan9662-otpc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/nvmem/lan9662-otpc.c b/drivers/nvmem/lan9662-otpc.c
index 377bf34c2946..56fc19f092a7 100644
--- a/drivers/nvmem/lan9662-otpc.c
+++ b/drivers/nvmem/lan9662-otpc.c
@@ -36,7 +36,7 @@ struct lan9662_otp {
void __iomem *base;
};
-static bool lan9662_otp_wait_flag_clear(void __iomem *reg, u32 flag)
+static int lan9662_otp_wait_flag_clear(void __iomem *reg, u32 flag)
{
u32 val;
--
2.25.1
From: Wei Yongjun <[email protected]>
In case of error, the function memremap() returns NULL pointer
not ERR_PTR(). The IS_ERR() test in the return value check
should be replaced with NULL test.
Fixes: 5a3fa75a4d9c ("nvmem: Add driver to expose reserved memory as nvmem")
Cc: Srinivas Kandagatla <[email protected]>
Cc: Nicolas Saenz Julienne <[email protected]>
Signed-off-by: Wei Yongjun <[email protected]>
Acked-by: Nicolas Saenz Julienne <[email protected]>
Signed-off-by: Yang Yingliang <[email protected]>
Signed-off-by: Srinivas Kandagatla <[email protected]>
---
drivers/nvmem/rmem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/nvmem/rmem.c b/drivers/nvmem/rmem.c
index b11c3c974b3d..80cb187f1481 100644
--- a/drivers/nvmem/rmem.c
+++ b/drivers/nvmem/rmem.c
@@ -37,9 +37,9 @@ static int rmem_read(void *context, unsigned int offset,
* but as of Dec 2020 this isn't possible on arm64.
*/
addr = memremap(priv->mem->base, available, MEMREMAP_WB);
- if (IS_ERR(addr)) {
+ if (!addr) {
dev_err(priv->dev, "Failed to remap memory region\n");
- return PTR_ERR(addr);
+ return -ENOMEM;
}
count = memory_read_from_buffer(val, bytes, &off, addr, available);
--
2.25.1
On Fri, Nov 18, 2022 at 06:38:36AM +0000, Srinivas Kandagatla wrote:
> Hi Greg,
>
> Here is a few minor fixes in u-boot-env, rmem and lan9662-otp nvmem providers.
> -two lan9662 fixes are to fix the compatible string and fix a smatch
> warning.
> - rmem fixes an error handling path.
> - u-boot env has fix for data offset.
>
> If its not too late, can you take them for 6.1.
>
2 of these were already in 6.1-rc6, but I took the others now as well.
thanks,
greg k-h