* [PATCH v1] firmware:Fix an NULL vs IS_ERR() bug in probe
@ 2023-07-04 8:26 Wang Ming
[not found] ` <fe780326-2150-a3e6-e451-ea82be65e0cf@web.de>
0 siblings, 1 reply; 5+ messages in thread
From: Wang Ming @ 2023-07-04 8:26 UTC (permalink / raw)
To: Dinh Nguyen, linux-kernel; +Cc: opensource.kernel, Wang Ming
The devm_memremap() function returns error pointers.
It never returns NULL. Fix the check.
Signed-off-by: Wang Ming <machel@vivo.com>
---
drivers/firmware/stratix10-svc.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/stratix10-svc.c b/drivers/firmware/stratix10-svc.c
index 2d6741261..cab11af28 100644
--- a/drivers/firmware/stratix10-svc.c
+++ b/drivers/firmware/stratix10-svc.c
@@ -756,7 +756,7 @@ svc_create_memory_pool(struct platform_device *pdev,
paddr = begin;
size = end - begin;
va = devm_memremap(dev, paddr, size, MEMREMAP_WC);
- if (!va) {
+ if (IS_ERR(va)) {
dev_err(dev, "fail to remap shared memory\n");
return ERR_PTR(-EINVAL);
}
--
2.25.1
^ permalink raw reply related [flat|nested] 5+ messages in thread[parent not found: <fe780326-2150-a3e6-e451-ea82be65e0cf@web.de>]
* Re: [PATCH] firmware: stratix10-svc: Fix an NULL vs IS_ERR() bug in svc_create_memory_pool() [not found] ` <fe780326-2150-a3e6-e451-ea82be65e0cf@web.de> @ 2023-07-06 8:28 ` Dan Carpenter [not found] ` <daa12e00-1d01-45d0-89c8-03ff94fa3399@kadam.mountain> 1 sibling, 0 replies; 5+ messages in thread From: Dan Carpenter @ 2023-07-06 8:28 UTC (permalink / raw) To: Markus Elfring Cc: Wang Ming, kernel-janitors, Dinh Nguyen, opensource.kernel, LKML On Wed, Jul 05, 2023 at 08:21:02PM +0200, Markus Elfring wrote: > Please apply a more appropriate patch subject. > Markus, a number of people have asked you to stop with this nonsense. > > > The devm_memremap() function returns error pointers. > > It never returns NULL. Fix the check. > > Would the following wording be helpful? > > > Replace a null pointer check by an error pointer check after a call > of the function “devm_memremap” in this function implementation. No. The original was fine. The original commit message is more clear than your proposed commit message. regards, dan carpenter ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <daa12e00-1d01-45d0-89c8-03ff94fa3399@kadam.mountain>]
[parent not found: <SG2PR06MB3743AC289C8C124CA57C77DABD2CA@SG2PR06MB3743.apcprd06.prod.outlook.com>]
* Re: 回复: [PATCH] firmware: stratix10-svc: Fix an NULL vs IS_ERR() bug in svc_create_memory_pool() [not found] ` <SG2PR06MB3743AC289C8C124CA57C77DABD2CA@SG2PR06MB3743.apcprd06.prod.outlook.com> @ 2023-07-06 8:52 ` Dan Carpenter [not found] ` <SG2PR06MB3743DD3C50017612CF3BE38ABD2CA@SG2PR06MB3743.apcprd06.prod.outlook.com> 0 siblings, 1 reply; 5+ messages in thread From: Dan Carpenter @ 2023-07-06 8:52 UTC (permalink / raw) To: 王明-软件底层技术部 Cc: Dinh Nguyen, LKML, opensource.kernel On Thu, Jul 06, 2023 at 08:44:39AM +0000, 王明-软件底层技术部 wrote: > Thank you Dan carpenter. > This patch has been submitted for a long time, but I have not heard back from the maintainer, > and I am confused whether I need to send it again You have to wait for at least two weeks before asking about a patch. But the merge window is open now so everyone is busy. Add another week because of the merge window. regards, dan carpenter ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <SG2PR06MB3743DD3C50017612CF3BE38ABD2CA@SG2PR06MB3743.apcprd06.prod.outlook.com>]
* Re: 回复: 回复: [PATCH] firmware: stratix10-svc: Fix an NULL vs IS_ERR() bug in svc_create_memory_pool() [not found] ` <SG2PR06MB3743DD3C50017612CF3BE38ABD2CA@SG2PR06MB3743.apcprd06.prod.outlook.com> @ 2023-07-06 15:18 ` Dinh Nguyen [not found] ` <SG2PR06MB3743994BB1C786B2BE4A24A7BD34A@SG2PR06MB3743.apcprd06.prod.outlook.com> 0 siblings, 1 reply; 5+ messages in thread From: Dinh Nguyen @ 2023-07-06 15:18 UTC (permalink / raw) To: 王明-软件底层技术部, Dan Carpenter Cc: LKML, opensource.kernel On 7/6/23 03:56, 王明-软件底层技术部 wrote: > I see. Thank you > > -----邮件原件----- > 发件人: Dan Carpenter <dan.carpenter@linaro.org> > 发送时间: 2023年7月6日 16:52 > 收件人: 王明-软件底层技术部 <machel@vivo.com> > 抄送: Dinh Nguyen <dinguyen@kernel.org>; LKML <linux-kernel@vger.kernel.org>; opensource.kernel <opensource.kernel@vivo.com> > 主题: Re: 回复: [PATCH] firmware: stratix10-svc: Fix an NULL vs IS_ERR() bug in svc_create_memory_pool() > > On Thu, Jul 06, 2023 at 08:44:39AM +0000, 王明-软件底层技术部 wrote: >> Thank you Dan carpenter. >> This patch has been submitted for a long time, but I have not heard >> back from the maintainer, and I am confused whether I need to send it >> again Looks like you sent an original patch on July 1st, then you sent another patch on July 4th. In the future, please take Dan's advice on 2 weeks and if you do need to resend you can add a 'RESEND' to the subject line, or just reply with a ping to the original patch. I was on a short leave. I'll take your patch next week with the edits from Dan's comments. Thanks, Dinh ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <SG2PR06MB3743994BB1C786B2BE4A24A7BD34A@SG2PR06MB3743.apcprd06.prod.outlook.com>]
* Re: 回复: 回复: 回复: [PATCH] firmware: stratix10-svc: Fix an NULL vs IS_ERR() bug in svc_create_memory_pool() [not found] ` <SG2PR06MB3743994BB1C786B2BE4A24A7BD34A@SG2PR06MB3743.apcprd06.prod.outlook.com> @ 2023-07-14 14:44 ` Dinh Nguyen 0 siblings, 0 replies; 5+ messages in thread From: Dinh Nguyen @ 2023-07-14 14:44 UTC (permalink / raw) To: 王明-软件底层技术部 Cc: Dan Carpenter, LKML, opensource.kernel On 7/14/23 04:46, 王明-软件底层技术部 wrote: > Hi Dinh > Excuse me, I don't know if your vacation is over. This is the patch I submitted before: > https://lore.kernel.org/all/20230704082706.1721-1-machel@vivo.com/ > regards There was a comment from Dan Carpenter about adding the Fixes tag. I was waiting the patch with that. Dinh ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2023-07-14 14:44 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-04 8:26 [PATCH v1] firmware:Fix an NULL vs IS_ERR() bug in probe Wang Ming
[not found] ` <fe780326-2150-a3e6-e451-ea82be65e0cf@web.de>
2023-07-06 8:28 ` [PATCH] firmware: stratix10-svc: Fix an NULL vs IS_ERR() bug in svc_create_memory_pool() Dan Carpenter
[not found] ` <daa12e00-1d01-45d0-89c8-03ff94fa3399@kadam.mountain>
[not found] ` <SG2PR06MB3743AC289C8C124CA57C77DABD2CA@SG2PR06MB3743.apcprd06.prod.outlook.com>
2023-07-06 8:52 ` 回复: " Dan Carpenter
[not found] ` <SG2PR06MB3743DD3C50017612CF3BE38ABD2CA@SG2PR06MB3743.apcprd06.prod.outlook.com>
2023-07-06 15:18 ` 回复: " Dinh Nguyen
[not found] ` <SG2PR06MB3743994BB1C786B2BE4A24A7BD34A@SG2PR06MB3743.apcprd06.prod.outlook.com>
2023-07-14 14:44 ` 回复: " Dinh Nguyen
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox