From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============4332804315107382759==" MIME-Version: 1.0 From: kbuild test robot To: kbuild-all@lists.01.org Subject: [PATCH] ANDROID: fix err_cast.cocci warnings Date: Tue, 14 Apr 2020 08:10:07 +0800 Message-ID: <20200414001007.GA120186@4cbabbdd0d46> In-Reply-To: <202004140801.PpIze8Uo%lkp@intel.com> List-Id: --===============4332804315107382759== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kbuild test robot fs/incfs/integrity.c:138:9-16: WARNING: ERR_CAST can be used with hash_alg Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) Generated by: scripts/coccinelle/api/err_cast.cocci Fixes: 040942fc50b2 ("ANDROID: Initial commit of Incremental FS") CC: Eugene Zemtsov Signed-off-by: kbuild test robot --- tree: https://android.googlesource.com/kernel/common android-4.19 head: 7bab03039e64ed6c26be90530e08978eab3be578 commit: 040942fc50b20325bb56737c32b303268bb6f35c [1/4] ANDROID: Initial com= mit of Incremental FS integrity.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/incfs/integrity.c +++ b/fs/incfs/integrity.c @@ -135,7 +135,7 @@ struct mtree *incfs_alloc_mtree(enum inc = hash_alg =3D incfs_get_hash_alg(id); if (IS_ERR(hash_alg)) - return ERR_PTR(PTR_ERR(hash_alg)); + return ERR_CAST(hash_alg); = if (root_hash.len < hash_alg->digest_size) return ERR_PTR(-EINVAL); --===============4332804315107382759==--