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.
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|