* [PATCH] tpm: remove unnecessary (void*) conversions
@ 2023-03-16 8:50 Yu Zhe
2023-03-19 13:45 ` Jarkko Sakkinen
0 siblings, 1 reply; 2+ messages in thread
From: Yu Zhe @ 2023-03-16 8:50 UTC (permalink / raw)
To: peterhuewe, jarkko, jgg
Cc: linux-integrity, linux-kernel, kernel-janitors, liqiong, Yu Zhe
Pointer variables of void * type do not require type cast.
Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
---
drivers/char/tpm/eventlog/common.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/char/tpm/eventlog/common.c b/drivers/char/tpm/eventlog/common.c
index 8512ec76d526..639c3f395a5a 100644
--- a/drivers/char/tpm/eventlog/common.c
+++ b/drivers/char/tpm/eventlog/common.c
@@ -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);
--
2.11.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] tpm: remove unnecessary (void*) conversions
2023-03-16 8:50 [PATCH] tpm: remove unnecessary (void*) conversions Yu Zhe
@ 2023-03-19 13:45 ` Jarkko Sakkinen
0 siblings, 0 replies; 2+ messages in thread
From: Jarkko Sakkinen @ 2023-03-19 13:45 UTC (permalink / raw)
To: Yu Zhe
Cc: peterhuewe, jgg, linux-integrity, linux-kernel, kernel-janitors, liqiong
On Thu, Mar 16, 2023 at 04:50:37PM +0800, Yu Zhe wrote:
> Pointer variables of void * type do not require type cast.
>
> Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
> ---
> drivers/char/tpm/eventlog/common.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/char/tpm/eventlog/common.c b/drivers/char/tpm/eventlog/common.c
> index 8512ec76d526..639c3f395a5a 100644
> --- a/drivers/char/tpm/eventlog/common.c
> +++ b/drivers/char/tpm/eventlog/common.c
> @@ -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);
>
> --
> 2.11.0
>
Acked-by: Jarkko Sakkinen <jarkko@kernel.org>
BR, Jarkko
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-03-19 13:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-16 8:50 [PATCH] tpm: remove unnecessary (void*) conversions Yu Zhe
2023-03-19 13:45 ` Jarkko Sakkinen
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).