linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] smack_lsm: remove unnecessary type casting
@ 2022-10-26  8:29 XU pengfei
  2022-11-01 21:12 ` Casey Schaufler
  0 siblings, 1 reply; 2+ messages in thread
From: XU pengfei @ 2022-10-26  8:29 UTC (permalink / raw)
  To: casey, paul, jmorris, serge
  Cc: linux-security-module, linux-kernel, XU pengfei

Remove unnecessary type casting.
The type of inode variable is struct inode *, so no type casting required.

Signed-off-by: XU pengfei <xupengfei@nfschina.com>
---
 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)
-- 
2.18.2


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

* Re: [PATCH 1/1] smack_lsm: remove unnecessary type casting
  2022-10-26  8:29 [PATCH 1/1] smack_lsm: remove unnecessary type casting XU pengfei
@ 2022-11-01 21:12 ` Casey Schaufler
  0 siblings, 0 replies; 2+ messages in thread
From: Casey Schaufler @ 2022-11-01 21:12 UTC (permalink / raw)
  To: XU pengfei, paul, jmorris, serge
  Cc: linux-security-module, linux-kernel, casey

On 10/26/2022 1:29 AM, XU pengfei wrote:
> Remove unnecessary type casting.
> The type of inode variable is struct inode *, so no type casting required.
>
> Signed-off-by: XU pengfei <xupengfei@nfschina.com>

Thank you. Added to smack-next:
	https://github.com/cschaufler/smack-next.git#next

> ---
>  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)

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

end of thread, other threads:[~2022-11-01 21:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-10-26  8:29 [PATCH 1/1] smack_lsm: remove unnecessary type casting XU pengfei
2022-11-01 21:12 ` Casey Schaufler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).