public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Khalid Aziz <khalid.aziz@oracle.com>
To: "Luck, Tony" <tony.luck@intel.com>
Cc: "bp@alien8.de" <bp@alien8.de>,
	"tglx@linutronix.de" <tglx@linutronix.de>,
	"mingo@redhat.com" <mingo@redhat.com>,
	"hpa@zytor.com" <hpa@zytor.com>,
	"x86@kernel.org" <x86@kernel.org>,
	"linux-edac@vger.kernel.org" <linux-edac@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] x86, mce: Print warning if MCE handler fails to register /dev/mcelog
Date: Tue, 09 Apr 2013 13:20:53 -0600	[thread overview]
Message-ID: <51646A15.8060004@oracle.com> (raw)
In-Reply-To: <3908561D78D1C84285E8C5FCA982C28F1EA41C2B@ORSMSX104.amr.corp.intel.com>

On 04/09/2013 12:30 PM, Luck, Tony wrote:
> -	misc_register(&mce_chrdev_device);
> +	if (misc_register(&mce_chrdev_device) != 0)
> +		pr_warn("Failed to register mcelog device\n");
>
> Did this actually happen to you?  Or is this just "good practice" to check the
> return value from misc_register?
>

No, I did not see this happen. It is just "good practice". If it were to 
happen, mcelog daemon would fail to get any mce records and it will not 
be easy to figure out what happened. Most other places in kernel where 
misc_register() is called, do check for return code and take action if 
it fails.

--
Khalid


      parent reply	other threads:[~2013-04-09 19:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-09 18:19 [PATCH] x86, mce: Print warning if MCE handler fails to register /dev/mcelog Khalid Aziz
2013-04-09 18:30 ` Luck, Tony
2013-04-09 18:52   ` Borislav Petkov
2013-04-09 19:20   ` Khalid Aziz [this message]

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=51646A15.8060004@oracle.com \
    --to=khalid.aziz@oracle.com \
    --cc=bp@alien8.de \
    --cc=hpa@zytor.com \
    --cc=linux-edac@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=tglx@linutronix.de \
    --cc=tony.luck@intel.com \
    --cc=x86@kernel.org \
    /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