From mboxrd@z Thu Jan 1 00:00:00 1970 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 31C88C433EF for ; Thu, 28 Oct 2021 20:52:52 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 14017608FB for ; Thu, 28 Oct 2021 20:52:52 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231281AbhJ1UzS (ORCPT ); Thu, 28 Oct 2021 16:55:18 -0400 Received: from mga11.intel.com ([192.55.52.93]:35006 "EHLO mga11.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230451AbhJ1UzR (ORCPT ); Thu, 28 Oct 2021 16:55:17 -0400 X-IronPort-AV: E=McAfee;i="6200,9189,10151"; a="227963535" X-IronPort-AV: E=Sophos;i="5.87,190,1631602800"; d="scan'208";a="227963535" Received: from orsmga003.jf.intel.com ([10.7.209.27]) by fmsmga102.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 28 Oct 2021 13:30:00 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.87,190,1631602800"; d="scan'208";a="448113530" Received: from lkp-server01.sh.intel.com (HELO 3b851179dbd8) ([10.239.97.150]) by orsmga003.jf.intel.com with ESMTP; 28 Oct 2021 13:29:58 -0700 Received: from kbuild by 3b851179dbd8 with local (Exim 4.92) (envelope-from ) id 1mgC29-0002Wj-TY; Thu, 28 Oct 2021 20:29:57 +0000 Date: Fri, 29 Oct 2021 04:29:33 +0800 From: kernel test robot To: "Darrick J. Wong" Cc: kbuild-all@lists.01.org, "Darrick J. Wong" , linux-kernel@vger.kernel.org Subject: [PATCH] xfs: fix err_cast.cocci warnings Message-ID: <20211028202933.GA105369@e2f4bfd2b83a> References: <202110290410.yQP2PwdZ-lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202110290410.yQP2PwdZ-lkp@intel.com> X-Patchwork-Hint: ignore User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: kernel test robot fs/xfs/scrub/xfbtree.c:234:9-16: WARNING: ERR_CAST can be used with xfbt -> xfile Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) Generated by: scripts/coccinelle/api/err_cast.cocci Fixes: f47d10306ea7 ("xfs: connect in-memory btrees to xfiles") Reported-by: kernel test robot Signed-off-by: kernel test robot --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/djwong/xfs-linux.git repair-rmap-live head: 058725b83f3ab866a225aec3bfa204c0b7f4d3a8 commit: f47d10306ea759e3e0749de65cdd1680383be13f [326/331] xfs: connect in-memory btrees to xfiles :::::: branch date: 6 days ago :::::: commit date: 6 days ago xfbtree.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/xfs/scrub/xfbtree.c +++ b/fs/xfs/scrub/xfbtree.c @@ -231,7 +231,7 @@ xfbtree_create( xfbt->xfile = xfile_create(description, 0); if (IS_ERR(xfbt->xfile)) - return ERR_PTR(PTR_ERR(xfbt->xfile)); + return ERR_CAST(xfbt->xfile); xfbt->target = xfs_alloc_memory_buftarg(mp, xfbt->xfile); if (!xfbt->target) {