tpm: remove unnecessary (void*) conversions
authorYu Zhe <yuzhe@nfschina.com>
Thu, 16 Mar 2023 08:50:37 +0000 (16:50 +0800)
committerJarkko Sakkinen <jarkko@kernel.org>
Mon, 24 Apr 2023 13:15:52 +0000 (16:15 +0300)
Pointer variables of void * type do not require type cast.

Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
drivers/char/tpm/eventlog/common.c

index 8512ec76d5260d6788686b33bd3dc79db34fa937..639c3f395a5afc461e495d5a175f332496ff1f43 100644 (file)
@@ -36,7 +36,7 @@ static int tpm_bios_measurements_open(struct inode *inode,
                inode_unlock(inode);
                return -ENODEV;
        }
-       chip_seqops = (struct tpm_chip_seqops *)inode->i_private;
+       chip_seqops = inode->i_private;
        seqops = chip_seqops->seqops;
        chip = chip_seqops->chip;
        get_device(&chip->dev);
@@ -55,8 +55,8 @@ static int tpm_bios_measurements_open(struct inode *inode,
 static int tpm_bios_measurements_release(struct inode *inode,
                                         struct file *file)
 {
-       struct seq_file *seq = (struct seq_file *)file->private_data;
-       struct tpm_chip *chip = (struct tpm_chip *)seq->private;
+       struct seq_file *seq = file->private_data;
+       struct tpm_chip *chip = seq->private;
 
        put_device(&chip->dev);