From patchwork Fri May 6 18:03:14 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Matias_Bj=C3=B8rling?= X-Patchwork-Id: 9035391 Return-Path: X-Original-To: patchwork-linux-block@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id DBF86BF29F for ; Fri, 6 May 2016 18:08:44 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 0BD9E20272 for ; Fri, 6 May 2016 18:08:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 175252035B for ; Fri, 6 May 2016 18:08:43 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758631AbcEFSI3 (ORCPT ); Fri, 6 May 2016 14:08:29 -0400 Received: from mail-wm0-f49.google.com ([74.125.82.49]:38431 "EHLO mail-wm0-f49.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932252AbcEFSDy (ORCPT ); Fri, 6 May 2016 14:03:54 -0400 Received: by mail-wm0-f49.google.com with SMTP id g17so89899699wme.1 for ; Fri, 06 May 2016 11:03:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bjorling.me; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=qZA+cnjz54A5LJw0giJfkIpwf4nZLr5TJ851Fj4bLLc=; b=hXYrMOHHIFxANFAENyvo2kQqnzMC2YvIvWCMHADcXfaeoHToVekbbS3aybiIBeGz9n mhFz8SXsNcd6wVLwqWyLOIW0oF712+JkBX1TRLnL1yVC+/8+f/2ZAcsW4hQ+Y6p3WB7X hxsxqjerKtE0uVCAmZ/yHUvC0WL94m3Xv2RAA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=qZA+cnjz54A5LJw0giJfkIpwf4nZLr5TJ851Fj4bLLc=; b=PP0fFQsrJ/HmIlu5nI0AncUFVNu2HTuFUhWmzkk/fysn85DZK4zrODo/fLT/jNrzpC WI2WQ7xiY8IEyNPjzOIr8wl8/SkDoOu5zYEEqoHv4GFR1x9hwy/X86f9CNzRtmlE+rtk FtWmo/V6HNQUesY4l3bpCp3MFqSqWgP+mh1kQN2H3UWJYYkXEMZ9rjqFqsFmve5qP9Am DZS0PCPRUXddjY/Qv1fTMMIGRF994bWVBIpwnubidmHZmjeTRz4hIEIXCcwaJUJRln6d y8IXRfPwnuWc/hZVs+vlL5SxTFzK3ASZokimOaY5vtgKVv4/m+JvMCr2zUhIfmrn/V6U fgBA== X-Gm-Message-State: AOPr4FXBLECCgY+iBlGWQ88c0K41x+ChK+exyfyKTEBwm9xheuD3/VJfchJIjNZe3OU2rQ== X-Received: by 10.28.102.8 with SMTP id a8mr11133998wmc.54.1462557833485; Fri, 06 May 2016 11:03:53 -0700 (PDT) Received: from Macroninja.cnexlabs.com (6164211-cl69.boa.fiberby.dk. [193.106.164.211]) by smtp.gmail.com with ESMTPSA id kz1sm16076559wjc.46.2016.05.06.11.03.52 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 06 May 2016 11:03:52 -0700 (PDT) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, axboe@fb.com Cc: Sagi Grimberg , =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [PATCH 21/28] nvme/lightnvm: Log using the ctrl named device Date: Fri, 6 May 2016 20:03:14 +0200 Message-Id: <1462557801-24974-22-git-send-email-m@bjorling.me> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1462557801-24974-1-git-send-email-m@bjorling.me> References: <1462557801-24974-1-git-send-email-m@bjorling.me> MIME-Version: 1.0 Sender: linux-block-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org X-Spam-Status: No, score=-8.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Sagi Grimberg Align with the rest of the nvme subsystem. Signed-off-by: Sagi Grimberg Signed-off-by: Matias Bjørling --- drivers/nvme/host/lightnvm.c | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index 8461f5a..fadeb54 100644 --- a/drivers/nvme/host/lightnvm.c +++ b/drivers/nvme/host/lightnvm.c @@ -367,8 +367,8 @@ static int nvme_nvm_get_l2p_tbl(struct nvm_dev *nvmdev, u64 slba, u32 nlb, ret = nvme_submit_sync_cmd(ns->ctrl->admin_q, (struct nvme_command *)&c, entries, len); if (ret) { - dev_err(ns->ctrl->dev, "L2P table transfer failed (%d)\n", - ret); + dev_err(ns->ctrl->device, + "L2P table transfer failed (%d)\n", ret); ret = -EIO; goto out; } @@ -410,27 +410,28 @@ static int nvme_nvm_get_bb_tbl(struct nvm_dev *nvmdev, struct ppa_addr ppa, ret = nvme_submit_sync_cmd(ctrl->admin_q, (struct nvme_command *)&c, bb_tbl, tblsz); if (ret) { - dev_err(ctrl->dev, "get bad block table failed (%d)\n", ret); + dev_err(ctrl->device, "get bad block table failed (%d)\n", ret); ret = -EIO; goto out; } if (bb_tbl->tblid[0] != 'B' || bb_tbl->tblid[1] != 'B' || bb_tbl->tblid[2] != 'L' || bb_tbl->tblid[3] != 'T') { - dev_err(ctrl->dev, "bbt format mismatch\n"); + dev_err(ctrl->device, "bbt format mismatch\n"); ret = -EINVAL; goto out; } if (le16_to_cpu(bb_tbl->verid) != 1) { ret = -EINVAL; - dev_err(ctrl->dev, "bbt version not supported\n"); + dev_err(ctrl->device, "bbt version not supported\n"); goto out; } if (le32_to_cpu(bb_tbl->tblks) != nr_blks) { ret = -EINVAL; - dev_err(ctrl->dev, "bbt unsuspected blocks returned (%u!=%u)", + dev_err(ctrl->device, + "bbt unsuspected blocks returned (%u!=%u)", le32_to_cpu(bb_tbl->tblks), nr_blks); goto out; } @@ -457,7 +458,8 @@ static int nvme_nvm_set_bb_tbl(struct nvm_dev *nvmdev, struct ppa_addr *ppas, ret = nvme_submit_sync_cmd(ns->ctrl->admin_q, (struct nvme_command *)&c, NULL, 0); if (ret) - dev_err(ns->ctrl->dev, "set bad block table failed (%d)\n", ret); + dev_err(ns->ctrl->device, "set bad block table failed (%d)\n", + ret); return ret; }