* [PATCH] ipmi: kcs: Fix aspeed_kcs_probe_of_v1()
@ 2020-04-07 12:21 Dan Carpenter
2020-04-07 13:36 ` Corey Minyard
2020-04-07 23:18 ` Joel Stanley
0 siblings, 2 replies; 4+ messages in thread
From: Dan Carpenter @ 2020-04-07 12:21 UTC (permalink / raw)
To: linux-aspeed
This needs to return the newly allocated struct but instead it returns
zero which leads to an immediate Oops in the caller.
Fixes: 09f5f680707e ("ipmi: kcs: aspeed: Implement v2 bindings")
Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
---
drivers/char/ipmi/kcs_bmc_aspeed.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/char/ipmi/kcs_bmc_aspeed.c b/drivers/char/ipmi/kcs_bmc_aspeed.c
index 9422d55a0476..a140203c079b 100644
--- a/drivers/char/ipmi/kcs_bmc_aspeed.c
+++ b/drivers/char/ipmi/kcs_bmc_aspeed.c
@@ -271,7 +271,7 @@ static struct kcs_bmc *aspeed_kcs_probe_of_v1(struct platform_device *pdev)
kcs->ioreg = ast_kcs_bmc_ioregs[channel - 1];
aspeed_kcs_set_address(kcs, slave);
- return 0;
+ return kcs;
}
static int aspeed_kcs_calculate_channel(const struct kcs_ioreg *regs)
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread* [PATCH] ipmi: kcs: Fix aspeed_kcs_probe_of_v1()
2020-04-07 12:21 [PATCH] ipmi: kcs: Fix aspeed_kcs_probe_of_v1() Dan Carpenter
@ 2020-04-07 13:36 ` Corey Minyard
2020-04-07 23:18 ` Joel Stanley
1 sibling, 0 replies; 4+ messages in thread
From: Corey Minyard @ 2020-04-07 13:36 UTC (permalink / raw)
To: linux-aspeed
On Tue, Apr 07, 2020 at 03:21:49PM +0300, Dan Carpenter wrote:
> This needs to return the newly allocated struct but instead it returns
> zero which leads to an immediate Oops in the caller.
Thanks, this is applied.
-corey
>
> Fixes: 09f5f680707e ("ipmi: kcs: aspeed: Implement v2 bindings")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
> ---
> drivers/char/ipmi/kcs_bmc_aspeed.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/char/ipmi/kcs_bmc_aspeed.c b/drivers/char/ipmi/kcs_bmc_aspeed.c
> index 9422d55a0476..a140203c079b 100644
> --- a/drivers/char/ipmi/kcs_bmc_aspeed.c
> +++ b/drivers/char/ipmi/kcs_bmc_aspeed.c
> @@ -271,7 +271,7 @@ static struct kcs_bmc *aspeed_kcs_probe_of_v1(struct platform_device *pdev)
> kcs->ioreg = ast_kcs_bmc_ioregs[channel - 1];
> aspeed_kcs_set_address(kcs, slave);
>
> - return 0;
> + return kcs;
> }
>
> static int aspeed_kcs_calculate_channel(const struct kcs_ioreg *regs)
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH] ipmi: kcs: Fix aspeed_kcs_probe_of_v1()
2020-04-07 12:21 [PATCH] ipmi: kcs: Fix aspeed_kcs_probe_of_v1() Dan Carpenter
2020-04-07 13:36 ` Corey Minyard
@ 2020-04-07 23:18 ` Joel Stanley
2020-04-07 23:36 ` Andrew Jeffery
1 sibling, 1 reply; 4+ messages in thread
From: Joel Stanley @ 2020-04-07 23:18 UTC (permalink / raw)
To: linux-aspeed
On Tue, 7 Apr 2020 at 12:22, Dan Carpenter <dan.carpenter@oracle.com> wrote:
>
> This needs to return the newly allocated struct but instead it returns
> zero which leads to an immediate Oops in the caller.
>
> Fixes: 09f5f680707e ("ipmi: kcs: aspeed: Implement v2 bindings")
> Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
Thanks for the fix Dan.
Andrew, I think this means no one has used the v1 bindings in
mainline, so could remove that code?
> ---
> drivers/char/ipmi/kcs_bmc_aspeed.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/char/ipmi/kcs_bmc_aspeed.c b/drivers/char/ipmi/kcs_bmc_aspeed.c
> index 9422d55a0476..a140203c079b 100644
> --- a/drivers/char/ipmi/kcs_bmc_aspeed.c
> +++ b/drivers/char/ipmi/kcs_bmc_aspeed.c
> @@ -271,7 +271,7 @@ static struct kcs_bmc *aspeed_kcs_probe_of_v1(struct platform_device *pdev)
> kcs->ioreg = ast_kcs_bmc_ioregs[channel - 1];
> aspeed_kcs_set_address(kcs, slave);
>
> - return 0;
> + return kcs;
> }
>
> static int aspeed_kcs_calculate_channel(const struct kcs_ioreg *regs)
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread* [PATCH] ipmi: kcs: Fix aspeed_kcs_probe_of_v1()
2020-04-07 23:18 ` Joel Stanley
@ 2020-04-07 23:36 ` Andrew Jeffery
0 siblings, 0 replies; 4+ messages in thread
From: Andrew Jeffery @ 2020-04-07 23:36 UTC (permalink / raw)
To: linux-aspeed
On Wed, 8 Apr 2020, at 08:48, Joel Stanley wrote:
> On Tue, 7 Apr 2020 at 12:22, Dan Carpenter <dan.carpenter@oracle.com> wrote:
> >
> > This needs to return the newly allocated struct but instead it returns
> > zero which leads to an immediate Oops in the caller.
> >
> > Fixes: 09f5f680707e ("ipmi: kcs: aspeed: Implement v2 bindings")
> > Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com>
>
> Thanks for the fix Dan.
>
> Andrew, I think this means no one has used the v1 bindings in
> mainline, so could remove that code?
No, rather Dan's on the ball and it seems I was a bit lax with my testing
of the patch. I pinged Corey only the other day regarding the patches;
he had been busy and as such hadn't merged them.
I have a series to convert our devicetrees over to v2. Now that Corey's
taken the patches I can send that and we can get away from v1.
Thanks for the fix Dan.
Acked-by: Andrew Jeffery <andrew@aj.id.au>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-04-07 23:36 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-07 12:21 [PATCH] ipmi: kcs: Fix aspeed_kcs_probe_of_v1() Dan Carpenter
2020-04-07 13:36 ` Corey Minyard
2020-04-07 23:18 ` Joel Stanley
2020-04-07 23:36 ` Andrew Jeffery
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).