From patchwork Fri Feb 2 21:00:18 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Desnoyers X-Patchwork-Id: 13543411 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by smtp.lore.kernel.org (Postfix) with ESMTP id 3CCD2C4828F for ; Fri, 2 Feb 2024 21:01:06 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 380236B009B; Fri, 2 Feb 2024 16:00:35 -0500 (EST) Received: by kanga.kvack.org (Postfix, from userid 40) id 2D7BD6B009C; Fri, 2 Feb 2024 16:00:35 -0500 (EST) X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 12C096B009D; Fri, 2 Feb 2024 16:00:35 -0500 (EST) X-Delivered-To: linux-mm@kvack.org Received: from relay.hostedemail.com (smtprelay0013.hostedemail.com [216.40.44.13]) by kanga.kvack.org (Postfix) with ESMTP id EE9D46B009B for ; Fri, 2 Feb 2024 16:00:34 -0500 (EST) Received: from smtpin26.hostedemail.com (a10.router.float.18 [10.200.18.1]) by unirelay06.hostedemail.com (Postfix) with ESMTP id E3E6BA1B88 for ; Fri, 2 Feb 2024 21:00:33 +0000 (UTC) X-FDA: 81748082346.26.5BDA6FE Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) by imf22.hostedemail.com (Postfix) with ESMTP id 38EB6C0028 for ; Fri, 2 Feb 2024 21:00:32 +0000 (UTC) Authentication-Results: imf22.hostedemail.com; dkim=pass header.d=efficios.com header.s=smtpout1 header.b=EUrM2Ixo; spf=pass (imf22.hostedemail.com: domain of mathieu.desnoyers@efficios.com designates 167.114.26.122 as permitted sender) smtp.mailfrom=mathieu.desnoyers@efficios.com; dmarc=pass (policy=none) header.from=efficios.com ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=hostedemail.com; s=arc-20220608; t=1706907632; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references:dkim-signature; bh=86cxj+xCR2VKZSzMElfFRPicz5DfDFyVUExhe2tu2h0=; b=FkacFnYGA3+ra5LQNNGJLq3d3pzpIYpg1cWexiBfHVmN+wppw/FiidUxMWGSDf18QstV0p WP3evseHWdLyw9NikvVF4bY9UkeVNcKZU9cttS3tjxR6cJxbkh4yvU5vza42BI88y4GnqD KZdshh1SmmXrkneFwJoRISl45K6gpLI= ARC-Seal: i=1; s=arc-20220608; d=hostedemail.com; t=1706907632; a=rsa-sha256; cv=none; b=dufTbbw6MDJLrpPpe0Jgb7jQydDH5JTOtgVkV+3Y0LqEcoYlS9VFr1moIsz60R5cqbEtoO IXiWDjvfqIv4KR660uK6ys0szcQgj9Cj3eCw/jxo3OIQQeU1NqjwLeHzS4lu8DL+jy7y88 FQeQvkiJtu52FH3oUFXk8cvQ9VWVQ9c= ARC-Authentication-Results: i=1; imf22.hostedemail.com; dkim=pass header.d=efficios.com header.s=smtpout1 header.b=EUrM2Ixo; spf=pass (imf22.hostedemail.com: domain of mathieu.desnoyers@efficios.com designates 167.114.26.122 as permitted sender) smtp.mailfrom=mathieu.desnoyers@efficios.com; dmarc=pass (policy=none) header.from=efficios.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1706907631; bh=oenQ3E1qB1jTPZO/gOZI9CMarWIZCEOT7s/3o23TNGM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=EUrM2IxoVXxxnRIToHQMZOhPk9gxQubStmbtthZYDw31vk3Gq1zHoqE9Ipozu0q5V 1hYJcL+h/XhwcyH8vbLeRzSvrpkAvpK+j6vGZ5gKg3jf+e6YcbhDmWRqfsRUydwl6N u3nI3iwadMJcDptIbtAz09OhK6R4EUWG/IkwBtKQK0NmTM9ACIBQkgSXMZNP0oQH/P 3i3Z0mkQs5yN7of8m/Kvi9WJ8sjL58PdgznpGnfRt+ZtXTAMiSixlS3z7EcPPk8nhL Jgk3wmuH6ir19MMCyUpNqZz/UFitX1O12pMxzZaD4j4jy7oAuJ9XuL7M5LU9pBLcEf rJ90dLYux73mA== Received: from thinkos.internal.efficios.com (192-222-143-198.qc.cable.ebox.net [192.222.143.198]) by smtpout.efficios.com (Postfix) with ESMTPSA id 4TRSpl28gvzX2M; Fri, 2 Feb 2024 16:00:31 -0500 (EST) From: Mathieu Desnoyers To: Dan Williams , Arnd Bergmann , Dave Chinner Cc: linux-kernel@vger.kernel.org, Mathieu Desnoyers , Andrew Morton , Linus Torvalds , Vishal Verma , Dave Jiang , Matthew Wilcox , Russell King , linux-arch@vger.kernel.org, linux-cxl@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-xfs@vger.kernel.org, dm-devel@lists.linux.dev, nvdimm@lists.linux.dev, linux-s390@vger.kernel.org, Alasdair Kergon , Mike Snitzer , Mikulas Patocka Subject: [RFC PATCH v4 11/12] dcssblk: Cleanup alloc_dax() error handling Date: Fri, 2 Feb 2024 16:00:18 -0500 Message-Id: <20240202210019.88022-12-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240202210019.88022-1-mathieu.desnoyers@efficios.com> References: <20240202210019.88022-1-mathieu.desnoyers@efficios.com> MIME-Version: 1.0 X-Stat-Signature: htm6cudwym133zys4xgdeznrsu7k8x4f X-Rspamd-Server: rspam10 X-Rspamd-Queue-Id: 38EB6C0028 X-Rspam-User: X-HE-Tag: 1706907632-375150 X-HE-Meta: U2FsdGVkX18VLDFmv3LykJPBI/B389xoCRdodTuqdHvwG1nfe04LUWXQUc7zjdmn0dG6tQNkXtHASKATeYs8jLR3xGg8MT3dlYpPwUD/7LccRH08YYusRXNWHGp2MLw0Fbd0IqFLRpwkMnOcST56I/T9qLsj/h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KZPuv4DmmUlGD0Fy2yUfvntJ7/vTzB6aipR1HQwd6ieEq2d0rTLWEleHK2Mb6eRjYP/9bLgBoS2zH0lpdg+5MhpKTXeEsaND/x623/CCaOjT+ThKovP/PubInT2BAlOEg7uKyNgm+FWlq48z9dtUq6kkyNmkCBb9gerwxaJ0QoWMJu+QqCtnnXQaIZn8qpY8cE/rZDPiALhRS9RsPMtYpLxfCAHgQAXHKKvq8bfKHcnoUs5H5iJ5afMIdWd9ohAgU7XIXPO2ZGioOVy1GNeloS+i5QHrDDu8SvRyYcBrwLP9QI+rLhJzaKRd3fOo1n16UhglN3R5YxIGhPxDmp57r9ulz1l1mLXUgN9wE+Gka0gpKJq0wUaZPm44fiVMjOEg8NgF2sxTPc5rVRxQEz3HvlU= X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: List-Subscribe: List-Unsubscribe: Now that alloc_dax() returns ERR_PTR(-EOPNOTSUPP) rather than NULL, the callers do not have to handle NULL return values anymore. Signed-off-by: Mathieu Desnoyers Cc: Alasdair Kergon Cc: Mike Snitzer Cc: Mikulas Patocka Cc: Andrew Morton Cc: Linus Torvalds Cc: Dan Williams Cc: Vishal Verma Cc: Dave Jiang Cc: Matthew Wilcox Cc: Arnd Bergmann Cc: Russell King Cc: linux-arch@vger.kernel.org Cc: linux-cxl@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org Cc: linux-mm@kvack.org Cc: linux-xfs@vger.kernel.org Cc: dm-devel@lists.linux.dev Cc: nvdimm@lists.linux.dev Cc: linux-s390@vger.kernel.org --- drivers/s390/block/dcssblk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/s390/block/dcssblk.c b/drivers/s390/block/dcssblk.c index a3010849bfed..f363c1d51d9a 100644 --- a/drivers/s390/block/dcssblk.c +++ b/drivers/s390/block/dcssblk.c @@ -679,8 +679,8 @@ dcssblk_add_store(struct device *dev, struct device_attribute *attr, const char goto put_dev; dax_dev = alloc_dax(dev_info, &dcssblk_dax_ops); - if (IS_ERR_OR_NULL(dax_dev)) { - rc = IS_ERR(dax_dev) ? PTR_ERR(dax_dev) : -EOPNOTSUPP; + if (IS_ERR(dax_dev)) { + rc = PTR_ERR(dax_dev); goto put_dev; } set_dax_synchronous(dax_dev);