The Linux Kernel Mailing List
 help / color / mirror / Atom feed
* [PATCH] remove unnecessary type casting
@ 2022-08-10  8:39 zhoun
  2022-08-11  6:33 ` kernel test robot
  2022-08-11  7:04 ` kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: zhoun @ 2022-08-10  8:39 UTC (permalink / raw)
  To: john.johansen, paul, jmorris, serge
  Cc: linux-security-module, linux-kernel, zhounan

From: zhounan <zhounan@nfschina.com>

'policy' is already a pointer to the struct aa_profile,
 so there is no need to cast 'policy' when it is called.

Signed-off-by: zhounan <zhounan@nfschina.com>
---
 security/apparmor/policy.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/security/apparmor/policy.c b/security/apparmor/policy.c
index b0cbc4906cb3..9643801c4ee7 100644
--- a/security/apparmor/policy.c
+++ b/security/apparmor/policy.c
@@ -1003,7 +1003,7 @@ ssize_t aa_replace_profiles(struct aa_ns *policy_ns, struct aa_label *label,
 			rcu_assign_pointer(ent->new->parent, aa_get_profile(p));
 		} else if (policy != &ns->base) {
 			/* released on profile replacement or free_profile */
-			struct aa_profile *p = (struct aa_profile *) policy;
+			struct aa_profile *p = policy;
 			rcu_assign_pointer(ent->new->parent, aa_get_profile(p));
 		}
 	}
-- 
2.27.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-08-11  7:05 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-10  8:39 [PATCH] remove unnecessary type casting zhoun
2022-08-11  6:33 ` kernel test robot
2022-08-11  7:04 ` kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox