From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============0990977445334492698==" MIME-Version: 1.0 From: kbuild test robot To: kbuild-all@lists.01.org Subject: [PATCH] ANDROID: fix err_cast.cocci warnings Date: Thu, 19 Mar 2020 05:13:35 +0800 Message-ID: <20200318211334.GA55661@248f161f3520> In-Reply-To: <202003190530.ewKjATkn%lkp@intel.com> List-Id: --===============0990977445334492698== 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: 318babce66a6 ("ANDROID: Initial commit of Incremental FS") CC: Eugene Zemtsov Signed-off-by: kbuild test robot --- tree: https://android.googlesource.com/kernel/goldfish android-4.14 head: 4a1f984742c7b4ebfd2d77f48bf24b4ffcb069fd commit: 318babce66a62d8bc8d5434909a044b89ab3a53e [1/3] 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); --===============0990977445334492698==--