From: Dexuan Cui <decui@microsoft.com>
To: Haiyang Zhang <haiyangz@microsoft.com>,
KY Srinivasan <kys@microsoft.com>,
Stephen Hemminger <sthemmin@microsoft.com>,
"sashal@kernel.org" <sashal@kernel.org>,
"davem@davemloft.net" <davem@davemloft.net>,
"linux-hyperv@vger.kernel.org" <linux-hyperv@vger.kernel.org>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
Michael Kelley <mikelley@microsoft.com>
Subject: RE: [PATCH][PATCH net-next] hv_netvsc: Add the support of hibernation
Date: Thu, 12 Sep 2019 19:44:03 +0000 [thread overview]
Message-ID: <PU1P153MB0169D1FB65D53380FEDF3132BFB00@PU1P153MB0169.APCP153.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <DM6PR21MB1337EEC46A276CAD9FAA5EB4CAB00@DM6PR21MB1337.namprd21.prod.outlook.com>
> From: Haiyang Zhang <haiyangz@microsoft.com>
> Sent: Thursday, September 12, 2019 6:50 AM
> > -----Original Message-----
> > From: Dexuan Cui <decui@microsoft.com>
> > Sent: Wednesday, September 11, 2019 7:38 PM
> > +static int netvsc_suspend(struct hv_device *dev)
> > +{
> > + struct net_device_context *ndev_ctx;
> > + struct net_device *vf_netdev, *net;
> > + struct netvsc_device *nvdev;
> > + int ret;
> > +
> > + net = hv_get_drvdata(dev);
> > +
> > + ndev_ctx = netdev_priv(net);
> > + cancel_delayed_work_sync(&ndev_ctx->dwork);
> > +
> > + rtnl_lock();
> > +
> > + nvdev = rtnl_dereference(ndev_ctx->nvdev);
> > + if (nvdev == NULL) {
> > + ret = -ENODEV;
> > + goto out;
> > + }
> > +
> > + cancel_work_sync(&nvdev->subchan_work);
>
> This looks redundant because netvsc_detach() cancels subchan_work.
> - Haiyang
You are right. I'll remove the superflous line
cancel_work_sync(&nvdev->subchan_work);
in netvsc_suspend() in v2.
I'll wait for a few days before posting v2, in case people may have
other comments.
Thanks,
-- Dexuan
prev parent reply other threads:[~2019-09-12 19:44 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-11 23:37 [PATCH][PATCH net-next] hv_netvsc: Add the support of hibernation Dexuan Cui
2019-09-12 13:50 ` Haiyang Zhang
2019-09-12 19:44 ` Dexuan Cui [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=PU1P153MB0169D1FB65D53380FEDF3132BFB00@PU1P153MB0169.APCP153.PROD.OUTLOOK.COM \
--to=decui@microsoft.com \
--cc=davem@davemloft.net \
--cc=haiyangz@microsoft.com \
--cc=kys@microsoft.com \
--cc=linux-hyperv@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mikelley@microsoft.com \
--cc=netdev@vger.kernel.org \
--cc=sashal@kernel.org \
--cc=sthemmin@microsoft.com \
/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;
as well as URLs for NNTP newsgroup(s).