From patchwork Mon Jan 27 06:48:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sachin Kamat X-Patchwork-Id: 23738 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f70.google.com (mail-pb0-f70.google.com [209.85.160.70]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id D37912130F for ; Mon, 27 Jan 2014 06:52:57 +0000 (UTC) Received: by mail-pb0-f70.google.com with SMTP id rq2sf13809276pbb.1 for ; Sun, 26 Jan 2014 22:52:56 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:list-post:list-help:list-archive :list-unsubscribe; bh=ozZPL5A6yLEQtAjFZz5H7cnnYJGO0clq6e/44oEsmPQ=; b=LY/9DVpFA+55oTogc+m0WRdnfwoFMTXViSfjqRE/win9Er0I+OgIYCYlJ1Y5wu7O9V +FausyYUFKYD22LjBpYpeHhpJM9p3H/xYUbKGDsQ7T0ASOl8gQaSxvKxF320RBNZWW6J hjA97VthOL6kiiTq3807V6vBA4FnGATw0Rioc6OtBSb8c2A8K8jqa3KuffGSJRCSSEZW 0RlRvZLtdKYNLxy9eqts1NsCJmY3wjMlESAep/SGsYLReMneOkgD9grJjuYWo6o2e2BZ SLwX8C3KEGf8f6dNkrI6ar0tM/5vUvdHFNcjCwJeQd7QYu2gpZLAJopPkkUSHrtiTBVf C/XA== X-Gm-Message-State: ALoCoQmKDBBS1JPaAeExcLC7rbewWrGlPFHphJXjwLqu7FLas4S6cSdnIxqAA7zCPkkuslwRsYV9 X-Received: by 10.66.189.163 with SMTP id gj3mr10116114pac.32.1390805576357; Sun, 26 Jan 2014 22:52:56 -0800 (PST) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.25.198 with SMTP id 64ls1526247qgt.31.gmail; Sun, 26 Jan 2014 22:52:56 -0800 (PST) X-Received: by 10.58.49.129 with SMTP id u1mr4389536ven.0.1390805576178; Sun, 26 Jan 2014 22:52:56 -0800 (PST) Received: from mail-vb0-f54.google.com (mail-vb0-f54.google.com [209.85.212.54]) by mx.google.com with ESMTPS id ja16si4759144vec.126.2014.01.26.22.52.56 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 26 Jan 2014 22:52:56 -0800 (PST) Received-SPF: neutral (google.com: 209.85.212.54 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.212.54; Received: by mail-vb0-f54.google.com with SMTP id w20so3163355vbb.13 for ; Sun, 26 Jan 2014 22:52:56 -0800 (PST) X-Received: by 10.52.57.194 with SMTP id k2mr75437vdq.41.1390805576108; Sun, 26 Jan 2014 22:52:56 -0800 (PST) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.220.174.196 with SMTP id u4csp108532vcz; Sun, 26 Jan 2014 22:52:55 -0800 (PST) X-Received: by 10.66.141.231 with SMTP id rr7mr27747752pab.41.1390805575057; Sun, 26 Jan 2014 22:52:55 -0800 (PST) Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by mx.google.com with ESMTPS id s7si10076390pae.301.2014.01.26.22.52.54 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 26 Jan 2014 22:52:55 -0800 (PST) Received-SPF: neutral (google.com: 209.85.220.49 is neither permitted nor denied by best guess record for domain of sachin.kamat@linaro.org) client-ip=209.85.220.49; Received: by mail-pa0-f49.google.com with SMTP id hz1so5535911pad.36 for ; Sun, 26 Jan 2014 22:52:54 -0800 (PST) X-Received: by 10.66.159.233 with SMTP id xf9mr1459093pab.139.1390805574560; Sun, 26 Jan 2014 22:52:54 -0800 (PST) Received: from linaro.sisodomain.com ([115.113.119.130]) by mx.google.com with ESMTPSA id un5sm77645413pab.3.2014.01.26.22.52.51 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sun, 26 Jan 2014 22:52:53 -0800 (PST) From: Sachin Kamat To: linux-btrfs@vger.kernel.org Cc: clm@fb.com, jbacik@fb.com, sachin.kamat@linaro.org, patches@linaro.org Subject: [PATCH 1/2] btrfs: Use PTR_ERR_OR_ZERO Date: Mon, 27 Jan 2014 12:18:14 +0530 Message-Id: <1390805294-24617-1-git-send-email-sachin.kamat@linaro.org> X-Mailer: git-send-email 1.7.9.5 X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: sachin.kamat@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.212.54 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , PTR_RET is deprecated. Use PTR_ERR_OR_ZERO instead. While at it also include missing err.h header. Signed-off-by: Sachin Kamat --- fs/btrfs/root-tree.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fs/btrfs/root-tree.c b/fs/btrfs/root-tree.c index 1389b69059de..38bb47e7d6b1 100644 --- a/fs/btrfs/root-tree.c +++ b/fs/btrfs/root-tree.c @@ -16,6 +16,7 @@ * Boston, MA 021110-1307, USA. */ +#include #include #include "ctree.h" #include "transaction.h" @@ -271,7 +272,7 @@ int btrfs_find_orphan_roots(struct btrfs_root *tree_root) key.offset++; root = btrfs_read_fs_root(tree_root, &root_key); - err = PTR_RET(root); + err = PTR_ERR_OR_ZERO(root); if (err && err != -ENOENT) { break; } else if (err == -ENOENT) {