Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp469403rdb; Thu, 8 Feb 2024 10:57:06 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUvPPVIQ3YqRgvDnr72nnPQe+R6IowS3YeCR4er8AHb2byZI35d/fC/gKh7ME1hncSt4G2QvyrD0N6VETVmXaUOb8khMuOxeQOG+baJtQ== X-Google-Smtp-Source: AGHT+IHzkQ5fg2dYIVYcKxk0QbWNDJ0VnB6WCrqRAPZcAV5zdaGhY4j4fQibrOo+UvnZqv7cHoSZ X-Received: by 2002:a05:6808:2205:b0:3bd:e42c:eed9 with SMTP id bd5-20020a056808220500b003bde42ceed9mr280497oib.43.1707418626149; Thu, 08 Feb 2024 10:57:06 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707418626; cv=pass; d=google.com; s=arc-20160816; b=MoxnhEs1lOVztF67d5NuN10eLy4sT94TOMPIWjFwRK1CIJgmIVvQnJrvPCrDpLCVZS 3t3EC10XUsylNTRBeOBFC1aBikkQqs4SwrTgex3rJQaV1VEuvXqbaWwylBhoKIrqJgha UzScw4J7DVqciAcM/JH0wWKZ9BkmZnb8QMSH1ffjpLlXpmdZZFGiZrFQHKU3ALhRYaDa TawS+gQU9zBP0wa21AKhJHBDRF6FwdMcPew9gqsSzdit31b/tgi+ngtIeoPq2BKrzI2H RUzyQFfgWIWk9keNvoOolfBwI7nprqElq5axRtBXs2XT/iyx65tpRV1800Hiqr3zpsSp jBOA== 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=M/l3w5J0gRKX2dpYvmIz6vr4xoT8EtwTyWYFokXaqsQ=; fh=mX+F5hTq8P2nbyzs2CWJXABtBuG81TlzGcrtOKmr8r0=; b=Bef5rJp/Bu1dLdLUP5JK7F5s4N9VJyqkgvhk4DvSR8UyGu9HGygwPUUnhqL31QQpkD bCNy6k8WyuqmXUyj4z/8NXZTJb0mStxESFP5m+RsZ5H9cpsMEBclHqgWCOoWM50SV5ta SCDFn5SB21r7bkG5aAsXIGiqGUI+MIIx1J+6TkOZ1UqKEhrD3c1d9RzF91npmXTunno4 AFWqo01TtSfCG2bFHwRfUItZauI/hwoWBTAlL3Pd9oFXp0BH8J3LjlOeZ98XvEbwffLX 0JV58NsLzJOKRgHD9ilejQqlz/bktAGe28eahQmcWpiLnt5svm59zkbip0czKrXgepjJ ZFYw==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=TAhR2aeh; 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-58579-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58579-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=efficios.com X-Forwarded-Encrypted: i=2; AJvYcCWY2G6+vq1FZanJVj4Q0fvMYhSKqiJjSxqse/WfNe5eraxXdTZmJfiPA3jDCOMMwVnPCRG2JofqyfcdqsWA+ytDJrwsZsmi+G7SV6tcoA== Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id k18-20020a05620a07f200b00785a28f363fsi187464qkk.396.2024.02.08.10.57.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 08 Feb 2024 10:57:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-58579-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@efficios.com header.s=smtpout1 header.b=TAhR2aeh; 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-58579-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-58579-linux.lists.archive=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 47ED31C29D6A for ; Thu, 8 Feb 2024 18:55:39 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id DEA454CB24; Thu, 8 Feb 2024 18:49:42 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=efficios.com header.i=@efficios.com header.b="TAhR2aeh" 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 9829625634; 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=1707418178; cv=none; b=Ek5xibD5ebuoaITrFAhKuU1azeoOi5TEcx6IlytFjXMbgofs5IkklisuPA6UJR25utJ2LFHKM539yvKZrrgELWQ1OAd6mhWyb+1n7NXZqhJeLLQyOkMvt6ALCn80Po4W/aEe8cuDqmFi/xvO0etuEYA6L/4mgjMjraC391mdoGM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707418178; c=relaxed/simple; bh=3qwtk0TzM3yqkpdWTkMn8G1D7Yvm6JJDP82nQNcfpzk=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=EdHb3WzvT7aVq+5nmlb7miLkhblJvZib0QY1ssaDyvLWy7WeQD+RvH1oaVR1hONV57+QXNP3P0+6S9vRcg4f6J7+Rrzc4geuprWleqWo27mmw9s0IpP2sg85QI0jM+LIN6F6Bpd8roO2j7jhHTwXMWZTvzaKm8CUvRYkC6/skT4= 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=TAhR2aeh; 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=3qwtk0TzM3yqkpdWTkMn8G1D7Yvm6JJDP82nQNcfpzk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=TAhR2aehSVIy+7kxOHR6NVnmGYlp9kd5ycnTSBAI6hceetyhQOWUUfcm/nFiep+a1 kEkco0j8ZB4aI7AGUsK7I6wOE9xdzR/fBQB/pGe+tbFE1K6mzmAeXB5d7S7zA0bRWj ip3Ju2dZR0HVfK7H2Y2FckrBH/MiPVeZX1zh4NiDcc1BLONE3/lFUOu67rYwA1XBw6 zqyIy2GXXYMOivh7iSp4mwMGUu1002g4dcG4icNksUO16LHayffi2x7O5HtglehPmp B5lutv1FF5uLG4qLTgKWQTdXfMpywAxesrzwZXGsCyTz/972b+6tAcEMA0N6RREPQK fjRsnlrFyE3ww== 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 4TW5ck5SmGzY2M; Thu, 8 Feb 2024 13:49:26 -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 10/12] dm: Cleanup alloc_dax() error handling Date: Thu, 8 Feb 2024 13:49:11 -0500 Message-Id: <20240208184913.484340-11-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 Content-Transfer-Encoding: 8bit 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 --- drivers/md/dm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/md/dm.c b/drivers/md/dm.c index 2fc22cae9089..acdc00bc05be 100644 --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -2124,8 +2124,8 @@ static struct mapped_device *alloc_dev(int minor) sprintf(md->disk->disk_name, "dm-%d", minor); dax_dev = alloc_dax(md, &dm_dax_ops); - if (IS_ERR_OR_NULL(dax_dev)) { - if (IS_ERR(dax_dev) && PTR_ERR(dax_dev) != -EOPNOTSUPP) + if (IS_ERR(dax_dev)) { + if (PTR_ERR(dax_dev) != -EOPNOTSUPP) goto bad; } else { set_dax_nocache(dax_dev); -- 2.39.2