From: Christian Schoenebeck <linux_oss@crudebyte.com>
To: Yu Zhe <yuzhe@nfschina.com>
Cc: ericvh@gmail.com, lucho@ionkov.net, asmadeus@codewreck.org,
v9fs-developer@lists.sourceforge.net,
linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org,
liqiong@nfschina.com
Subject: Re: [PATCH] 9p: remove unnecessary type castings
Date: Fri, 01 Apr 2022 19:06:39 +0200 [thread overview]
Message-ID: <2411905.eXaiZ4YaiN@silver> (raw)
In-Reply-To: <20220401070545.50577-1-yuzhe@nfschina.com>
On Freitag, 1. April 2022 09:05:45 CEST Yu Zhe wrote:
> remove unnecessary void* type castings.
>
> Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
> ---
Reviewed-by: Christian Schoenebeck <linux_oss@crudebyte.com>
> fs/9p/fid.c | 2 +-
> fs/9p/v9fs.c | 2 +-
> fs/9p/vfs_inode.c | 4 ++--
> fs/9p/vfs_inode_dotl.c | 4 ++--
> 4 files changed, 6 insertions(+), 6 deletions(-)
>
> diff --git a/fs/9p/fid.c b/fs/9p/fid.c
> index 79df61fe0e59..c2b8d7fc9e53 100644
> --- a/fs/9p/fid.c
> +++ b/fs/9p/fid.c
> @@ -53,7 +53,7 @@ static struct p9_fid *v9fs_fid_find_inode(struct inode
> *inode, kuid_t uid) p9_debug(P9_DEBUG_VFS, " inode: %p\n", inode);
>
> spin_lock(&inode->i_lock);
> - h = (struct hlist_head *)&inode->i_private;
> + h = &inode->i_private;
> hlist_for_each_entry(fid, h, ilist) {
> if (uid_eq(fid->uid, uid)) {
> refcount_inc(&fid->count);
> diff --git a/fs/9p/v9fs.c b/fs/9p/v9fs.c
> index e28ddf763b3b..51ddc58a7029 100644
> --- a/fs/9p/v9fs.c
> +++ b/fs/9p/v9fs.c
> @@ -622,7 +622,7 @@ static void v9fs_sysfs_cleanup(void)
>
> static void v9fs_inode_init_once(void *foo)
> {
> - struct v9fs_inode *v9inode = (struct v9fs_inode *)foo;
> + struct v9fs_inode *v9inode = foo;
>
> memset(&v9inode->qid, 0, sizeof(v9inode->qid));
> inode_init_once(&v9inode->vfs_inode);
> diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
> index 55367ecb9442..f415fd7a1eaf 100644
> --- a/fs/9p/vfs_inode.c
> +++ b/fs/9p/vfs_inode.c
> @@ -409,7 +409,7 @@ static int v9fs_test_inode(struct inode *inode, void
> *data) int umode;
> dev_t rdev;
> struct v9fs_inode *v9inode = V9FS_I(inode);
> - struct p9_wstat *st = (struct p9_wstat *)data;
> + struct p9_wstat *st = data;
> struct v9fs_session_info *v9ses = v9fs_inode2v9ses(inode);
>
> umode = p9mode2unixmode(v9ses, st, &rdev);
> @@ -438,7 +438,7 @@ static int v9fs_test_new_inode(struct inode *inode, void
> *data) static int v9fs_set_inode(struct inode *inode, void *data)
> {
> struct v9fs_inode *v9inode = V9FS_I(inode);
> - struct p9_wstat *st = (struct p9_wstat *)data;
> + struct p9_wstat *st = data;
>
> memcpy(&v9inode->qid, &st->qid, sizeof(st->qid));
> return 0;
> diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
> index d17502a738a9..b910fee62e25 100644
> --- a/fs/9p/vfs_inode_dotl.c
> +++ b/fs/9p/vfs_inode_dotl.c
> @@ -57,7 +57,7 @@ static kgid_t v9fs_get_fsgid_for_create(struct inode
> *dir_inode) static int v9fs_test_inode_dotl(struct inode *inode, void
> *data)
> {
> struct v9fs_inode *v9inode = V9FS_I(inode);
> - struct p9_stat_dotl *st = (struct p9_stat_dotl *)data;
> + struct p9_stat_dotl *st = data;
>
> /* don't match inode of different type */
> if (inode_wrong_type(inode, st->st_mode))
> @@ -88,7 +88,7 @@ static int v9fs_test_new_inode_dotl(struct inode *inode,
> void *data) static int v9fs_set_inode_dotl(struct inode *inode, void
> *data)
> {
> struct v9fs_inode *v9inode = V9FS_I(inode);
> - struct p9_stat_dotl *st = (struct p9_stat_dotl *)data;
> + struct p9_stat_dotl *st = data;
>
> memcpy(&v9inode->qid, &st->qid, sizeof(st->qid));
> inode->i_generation = st->st_gen;
prev parent reply other threads:[~2022-04-01 17:06 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-01 7:05 [PATCH] 9p: remove unnecessary type castings Yu Zhe
2022-04-01 17:06 ` Christian Schoenebeck [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=2411905.eXaiZ4YaiN@silver \
--to=linux_oss@crudebyte.com \
--cc=asmadeus@codewreck.org \
--cc=ericvh@gmail.com \
--cc=kernel-janitors@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=liqiong@nfschina.com \
--cc=lucho@ionkov.net \
--cc=v9fs-developer@lists.sourceforge.net \
--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