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 X-Spam-Level: X-Spam-Status: No, score=-10.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,MENTIONS_GIT_HOSTING, SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C39A7C433DF for ; Thu, 4 Jun 2020 11:20:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9B0D12053B for ; Thu, 4 Jun 2020 11:20:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726288AbgFDLUU (ORCPT ); Thu, 4 Jun 2020 07:20:20 -0400 Received: from mga07.intel.com ([134.134.136.100]:32304 "EHLO mga07.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726151AbgFDLUU (ORCPT ); Thu, 4 Jun 2020 07:20:20 -0400 IronPort-SDR: t+sgTUGZTmQHux6hBWo/IwiFYtBDdljw1kRnhmUP2Xkx8QZvr/C91XqnaGzAAa9okraogtpRcp 2fyVmkb0fUzQ== X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga008.jf.intel.com ([10.7.209.65]) by orsmga105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 04 Jun 2020 04:20:19 -0700 IronPort-SDR: xwGMOFwSLoNMMZIEQHcZFveL7oqKpTVhA5pLXLU3fKJDOH8t6wI1RGR9qGOOQzw1bohg4J7TL2 VQQ5FHfNB9og== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.73,472,1583222400"; d="scan'208";a="304881765" Received: from lkp-server01.sh.intel.com (HELO 54ff842e15fb) ([10.239.97.150]) by orsmga008.jf.intel.com with ESMTP; 04 Jun 2020 04:20:18 -0700 Received: from kbuild by 54ff842e15fb with local (Exim 4.92) (envelope-from ) id 1jgnuz-00001K-Tg; Thu, 04 Jun 2020 11:20:17 +0000 Date: Thu, 4 Jun 2020 19:19:49 +0800 From: kernel test robot To: "Daniel, Colascione," Cc: kbuild-all@lists.01.org, linux-security-module@vger.kernel.org, James Morris Subject: [PATCH] fix err_cast.cocci warnings Message-ID: <20200604111949.GA29219@9fd72810d846> References: <202006041944.AJeCfZpC%lkp@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <202006041944.AJeCfZpC%lkp@intel.com> X-Patchwork-Hint: ignore User-Agent: Mutt/1.10.1 (2018-07-13) Sender: owner-linux-security-module@vger.kernel.org Precedence: bulk List-ID: From: kernel test robot fs/anon_inodes.c:92:10-17: WARNING: ERR_CAST can be used with inode Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) Generated by: scripts/coccinelle/api/err_cast.cocci Fixes: 2749d3f84a70 ("Add a new LSM-supporting anonymous inode interface") CC: Daniel Colascione Signed-off-by: kernel test robot --- tree: https://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security.git secure_uffd_v5.9 head: d08ac70b1e0dc71ac2315007bcc3efb283b2eae4 commit: 2749d3f84a708110ed0359579be0eddd2c4036da [1/3] Add a new LSM-supporting anonymous inode interface anon_inodes.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/anon_inodes.c +++ b/fs/anon_inodes.c @@ -89,7 +89,7 @@ struct file *_anon_inode_getfile(const c inode = anon_inode_make_secure_inode( name, context_inode); if (IS_ERR(inode)) - return ERR_PTR(PTR_ERR(inode)); + return ERR_CAST(inode); } else { inode = anon_inode_inode; if (IS_ERR(inode))