From patchwork Tue Apr 13 10:52:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matias Bjorling X-Patchwork-Id: 12200079 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6F986C433B4 for ; Tue, 13 Apr 2021 10:53:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4C6ED613C4 for ; Tue, 13 Apr 2021 10:53:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236800AbhDMKxa (ORCPT ); Tue, 13 Apr 2021 06:53:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39530 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237553AbhDMKx3 (ORCPT ); Tue, 13 Apr 2021 06:53:29 -0400 Received: from mail-ej1-x62d.google.com (mail-ej1-x62d.google.com [IPv6:2a00:1450:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F9BCC061756 for ; Tue, 13 Apr 2021 03:53:09 -0700 (PDT) Received: by mail-ej1-x62d.google.com with SMTP id x12so4379182ejc.1 for ; Tue, 13 Apr 2021 03:53:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=mWYBsQ0iIq/Mj+dRpMPNfNZQS2gmrRMV8eFiQixkTZE=; b=0clnAYrPNJhATfqG5vCSG9fDtOQIfLlRqZjM4+Abz4WEMrqgE4+Y+NypYdOhgbi9kJ gHYqRGAU3I8vA+3oB83bsQX/MJ6inaWg5kBiKUQo86v5btc7RbMSoUXoXgE/xgTeUQ8M aSk333uJE5HyfmG8UT9usWeNaR14MacX5AtZ/8ymeUpX9FNH/8xNnAtGWa0oZP+aH7FR lfhVBOa61R53eI51scpntevUuai7ffqUvhfLuLsFl4dGeQicmNSpPJOcQbx5w5XgCCez pbg3Tfo776dz2XZdFL/d9Yqt+Bmdn0vvMx9pNFrpl8nGpmfKdRNHt5HGFPOamFiLwzoa xk3g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=mWYBsQ0iIq/Mj+dRpMPNfNZQS2gmrRMV8eFiQixkTZE=; b=ufiFpeSja9BbGP02JcTnAuHd8HKWy3gP4o7h0wJiFOfU+8pQeCVL/kVzJPL07UB52M pFQnDBQO9MLZGKSvc9pkwZVL15StqGPZCd6ZAMOf2OdjsLNivV1WCXB0h8U+l92Yuxv3 7EeV+RDyc/9Cmg8rCwBekboHZjzfZt1FnbtRjGmFuGiH+1NktfTJ2bcmF9nk7JRf4v9L 6Mq5+0IhpbWqc9PDuh8wuSSMAKkv2fvyxZeA4GdNk0mg8plccquYiI0mtSIxTAExGdCa X/dq9Y2HNRa81BWQicfAVZz4DQoxm3A7VdUSxxNnXjRNngDxy6AZMEKDfQqsPP1Wu2P3 ok6w== X-Gm-Message-State: AOAM533uFDuz6WwpRPIRBlIvv2mYypv6qmzbV+OAdiKMzfh4PNDEgJa7 W5cbvcUHAEXsXj/gZGTT6kQPMw== X-Google-Smtp-Source: ABdhPJxk07JKXg2XdwRQTV7d5YrDGj3/9ZD3LgBOKXrdRJC6juUrACqk4uX4e6jIzehU50tLw3WJcw== X-Received: by 2002:a17:906:80d6:: with SMTP id a22mr9859867ejx.277.1618311188262; Tue, 13 Apr 2021 03:53:08 -0700 (PDT) Received: from dellx1.cphwdc ([87.116.37.42]) by smtp.googlemail.com with ESMTPSA id m5sm9140064edi.52.2021.04.13.03.53.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 03:53:07 -0700 (PDT) From: " =?utf-8?q?Matias_Bj=C3=B8rling?= " X-Google-Original-From: =?utf-8?q?Matias_Bj=C3=B8rling?= To: axboe@kernel.dk Cc: linux-block@vger.kernel.org, Chaitanya Kulkarni , =?utf-8?q?Matias_Bj=C3=B8r?= =?utf-8?q?ling?= Subject: [PATCH 1/4] lightnvm: use kobj_to_dev() Date: Tue, 13 Apr 2021 10:52:54 +0000 Message-Id: <20210413105257.159260-2-matias.bjorling@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210413105257.159260-1-matias.bjorling@wdc.com> References: <20210413105257.159260-1-matias.bjorling@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Chaitanya Kulkarni This fixs coccicheck warning: drivers/nvme//host/lightnvm.c:1243:60-61: WARNING opportunity for kobj_to_dev() Signed-off-by: Chaitanya Kulkarni Signed-off-by: Matias Bjørling --- drivers/nvme/host/lightnvm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/nvme/host/lightnvm.c b/drivers/nvme/host/lightnvm.c index b705988629f2..e3240d189093 100644 --- a/drivers/nvme/host/lightnvm.c +++ b/drivers/nvme/host/lightnvm.c @@ -1240,7 +1240,7 @@ static struct attribute *nvm_dev_attrs[] = { static umode_t nvm_dev_attrs_visible(struct kobject *kobj, struct attribute *attr, int index) { - struct device *dev = container_of(kobj, struct device, kobj); + struct device *dev = kobj_to_dev(kobj); struct gendisk *disk = dev_to_disk(dev); struct nvme_ns *ns = disk->private_data; struct nvm_dev *ndev = ns->ndev; From patchwork Tue Apr 13 10:52:55 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matias Bjorling X-Patchwork-Id: 12200081 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id EB90BC43460 for ; Tue, 13 Apr 2021 10:53:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CDB1C613B7 for ; Tue, 13 Apr 2021 10:53:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237553AbhDMKxa (ORCPT ); Tue, 13 Apr 2021 06:53:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237637AbhDMKx3 (ORCPT ); Tue, 13 Apr 2021 06:53:29 -0400 Received: from mail-ej1-x629.google.com (mail-ej1-x629.google.com [IPv6:2a00:1450:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 21EAEC061574 for ; Tue, 13 Apr 2021 03:53:10 -0700 (PDT) Received: by mail-ej1-x629.google.com with SMTP id mh2so3613000ejb.8 for ; Tue, 13 Apr 2021 03:53:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=vK+P6yZH8yZzrPNQ8OJQLkBIHcLK9frC/HeCWw+8mU0=; b=NCxWM1hNqK8I07R6oQdD6Om79rQI23rMT5Jw7n5er8CWflLYHJwPqhsnB8AcTaYCn8 xbEy4bZRGX7zHGOiWjwHettp7FtRvZaS6ADflg1ay3Tqoiy1aX9AO0XA/1AnxBdnbVpT fgf/Z6P3/1baYQuXwUuqy3z1tM3C64Zep8BoV+e9JcV1I/vMtGKvX1eBPhbB+kVJ6mES QByLY7iuOQTeaSX9Ya20/fFyilnErZc/NxGrWHPTz7Cila+ozLHY70jNduiNFsbo8xQl m11r38UIEpAPjOMCAs02nFyvXP+gHnCgUFR/wy6vNNJ2gkpLIsF+nxflxx6lVUQBcwgk cEeA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=vK+P6yZH8yZzrPNQ8OJQLkBIHcLK9frC/HeCWw+8mU0=; b=apnIyi2OWwqb5cFKFs/gOQnkkdNqRkcSb9T+Pu4PJ0azmhFUHDsFvGRepUWCTW/EZN Kr4Htcl6+Ky+UE4cbfAcUEfY/V0wHd2WVS8AIdMs15AfRiVj8DjKlHlkgFAiRjz6+IqR fqnq9jjpi4XPMw/U3upi3ppOQkQoaaZxntpTa7RmKTQH9aGooLXMYW3sPs4lQBE2XVt3 l7YlXrEhHh+21OsYBonb/zpNBg3QPqHajt/tC67Ud6PQxy4chKuW0dF8poDXiYQDs8PE DjdVx5i8x+INsZNnEVaZ9utsvJd0GO/IVUcoZWz1xbrLAzwKGaN1VWK4uFXzPGYERB51 Bwxw== X-Gm-Message-State: AOAM533gRzNnh7cUd7JzJs8cPBiQ5IpeATEEtlS37vhunzkc+2nMKTlq YQyR97i5R2L+Ljp15QEaSnxWK6/tyrbGAIE82sY= X-Google-Smtp-Source: ABdhPJyP435AIAsxqu0uKtzjWghzeVKumsnDacoPQZ6iJplx5UicHXfAfn/L9g2ukcrFetjpTc00Ow== X-Received: by 2002:a17:906:7c4:: with SMTP id m4mr32198019ejc.63.1618311188930; Tue, 13 Apr 2021 03:53:08 -0700 (PDT) Received: from dellx1.cphwdc ([87.116.37.42]) by smtp.googlemail.com with ESMTPSA id m5sm9140064edi.52.2021.04.13.03.53.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 03:53:08 -0700 (PDT) From: " =?utf-8?q?Matias_Bj=C3=B8rling?= " X-Google-Original-From: =?utf-8?q?Matias_Bj=C3=B8rling?= To: axboe@kernel.dk Cc: linux-block@vger.kernel.org, Tian Tao , =?utf-8?q?Matias_Bj=C3=B8rling?= Subject: [PATCH 2/4] lightnvm: return the correct return value Date: Tue, 13 Apr 2021 10:52:55 +0000 Message-Id: <20210413105257.159260-3-matias.bjorling@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210413105257.159260-1-matias.bjorling@wdc.com> References: <20210413105257.159260-1-matias.bjorling@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Tian Tao When memdup_user returns an error, memdup_user has two different return values, use PTR_ERR to get the correct return value. Signed-off-by: Tian Tao Signed-off-by: Matias Bjørling --- drivers/lightnvm/core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c index 28ddcaa5358b..42774beeba94 100644 --- a/drivers/lightnvm/core.c +++ b/drivers/lightnvm/core.c @@ -1257,7 +1257,7 @@ static long nvm_ioctl_info(struct file *file, void __user *arg) info = memdup_user(arg, sizeof(struct nvm_ioctl_info)); if (IS_ERR(info)) - return -EFAULT; + return PTR_ERR(info); info->version[0] = NVM_VERSION_MAJOR; info->version[1] = NVM_VERSION_MINOR; From patchwork Tue Apr 13 10:52:56 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matias Bjorling X-Patchwork-Id: 12200085 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2548CC433ED for ; Tue, 13 Apr 2021 10:53:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 065C9613C4 for ; Tue, 13 Apr 2021 10:53:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237637AbhDMKxd (ORCPT ); Tue, 13 Apr 2021 06:53:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39544 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237823AbhDMKxb (ORCPT ); Tue, 13 Apr 2021 06:53:31 -0400 Received: from mail-ej1-x644.google.com (mail-ej1-x644.google.com [IPv6:2a00:1450:4864:20::644]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CE643C06175F for ; Tue, 13 Apr 2021 03:53:10 -0700 (PDT) Received: by mail-ej1-x644.google.com with SMTP id w3so25209730ejc.4 for ; Tue, 13 Apr 2021 03:53:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=obEac+9Zc6bGKd4KfPkTZdxJfUx2XdIM7kC/FXrC9/c=; b=KonNN35cLh4+Zo8yZ5ceNhasSLNlDw3TZ0JBNLtKjP1q6+1WiAd4RBRxXKGb0HZZ9i Y4OeWPK3U5dItjY+b9WG+LyQMZSWbVvgniMFNsiev5Es/xoe7hAfEmQRZ4jc+rhia1jP u+JbrzjIoN9TXHl0Anfk38VrtbLkWxGBPsV40fZD4POEwweehx73YqXRJcpl6ozqryrE PMp/Tcsl46ceKICeLCxLBN8Aqdn9NRZyYu4LPs4vkYwZBd5VuW24LT8cFfc+2gKjWpyf WivCUx6CKsY0As0BNFTj9+TGsNsc+iiRrsAJ4Za80W6nAnWQnAObv5ZtOe4q7Qwy9C+r fXag== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=obEac+9Zc6bGKd4KfPkTZdxJfUx2XdIM7kC/FXrC9/c=; b=iRsjUID8JRv1k7YS8ChYFcUiZs6/b6wgfxuJdkSQp15lFRk5Dnm9FGGv5F2ZHzND+Y pXm5Gi3r8PAs0qTUDOXjsymm089gv7dVj3dYY/B91SszWD+xVBeyUch6sI/gSidkKqYu WUG/ww2WIVZs2NQRKcPKvL2mitd/6RqExI+Gb3PqwUV/W6CZ+cIYALj1OR3RTZAYDlp5 6D1EPCqoGVjFHPKVH+UGGDhSYxmPQHrVilT3ET0MfDFZ94GzGQSD9YucxjDTGMXz8vW2 gzhxAOagfw7aMnmjHiVXN3ilf2DjUNYgOUjrrxrcoX5kAslUeAiYIl9BF9dotfkpCmZI a8Ew== X-Gm-Message-State: AOAM5315vc9FoUg1J/xJTHFc8Y6ylLGQbM/e5ZstLVlUpY4kKPWjbfIk To61zUKfze0NewxgkCeHMznkPw== X-Google-Smtp-Source: ABdhPJxpWFashQBS2gy90LyOD7Nv7Bo5FOPIVjCP8QbDdfuimCoh+C6KBmBg6FBuKFYLfS87x3LLFA== X-Received: by 2002:a17:906:c08f:: with SMTP id f15mr31722634ejz.318.1618311189604; Tue, 13 Apr 2021 03:53:09 -0700 (PDT) Received: from dellx1.cphwdc ([87.116.37.42]) by smtp.googlemail.com with ESMTPSA id m5sm9140064edi.52.2021.04.13.03.53.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 03:53:09 -0700 (PDT) From: " =?utf-8?q?Matias_Bj=C3=B8rling?= " X-Google-Original-From: =?utf-8?q?Matias_Bj=C3=B8rling?= To: axboe@kernel.dk Cc: linux-block@vger.kernel.org, Zhang Yunkai , =?utf-8?q?Matias_Bj=C3=B8rling?= Subject: [PATCH 3/4] lightnvm: remove duplicate include in lightnvm.h Date: Tue, 13 Apr 2021 10:52:56 +0000 Message-Id: <20210413105257.159260-4-matias.bjorling@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210413105257.159260-1-matias.bjorling@wdc.com> References: <20210413105257.159260-1-matias.bjorling@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Zhang Yunkai 'linux/blkdev.h' and 'uapi/linux/lightnvm.h' included in 'lightnvm.h' is duplicated.It is also included in the 5th and 7th line. Signed-off-by: Zhang Yunkai Signed-off-by: Matias Bjørling --- include/linux/lightnvm.h | 2 -- include/uapi/linux/lightnvm.h | 1 - 2 files changed, 3 deletions(-) diff --git a/include/linux/lightnvm.h b/include/linux/lightnvm.h index 1db223710b28..0908abda9c1b 100644 --- a/include/linux/lightnvm.h +++ b/include/linux/lightnvm.h @@ -112,10 +112,8 @@ struct nvm_dev_ops { #ifdef CONFIG_NVM -#include #include #include -#include enum { /* HW Responsibilities */ diff --git a/include/uapi/linux/lightnvm.h b/include/uapi/linux/lightnvm.h index ead2e72e5c88..2745afd9b8fa 100644 --- a/include/uapi/linux/lightnvm.h +++ b/include/uapi/linux/lightnvm.h @@ -22,7 +22,6 @@ #ifdef __KERNEL__ #include -#include #else /* __KERNEL__ */ #include #include From patchwork Tue Apr 13 10:52:57 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Matias Bjorling X-Patchwork-Id: 12200083 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-16.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0615C43461 for ; Tue, 13 Apr 2021 10:53:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id AB584613C0 for ; Tue, 13 Apr 2021 10:53:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S244880AbhDMKxc (ORCPT ); Tue, 13 Apr 2021 06:53:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39550 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237637AbhDMKxb (ORCPT ); Tue, 13 Apr 2021 06:53:31 -0400 Received: from mail-ej1-x634.google.com (mail-ej1-x634.google.com [IPv6:2a00:1450:4864:20::634]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB80BC061574 for ; Tue, 13 Apr 2021 03:53:11 -0700 (PDT) Received: by mail-ej1-x634.google.com with SMTP id n2so25148071ejy.7 for ; Tue, 13 Apr 2021 03:53:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lightnvm-io.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=c1p4UuWXUcDL5Md++SwHU7dqkkEr/TBzQyQcjlzcBQw=; b=tcSQR0S/SU9me1Ajo2o9ergyObgc7OaQXSgtS+l+5miEnb42187A7whMd2BofZL4v/ 7T5juKjej5UrUgs0rD9mnrz8ra3o+h4eYWb/aggLkPJGZ7hLHTiIrEGE7qhPomiRg8xP CcgKTVlZYuw4bXXyiw+jSt7XZpwqAUUQ0igbuXtSY1s/cKYShWy8GXdsRnvrE3HcmrT4 pUb/4fvCMbE2RSKO6vSqiNIN5iRFowbGTWctm6tPT7LRf1He2GW1Fbg98l77tU6FEiDw RiX+Y6dBdtYXy2aNeJBnHMAUoR5Sp3RvssduUZgD+tKOze090rUKlNyIbygeS0S3e3vD Bjcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=c1p4UuWXUcDL5Md++SwHU7dqkkEr/TBzQyQcjlzcBQw=; b=I8oe3iUl6Rrm8JO92RgOOWEbJ6k6Z/roSXjbn71Zkdx0kRvT8pjyvg+PhTpddOBd2x oMOCKMzm0YJ83NCpIpp6ghr2QXbdWHC9F8O/WfoIHlzmIhCcIzrYiCd9LUwgYsXcioih 7AtKMB+0a6R+9yNm80sBQlj3wMzF6Y9tIx3fGetcWva+usMqAu6fJEZZtIM6XdiJi11j ag32Cbbav6CnZ8+eS7GGonHET2CxP2nJkxaB0SkY536DT6/DYiJS+RRBkjr/uena+V9l zruQVWvcG02RA4XrJd/F9QDrCHcEX6kUfLFbf+PBf0H+feif7q9elt3WCG8eloeSlpww JJ7g== X-Gm-Message-State: AOAM531nkSDY7RMNM+7Umd2zCOTpl/sN/qx1u4+yILO4fiyu0eSSEvWr Sc32eq6DFxOAa697E6z+mExHZg== X-Google-Smtp-Source: ABdhPJxfZ4hijsdEAW+lZn8dtQ7MQBoHW9ksx6ii3MScJYyhatBmARFjMSoyh6EulIVTjAh7IS9RKA== X-Received: by 2002:a17:907:118c:: with SMTP id uz12mr23436488ejb.308.1618311190614; Tue, 13 Apr 2021 03:53:10 -0700 (PDT) Received: from dellx1.cphwdc ([87.116.37.42]) by smtp.googlemail.com with ESMTPSA id m5sm9140064edi.52.2021.04.13.03.53.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 13 Apr 2021 03:53:10 -0700 (PDT) From: " =?utf-8?q?Matias_Bj=C3=B8rling?= " X-Google-Original-From: =?utf-8?q?Matias_Bj=C3=B8rling?= To: axboe@kernel.dk Cc: linux-block@vger.kernel.org, Christoph Hellwig , =?utf-8?q?J?= =?utf-8?q?avier_Gonz=C3=A1lez?= , =?utf-8?q?Matias_Bj?= =?utf-8?q?=C3=B8rling?= Subject: [PATCH 4/4] lightnvm: deprecated OCSSD support and schedule it for removal in Linux 5.15 Date: Tue, 13 Apr 2021 10:52:57 +0000 Message-Id: <20210413105257.159260-5-matias.bjorling@wdc.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20210413105257.159260-1-matias.bjorling@wdc.com> References: <20210413105257.159260-1-matias.bjorling@wdc.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-block@vger.kernel.org From: Christoph Hellwig Lightnvm was an innovative idea to expose more low-level control over SSDs. But it failed to get properly standardized and remains a non-standarized extension to NVMe that requires vendor specific quirks for a few now mostly obsolete SSD devices. The standardized ZNS command set for NVMe has take over a lot of the approaches and allows for fully standardized operation. Remove the Linux code to support open channel SSDs as the few production deployments of the above mentioned SSDs are using userspace driver stacks instead of the fairly limited Linux support. Signed-off-by: Christoph Hellwig Reviewed-by: Javier González Signed-off-by: Matias Bjørling --- drivers/lightnvm/Kconfig | 4 +++- drivers/lightnvm/core.c | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/lightnvm/Kconfig b/drivers/lightnvm/Kconfig index 4c2ce210c123..04caa0f2d445 100644 --- a/drivers/lightnvm/Kconfig +++ b/drivers/lightnvm/Kconfig @@ -4,7 +4,7 @@ # menuconfig NVM - bool "Open-Channel SSD target support" + bool "Open-Channel SSD target support (DEPRECATED)" depends on BLOCK help Say Y here to get to enable Open-channel SSDs. @@ -15,6 +15,8 @@ menuconfig NVM If you say N, all options in this submenu will be skipped and disabled only do this if you know what you are doing. + This code is deprecated and will be removed in Linux 5.15. + if NVM config NVM_PBLK diff --git a/drivers/lightnvm/core.c b/drivers/lightnvm/core.c index 42774beeba94..40a948c08a0b 100644 --- a/drivers/lightnvm/core.c +++ b/drivers/lightnvm/core.c @@ -1174,6 +1174,8 @@ int nvm_register(struct nvm_dev *dev) { int ret, exp_pool_size; + pr_warn_once("lightnvm support is deprecated and will be removed in Linux 5.15.\n"); + if (!dev->q || !dev->ops) { kref_put(&dev->ref, nvm_free); return -EINVAL;