Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1759990AbcLTGtF (ORCPT ); Tue, 20 Dec 2016 01:49:05 -0500 Received: from bombadil.infradead.org ([198.137.202.9]:43957 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752096AbcLTGtD (ORCPT ); Tue, 20 Dec 2016 01:49:03 -0500 Date: Mon, 19 Dec 2016 22:49:01 -0800 From: Christoph Hellwig To: Scott Bauer Cc: linux-nvme@lists.infradead.org, keith.busch@intel.com, sagi@grimberg.me, hch@infradead.org, Rafael.Antognolli@intel.com, linux-kernel@vger.kernel.org, axboe@fb.com, viro@zeniv.linux.org.uk, jonathan.derrick@intel.com Subject: Re: [PATCH v3 4/5] nvme: Implement resume_from_suspend and SED Allocation code. Message-ID: <20161220064901.GB13844@infradead.org> References: <1482176149-2257-1-git-send-email-scott.bauer@intel.com> <1482176149-2257-5-git-send-email-scott.bauer@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1482176149-2257-5-git-send-email-scott.bauer@intel.com> User-Agent: Mutt/1.6.1 (2016-04-27) X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 844 Lines: 21 > +void nvme_unlock_from_suspend(struct nvme_ctrl *ctrl) > +{ > + if (opal_unlock_from_suspend(&ctrl->sed_ctx)) > + pr_warn("Failed to unlock one or more locking ranges!\n"); > +} > +EXPORT_SYMBOL_GPL(nvme_unlock_from_suspend); I don't think we even need this wrapper. Also for the warning please use dev_warn so that the user knows which controller failed. > @@ -1765,7 +1766,7 @@ static void nvme_reset_work(struct work_struct *work) > { > struct nvme_dev *dev = container_of(work, struct nvme_dev, reset_work); > int result = -ENODEV; > - > + bool was_suspend = !!(dev->ctrl.ctrl_config & NVME_CC_SHN_NORMAL); > if (WARN_ON(dev->ctrl.state == NVME_CTRL_RESETTING)) Please don't remove the empty line after the variable declarations. Also I would place your new line before the result line, as that makes it a tad easier to read.