Message ID | 20230424041940.132866-1-suhui@nfschina.com (mailing list archive) |
---|---|
State | Accepted |
Commit | 1ad715857018893776fd61706da5b2188d67c650 |
Headers | show |
Series | usb: typec: tcpm: remove unnecessary (void*) conversions | expand |
On Mon, Apr 24, 2023 at 12:19:40PM +0800, Suhui wrote: > No need cast (void*) to (struct fusb302_chip *) or (struct tcpm_port *). > > Signed-off-by: Suhui <suhui@nfschina.com> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> > --- > drivers/usb/typec/tcpm/fusb302.c | 2 +- > drivers/usb/typec/tcpm/tcpm.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/usb/typec/tcpm/fusb302.c b/drivers/usb/typec/tcpm/fusb302.c > index 1ffce00d94b4..4b7b8f6af3ca 100644 > --- a/drivers/usb/typec/tcpm/fusb302.c > +++ b/drivers/usb/typec/tcpm/fusb302.c > @@ -190,7 +190,7 @@ static void fusb302_log(struct fusb302_chip *chip, const char *fmt, ...) > > static int fusb302_debug_show(struct seq_file *s, void *v) > { > - struct fusb302_chip *chip = (struct fusb302_chip *)s->private; > + struct fusb302_chip *chip = s->private; > int tail; > > mutex_lock(&chip->logbuffer_lock); > diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c > index 1ee774c263f0..ab3a54662ed9 100644 > --- a/drivers/usb/typec/tcpm/tcpm.c > +++ b/drivers/usb/typec/tcpm/tcpm.c > @@ -737,7 +737,7 @@ static void tcpm_log_source_caps(struct tcpm_port *port) > > static int tcpm_debug_show(struct seq_file *s, void *v) > { > - struct tcpm_port *port = (struct tcpm_port *)s->private; > + struct tcpm_port *port = s->private; > int tail; > > mutex_lock(&port->logbuffer_lock); > -- > 2.30.2
On Mon, Apr 24, 2023 at 12:19:40PM +0800, Suhui wrote: > No need cast (void*) to (struct fusb302_chip *) or (struct tcpm_port *). > > Signed-off-by: Suhui <suhui@nfschina.com> Is that your full name? If not, please always use whatever you sign documents with. > --- > drivers/usb/typec/tcpm/fusb302.c | 2 +- > drivers/usb/typec/tcpm/tcpm.c | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) This does not apply to 6.4-rc1, what did you make it against? thanks, greg k-h
I am so sorry for this. I will modify my name format to Su Hui. This patch is for v6.3. It seems not be modified by others when I view source code. I didn't know someone else had sent the same patch which wasn't merged in to mainline git source. Thanks for your reply. Su Hui On 2023/5/8 22:55, Greg Kroah-Hartman wrote: > On Mon, Apr 24, 2023 at 12:19:40PM +0800, Suhui wrote: >> No need cast (void*) to (struct fusb302_chip *) or (struct tcpm_port *). >> >> Signed-off-by: Suhui <suhui@nfschina.com> > Is that your full name? If not, please always use whatever you sign > documents with. > >> --- >> drivers/usb/typec/tcpm/fusb302.c | 2 +- >> drivers/usb/typec/tcpm/tcpm.c | 2 +- >> 2 files changed, 2 insertions(+), 2 deletions(-) > This does not apply to 6.4-rc1, what did you make it against? > > thanks, > > greg k-h
diff --git a/drivers/usb/typec/tcpm/fusb302.c b/drivers/usb/typec/tcpm/fusb302.c index 1ffce00d94b4..4b7b8f6af3ca 100644 --- a/drivers/usb/typec/tcpm/fusb302.c +++ b/drivers/usb/typec/tcpm/fusb302.c @@ -190,7 +190,7 @@ static void fusb302_log(struct fusb302_chip *chip, const char *fmt, ...) static int fusb302_debug_show(struct seq_file *s, void *v) { - struct fusb302_chip *chip = (struct fusb302_chip *)s->private; + struct fusb302_chip *chip = s->private; int tail; mutex_lock(&chip->logbuffer_lock); diff --git a/drivers/usb/typec/tcpm/tcpm.c b/drivers/usb/typec/tcpm/tcpm.c index 1ee774c263f0..ab3a54662ed9 100644 --- a/drivers/usb/typec/tcpm/tcpm.c +++ b/drivers/usb/typec/tcpm/tcpm.c @@ -737,7 +737,7 @@ static void tcpm_log_source_caps(struct tcpm_port *port) static int tcpm_debug_show(struct seq_file *s, void *v) { - struct tcpm_port *port = (struct tcpm_port *)s->private; + struct tcpm_port *port = s->private; int tail; mutex_lock(&port->logbuffer_lock);
No need cast (void*) to (struct fusb302_chip *) or (struct tcpm_port *). Signed-off-by: Suhui <suhui@nfschina.com> --- drivers/usb/typec/tcpm/fusb302.c | 2 +- drivers/usb/typec/tcpm/tcpm.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)