lkml.org 
[lkml]   [2020]   [May]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [PATCH 02/12] xenbus: add freeze/thaw/restore callbacks support
From
Date
On 5/19/20 7:25 PM, Anchal Agarwal wrote:
>
> int xenbus_dev_resume(struct device *dev)
> {
> - int err;
> + int err = 0;


That's not necessary.


> struct xenbus_driver *drv;
> struct xenbus_device *xdev
> = container_of(dev, struct xenbus_device, dev);
> -
> + bool xen_suspend = xen_suspend_mode_is_xen_suspend();
> DPRINTK("%s", xdev->nodename);
>
> if (dev->driver == NULL)
> @@ -627,24 +645,32 @@ int xenbus_dev_resume(struct device *dev)
> drv = to_xenbus_driver(dev->driver);
> err = talk_to_otherend(xdev);
> if (err) {
> - pr_warn("resume (talk_to_otherend) %s failed: %i\n",
> + pr_warn("%s (talk_to_otherend) %s failed: %i\n",


Please use dev_warn() everywhere, we just had a bunch of patches that
replaced pr_warn(). In fact,  this is one of the lines that got changed.


>
> int xenbus_dev_cancel(struct device *dev)
> {
> - /* Do nothing */
> - DPRINTK("cancel");
> + int err = 0;


Again, no need to initialize.


> + struct xenbus_driver *drv;
> + struct xenbus_device *xdev
> + = container_of(dev, struct xenbus_device, dev);


xendev please to be consistent with other code. And use to_xenbus_device().


-boris

\
 
 \ /
  Last update: 2020-05-31 00:59    [W:0.338 / U:1.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site