WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[SPAM] Re: [Xen-devel] [PATCH] xenbus PM events support (was: [PATCH 2/2

To: Shriram Rajagopalan <rshriram@xxxxxxxxx>
Subject: [SPAM] Re: [Xen-devel] [PATCH] xenbus PM events support (was: [PATCH 2/2] Fix hangup after creating checkpoint on Xen.)
From: Ian Campbell <Ian.Campbell@xxxxxxxxxx>
Date: Wed, 16 Feb 2011 10:02:30 +0000
Cc: "xen-devel@xxxxxxxxxxxxxxxxxxx" <xen-devel@xxxxxxxxxxxxxxxxxxx>, "kaz@xxxxxxxxxxxxxx" <kaz@xxxxxxxxxxxxxx>
Delivery-date: Wed, 16 Feb 2011 02:06:47 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
Importance: Low
In-reply-to: <1297811442-30577-1-git-send-email-rshriram@xxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Organization: Citrix Systems, Inc.
References: <1297811442-30577-1-git-send-email-rshriram@xxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
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