From: Jarkko Sakkinen <jarkko@kernel.org>
To: Yu Zhe <yuzhe@nfschina.com>
Cc: peterhuewe@gmx.de, jgg@ziepe.ca, linux-integrity@vger.kernel.org,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
liqiong@nfschina.com
Subject: Re: [PATCH] tpm: remove unnecessary (void*) conversions
Date: Sun, 19 Mar 2023 15:45:33 +0200 [thread overview]
Message-ID: <20230319134533.f63ajqelx6eeadnh@kernel.org> (raw)
In-Reply-To: <20230316085037.21255-1-yuzhe@nfschina.com>
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
prev parent reply other threads:[~2023-03-19 13:45 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-16 8:50 Yu Zhe
2023-03-19 13:45 ` Jarkko Sakkinen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230319134533.f63ajqelx6eeadnh@kernel.org \
--to=jarkko@kernel.org \
--cc=jgg@ziepe.ca \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liqiong@nfschina.com \
--cc=peterhuewe@gmx.de \
--cc=yuzhe@nfschina.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®