Content-Type: multipart/mixed; boundary="===============4267653382403036612==" MIME-Version: 1.0 From: kernel test robot To: kbuild-all@lists.01.org Subject: [PATCH] dm: fix err_cast.cocci warnings Date: Mon, 26 Oct 2020 05:02:26 +0800 Message-ID: <20201025210226.GA56371@c4e258c4beaa> In-Reply-To: <20201015214632.41951-4-satyat@google.com> List-Id: --===============4267653382403036612== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: kernel test robot drivers/md/dm.c:2204:12-19: WARNING: ERR_CAST can be used with ksm Use ERR_CAST inlined function instead of ERR_PTR(PTR_ERR(...)) Generated by: scripts/coccinelle/api/err_cast.cocci CC: Satya Tangirala Signed-off-by: kernel test robot --- url: https://github.com/0day-ci/linux/commits/Satya-Tangirala/add-suppor= t-for-inline-encryption-to-device-mapper/20201016-054900 base: https://git.kernel.org/pub/scm/linux/kernel/git/device-mapper/linux= -dm.git for-next dm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/drivers/md/dm.c +++ b/drivers/md/dm.c @@ -2201,7 +2201,7 @@ static struct dm_table *__bind(struct ma = ksm =3D dm_init_inline_encryption(md, t); if (IS_ERR(ksm)) { - old_map =3D ERR_PTR(PTR_ERR(ksm)); + old_map =3D ERR_CAST(ksm); goto out; } =20 --===============4267653382403036612==--