From patchwork Thu Feb 8 18:49:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Desnoyers X-Patchwork-Id: 198537 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp383921dyd; Thu, 8 Feb 2024 10:58:40 -0800 (PST) X-Google-Smtp-Source: AGHT+IHGYaVuhpd2X8s9zHNshEfBtrbxSwPhKDZaG6rRW+K7VbG6Rl1idkbg9m6Mah7CnfO2IbS7 X-Received: by 2002:ac8:70da:0:b0:42a:4889:b12 with SMTP id g26-20020ac870da000000b0042a48890b12mr57213qtp.33.1707418720558; Thu, 08 Feb 2024 10:58:40 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707418720; cv=pass; d=google.com; s=arc-20160816; b=ZYp+5J4tcZUIedpSdw4m6aio2SBAldYjDtTG6URtfjeryl6ZG/Wb5MDs6zleUwj23C rVMuLOHnRhx8/bwlHAzH5uiVQxKOi4nFUlo015lu2GEG3zP/QNwRxLjCTzy4n1qDtGs3 vZlNfJ954JUXx4YTPUr5++AfHAmFTpSfKEpCEL8GmigabZXjddmA2MfgG1ULxhz0t8J8 e7RSYT0JgTPvQF2vTDEItYytVtyVaZuqaz7wGe359nVGgGQXRq/cn0l3JBlHUglvsZzn 4U5RYvIUbmzc12H8iVwFIb+w/poaircHgWBdPlJeHlgJvEY1bWGWfLQojenI8OS6RtDF J9ow== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=86cxj+xCR2VKZSzMElfFRPicz5DfDFyVUExhe2tu2h0=; fh=T9vw4zfB+b/B9CphNZuEFWCyAru8Jf1u4sPJRg7knK0=; b=C2Mg+4mFz2SgMInRLX4qjNHpUQTySgX/18PPkvOHHwZfR7ZT7t40y1f5Rspcn3266I Z/4CuDTZJ6Y8kwuyR1xneMLa+DS+cYYJ1FZPVGS2UAdy26RbDxC7W9vGqwz2Z3wCSPrE ozkVN6Ejjt09YO788fbSaFRp+Wi6PiC2p1Hf3g5mgvhilbBYH2VzzefjMydRZsEw+gOJ mph5edTYcBsjMl+KjGjokuNyn/PYopXjlnbcXw4sGjv4tqNGk9vHkc135m40hGct6rOp JIcn3i+RWqHyq6vYSrl8D9KFYjWjVgX7UaFreDLVJucHndMczrJ+qA0wk6hDBuPDkO4r v8cA==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b="bRoE/7ia"; arc=pass (i=1 spf=pass spfdomain=efficios.com dkim=pass dkdomain=efficios.com dmarc=pass fromdomain=efficios.com); spf=pass (google.com: domain of linux-kernel+bounces-58581-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58581-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com X-Forwarded-Encrypted: i=2; AJvYcCWt2900zQCtbieNkiSoeFh7r8tDje5MreGPZLhkZ4nNqdKhC92BwSSQvmGsA5fWHF3mowSlmx2+M96rwUJa4r+0ScwTxA== Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id o6-20020a05622a138600b0042c44be9c20si65709qtk.507.2024.02.08.10.58.40 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 10:58:40 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58581-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b="bRoE/7ia"; arc=pass (i=1 spf=pass spfdomain=efficios.com dkim=pass dkdomain=efficios.com dmarc=pass fromdomain=efficios.com); spf=pass (google.com: domain of linux-kernel+bounces-58581-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58581-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 84EA51C2A2F4 for ; Thu, 8 Feb 2024 18:57:47 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id C2F4450241; Thu, 8 Feb 2024 18:49:46 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="bRoE/7ia" Received: from smtpout.efficios.com (smtpout.efficios.com [167.114.26.122]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 42D6336B0A; Thu, 8 Feb 2024 18:49:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=167.114.26.122 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707418179; cv=none; b=Rx0pjoEThpJF9C3ol0VEaIuKnk7thMVjiNGYB8tVB/wrVYiPa54LLB4/rQYnCfsVR+Q75tMOQuAbDXCkx+fRrZC7am5HN2r4mzWvfsmc+RhDJstmjGGOkHi4l0slMY0Ew8hFizlyJLba5yKzGZqPDSfmLzI0DL5s7DyUnkR7Oqs= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707418179; c=relaxed/simple; bh=oenQ3E1qB1jTPZO/gOZI9CMarWIZCEOT7s/3o23TNGM=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=o7Te099srwSFaYnuKlr8GIxKIgiyz7gSd8xlk8c9+KHuygobh4nZSscOrMaXAU+RV2w42x73tpJE9wPub3pEP+mLvOjHXnCg5xfippvz2jquYXVNSAx9JKKCIr7vM9AveVy1b6yf9yy3Z6rNzNxOOwpZHwwXd1QJp1ZWVm61Kxk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com; spf=pass smtp.mailfrom=efficios.com; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b=bRoE/7ia; arc=none smtp.client-ip=167.114.26.122 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=efficios.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=efficios.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=efficios.com; s=smtpout1; t=1707418167; bh=oenQ3E1qB1jTPZO/gOZI9CMarWIZCEOT7s/3o23TNGM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=bRoE/7ia1+B9bPI5yF1PR2T1XA93zIRBnTcH0eC3l0F5DKqYSeR5Nk0tY93pHHcMe SB173/Unk3i9YjDHq2INIyynyUJBpjhZxr/0L5wI/UAMDPahLp/TVB7Y5vIH5N5AE5 crMulQ2zXJos7wtuG6cN1nQG0cu1edkRYscl6pnAbz3KIhoZ8H50j2WoCr0/ks/Omt UUlXIcysLpTzkhjiT5Iptlazn5vqIFc3f+yfGuUzmScLfFjYAiJ1vOAPY4DDm2eyWC 3cTHV3qAZzEPVR6WjB/op0ynHNQPoZFIweA7jAiVScoeq13l0Lfy00tVuzsdsZm7a2 9S+WBZwfWHPmQ== 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 4TW5cl1F3pzY5T; Thu, 8 Feb 2024 13:49:27 -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: [PATCH v4 11/12] dcssblk: Cleanup alloc_dax() error handling Date: Thu, 8 Feb 2024 13:49:12 -0500 Message-Id: <20240208184913.484340-12-mathieu.desnoyers@efficios.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20240208184913.484340-1-mathieu.desnoyers@efficios.com> References: <20240208184913.484340-1-mathieu.desnoyers@efficios.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790358292381565600 X-GMAIL-MSGID: 1790358292381565600 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);