From patchwork Tue Jan 12 06:49:22 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: 8014241 X-Patchwork-Delegate: axboe@kernel.dk 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 4D44EBEEE5 for ; Tue, 12 Jan 2016 06:57:15 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 720CE20379 for ; Tue, 12 Jan 2016 06:57:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9EF53201F4 for ; Tue, 12 Jan 2016 06:57:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1761442AbcALGvM (ORCPT ); Tue, 12 Jan 2016 01:51:12 -0500 Received: from mail-wm0-f42.google.com ([74.125.82.42]:37655 "EHLO mail-wm0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1760928AbcALGuE (ORCPT ); Tue, 12 Jan 2016 01:50:04 -0500 Received: by mail-wm0-f42.google.com with SMTP id f206so303684220wmf.0 for ; Mon, 11 Jan 2016 22:50:03 -0800 (PST) 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-type:content-transfer-encoding; bh=Eavn6DblbHahE0R4RPezhyp/x06Eky00yZKavOPrSz4=; b=D+uOl3OstQCAiQBlFqx3wbGv/0i4ysIOIqRsmM0VswBPo0yDEzwA8eJy3lK2tNajmm CET+A9HX4SPREVane6/8G88T7IK7YNc0CltB4xFtpEoZzR+reHCkWIDO7wfldd9K76ur 80CMEsYFmM5PDBUD6lMfv353O8BSnje+mNdwE= 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-type:content-transfer-encoding; bh=Eavn6DblbHahE0R4RPezhyp/x06Eky00yZKavOPrSz4=; b=TiDjWvV6uBg+tx9uJ3y0HhM60E4imOEUQqnuh01SHS3xKLZ26+3H6gNTg8rFlFekkQ SRM22zURZ2k7VjBHfs6h31TK3zqSHVAi8Mg7RE+hC73XaErZ/wzOkz3yoh6V7J/9Uc2E yez4LNL9hw3wDyKFTqqoM5tMKBDpXfkdeh4lDB03R3FM1IpNbOp/as7pBokPHmZDKYLB wQQ57NIHSBhFUttYWmMeYgWyUyzhPDbfMUrwor8KnryiE+rpfhcxTmpKsMFQgFuKrRZw pnWyM3uM9a+gukGJWuBQL79YsNFRxnUWjw50IXgFa49v9XO+9kqwPoUqn1Ac0crQ6+sY 2S0w== X-Gm-Message-State: ALoCoQkDjBudRVKKm15TRQvhhFwHAlD0bUmBe7YkGnygli94BAah6oyRSnFW2F164oT8tiISPyfc3+nizcn3TL4CJes8I7TzdA== X-Received: by 10.194.87.201 with SMTP id ba9mr140858482wjb.125.1452581403092; Mon, 11 Jan 2016 22:50:03 -0800 (PST) Received: from localhost.localdomain (6164198-cl69.boa.fiberby.dk. [193.106.164.198]) by smtp.gmail.com with ESMTPSA id yz5sm70776886wjc.36.2016.01.11.22.50.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 11 Jan 2016 22:50:02 -0800 (PST) From: =?UTF-8?q?Matias=20Bj=C3=B8rling?= To: linux-block@vger.kernel.org, linux-kernel@vger.kernel.org, axboe@fb.com Cc: =?UTF-8?q?Matias=20Bj=C3=B8rling?= Subject: [PATCH 08/25] lightnvm: return the get_bb_tbl return value Date: Tue, 12 Jan 2016 07:49:22 +0100 Message-Id: <1452581379-18162-9-git-send-email-m@bjorling.me> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1452581379-18162-1-git-send-email-m@bjorling.me> References: <1452581379-18162-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=-6.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,RP_MATCHES_RCVD,T_DKIM_INVALID,UNPARSEABLE_RELAY autolearn=ham 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 During get_bb_tbl, a callback is used to allow an user-specific scan function to be called. The callback may return an error, and in that case, the return value is overridden. However, the callback error is needed when the fault is a user error and not a kernel error. For example, when a user tries to initialize the same device twice. The get_bb_tbl callback should be able to communicate this. Signed-off-by: Matias Bjørling --- drivers/nvme/host/lightnvm.c | 5 ----- 1 file changed, 5 deletions(-) diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index 1d1830e..b112f02 100644 --- a/drivers/nvme/host/lightnvm.c +++ b/drivers/nvme/host/lightnvm.c @@ -405,11 +405,6 @@ static int nvme_nvm_get_bb_tbl(struct nvm_dev *nvmdev, struct ppa_addr ppa, ppa = dev_to_generic_addr(nvmdev, ppa); ret = update_bbtbl(ppa, nr_blocks, bb_tbl->blk, priv); - if (ret) { - ret = -EINTR; - goto out; - } - out: kfree(bb_tbl); return ret;