mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Corey Minyard <minyard@acm.org>
To: Tony Camuso <tcamuso@redhat.com>,
	openipmi-developer@lists.sourceforge.net,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ipmi_si: use smi_num for init_name
Date: Mon, 10 Apr 2017 11:59:48 -0500	[thread overview]
Message-ID: <ec3faaaf-3ba1-695c-866e-05d9312f7856@acm.org> (raw)
In-Reply-To: <20170410162213.6906-1-tcamuso@redhat.com>

On 04/10/2017 11:22 AM, Tony Camuso wrote:
> Commit 1abf71e moved the creation of new_smi->dev to earlier in the init
> sequence in order to provide infrastructure for log printing.
>
> However, the init_name was created with a hard-coded value of zero. This
> presents a problem in systems with more than one interface, producing a
> call trace in dmesg.
>
> To correct the problem, simply use smi_num instead of the hard-coded
> value of zero.

Yeah, you are right.  And there's more, the platform_device_alloc will
also be wrong, which is even worse.

I'll revise your patch a bit...

-corey

> Tested on a lenovo x3950.
>
> Signed-off-by: Tony Camuso <tcamuso@redhat.com>
> ---
>   drivers/char/ipmi/ipmi_si_intf.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/char/ipmi/ipmi_si_intf.c b/drivers/char/ipmi/ipmi_si_intf.c
> index 2a7c425..9d8fc51 100644
> --- a/drivers/char/ipmi/ipmi_si_intf.c
> +++ b/drivers/char/ipmi/ipmi_si_intf.c
> @@ -3526,7 +3526,7 @@ static int try_smi_init(struct smi_info *new_smi)
>   
>   	/* Do this early so it's available for logs. */
>   	if (!new_smi->dev) {
> -		init_name = kasprintf(GFP_KERNEL, "ipmi_si.%d", 0);
> +		init_name = kasprintf(GFP_KERNEL, "ipmi_si.%d", smi_num);
>   
>   		/*
>   		 * If we don't already have a device from something

  reply	other threads:[~2017-04-10 16:59 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-10 16:22 Tony Camuso
2017-04-10 16:59 ` Corey Minyard [this message]
2017-04-10 17:43 minyard
2017-04-10 17:48 ` Tony Camuso
2017-04-10 17:57 ` Tony Camuso
2017-04-10 18:17 ` Tony Camuso

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=ec3faaaf-3ba1-695c-866e-05d9312f7856@acm.org \
    --to=minyard@acm.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=openipmi-developer@lists.sourceforge.net \
    --cc=tcamuso@redhat.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®