From: Ian Campbell Subject: [SPAM] Re: [PATCH] xenbus PM events support (was: [PATCH 2/2] Fix hangup after creating checkpoint on Xen.) Date: Wed, 16 Feb 2011 10:02:30 +0000 Message-ID: <1297850550.21980.5934.camel@zakaz.uk.xensource.com> References: <1297811442-30577-1-git-send-email-rshriram@cs.ubc.ca> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1297811442-30577-1-git-send-email-rshriram@cs.ubc.ca> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Shriram Rajagopalan Cc: "xen-devel@lists.xensource.com" , "kaz@jp.fujitsu.com" List-Id: xen-devel@lists.xenproject.org On Tue, 2011-02-15 at 23:10 +0000, Shriram Rajagopalan wrote: > diff --git a/drivers/xen/xenbus/xenbus_probe_frontend.c > b/drivers/xen/xenbus/xenbus_probe_frontend.c > index 5bcc2d6..9ad8868 100644 > --- a/drivers/xen/xenbus/xenbus_probe_frontend.c > +++ b/drivers/xen/xenbus/xenbus_probe_frontend.c > @@ -85,6 +85,12 @@ static struct device_attribute > xenbus_frontend_dev_attrs[] = { > __ATTR_NULL > }; > > +static struct dev_pm_ops xenbus_pm_ops = { > + .suspend = xenbus_dev_suspend, > + .resume = xenbus_dev_resume, > + .thaw = xenbus_dev_cancel, > +}; > + Please run ./scripts/checkpatch.pl on patches, in this case it says: $ ./scripts/checkpatch.pl ~/1.mbox WARNING: struct dev_pm_ops should normally be const #167: FILE: drivers/xen/xenbus/xenbus_probe_frontend.c:88: +static struct dev_pm_ops xenbus_pm_ops = { total: 0 errors, 1 warnings, 69 lines checked /home/ianc/1.mbox has style problems, please review. If any of these errors are false positives report them to the maintainer, see CHECKPATCH in MAINTAINERS. checkpatch.pl isn't gospel but this seems like a reasonable warning to address. The following didn't seem to provoke any compile time errors; diff --git a/drivers/xen/xenbus/xenbus_probe_frontend.c b/drivers/xen/xenbus/xenbus_probe_frontend.c index d6e5f0d..b6a2690 100644 --- a/drivers/xen/xenbus/xenbus_probe_frontend.c +++ b/drivers/xen/xenbus/xenbus_probe_frontend.c @@ -85,7 +85,7 @@ static struct device_attribute xenbus_frontend_dev_attrs[] = { __ATTR_NULL }; -static struct dev_pm_ops xenbus_pm_ops = { +static const struct dev_pm_ops xenbus_pm_ops = { .suspend = xenbus_dev_suspend, .resume = xenbus_dev_resume, .freeze = xenbus_dev_suspend, Ian.