From patchwork Wed Oct 26 08:29:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: XU pengfei X-Patchwork-Id: 13020319 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 1D8ACC38A2D for ; Wed, 26 Oct 2022 08:29:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233325AbiJZI34 (ORCPT ); Wed, 26 Oct 2022 04:29:56 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59184 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229949AbiJZI3z (ORCPT ); Wed, 26 Oct 2022 04:29:55 -0400 Received: from mail.nfschina.com (unknown [124.16.136.209]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 96D5913CC2; Wed, 26 Oct 2022 01:29:54 -0700 (PDT) Received: from localhost (unknown [127.0.0.1]) by mail.nfschina.com (Postfix) with ESMTP id 29AF81E80C9A; Wed, 26 Oct 2022 16:28:28 +0800 (CST) X-Virus-Scanned: amavisd-new at test.com Received: from mail.nfschina.com ([127.0.0.1]) by localhost (mail.nfschina.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id vVkui51j_YiZ; Wed, 26 Oct 2022 16:28:25 +0800 (CST) Received: from localhost.localdomain.localdomain (unknown [219.141.250.2]) (Authenticated sender: xupengfei@nfschina.com) by mail.nfschina.com (Postfix) with ESMTPA id 59F751E80C8F; Wed, 26 Oct 2022 16:28:25 +0800 (CST) From: XU pengfei To: casey@schaufler-ca.com, paul@paul-moore.com, jmorris@namei.org, serge@hallyn.com Cc: linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, XU pengfei Subject: [PATCH 1/1] smack_lsm: remove unnecessary type casting Date: Wed, 26 Oct 2022 16:29:24 +0800 Message-Id: <20221026082923.3400-1-xupengfei@nfschina.com> X-Mailer: git-send-email 2.18.2 Precedence: bulk List-ID: Remove unnecessary type casting. The type of inode variable is struct inode *, so no type casting required. Signed-off-by: XU pengfei --- security/smack/smack_lsm.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index b6306d71c908..853c6878edc0 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c @@ -1409,7 +1409,7 @@ static int smack_inode_getsecurity(struct user_namespace *mnt_userns, struct socket_smack *ssp; struct socket *sock; struct super_block *sbp; - struct inode *ip = (struct inode *)inode; + struct inode *ip = inode; struct smack_known *isp; if (strcmp(name, XATTR_SMACK_SUFFIX) == 0)