* [PATCH] usb: typec: tcpm: remove unnecessary (void*) conversions
@ 2023-03-16 8:23 Yu Zhe
2023-03-17 11:29 ` Heikki Krogerus
0 siblings, 1 reply; 7+ messages in thread
From: Yu Zhe @ 2023-03-16 8:23 UTC (permalink / raw)
To: linux, heikki.krogerus, gregkh; +Cc: linux-usb, linux-kernel, liqiong, Yu Zhe
Pointer variables of void * type do not require type cast.
Signed-off-by: Yu Zhe <yuzhe@nfschina.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 a0d943d78580..e8bfe3f57ab4 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.11.0
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] usb: typec: tcpm: remove unnecessary (void*) conversions
2023-03-16 8:23 Yu Zhe
@ 2023-03-17 11:29 ` Heikki Krogerus
2023-03-17 12:18 ` Guenter Roeck
0 siblings, 1 reply; 7+ messages in thread
From: Heikki Krogerus @ 2023-03-17 11:29 UTC (permalink / raw)
To: Yu Zhe; +Cc: linux, gregkh, linux-usb, linux-kernel, liqiong
On Thu, Mar 16, 2023 at 04:23:38PM +0800, Yu Zhe wrote:
> Pointer variables of void * type do not require type cast.
>
> Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
I would have prefered that both drivers are patched separately in
their own patch, but that's minor. If Guenter is OK with this then:
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 a0d943d78580..e8bfe3f57ab4 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.11.0
--
heikki
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] usb: typec: tcpm: remove unnecessary (void*) conversions
2023-03-17 11:29 ` Heikki Krogerus
@ 2023-03-17 12:18 ` Guenter Roeck
0 siblings, 0 replies; 7+ messages in thread
From: Guenter Roeck @ 2023-03-17 12:18 UTC (permalink / raw)
To: Heikki Krogerus, Yu Zhe; +Cc: gregkh, linux-usb, linux-kernel, liqiong
On 3/17/23 04:29, Heikki Krogerus wrote:
> On Thu, Mar 16, 2023 at 04:23:38PM +0800, Yu Zhe wrote:
>> Pointer variables of void * type do not require type cast.
>>
>> Signed-off-by: Yu Zhe <yuzhe@nfschina.com>
>
> I would have prefered that both drivers are patched separately in
> their own patch, but that's minor. If Guenter is OK with this then:
>
> Acked-by: Heikki Krogerus <heikki.krogerus@linux.intel.com>
>
I seem to have missed the original patch. Anyway, lgtm
Reviewed-by: Guenter Roeck <linux@roeck-us.net>
And, yes, those should really have been separate patches, one per driver.
Guenter
>> ---
>> 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 a0d943d78580..e8bfe3f57ab4 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.11.0
>
^ permalink raw reply [flat|nested] 7+ messages in thread
* [PATCH] usb: typec: tcpm: remove unnecessary (void*) conversions
@ 2023-04-24 4:19 Suhui
2023-04-24 13:03 ` Heikki Krogerus
2023-05-08 14:55 ` Greg Kroah-Hartman
0 siblings, 2 replies; 7+ messages in thread
From: Suhui @ 2023-04-24 4:19 UTC (permalink / raw)
To: Guenter Roeck, Heikki Krogerus, Greg Kroah-Hartman
Cc: linux-usb, linux-kernel, kernel-janitors, Suhui
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(-)
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
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH] usb: typec: tcpm: remove unnecessary (void*) conversions
2023-04-24 4:19 [PATCH] usb: typec: tcpm: remove unnecessary (void*) conversions Suhui
@ 2023-04-24 13:03 ` Heikki Krogerus
2023-05-08 14:55 ` Greg Kroah-Hartman
1 sibling, 0 replies; 7+ messages in thread
From: Heikki Krogerus @ 2023-04-24 13:03 UTC (permalink / raw)
To: Suhui
Cc: Guenter Roeck, Greg Kroah-Hartman, linux-usb, linux-kernel,
kernel-janitors
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
--
heikki
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] usb: typec: tcpm: remove unnecessary (void*) conversions
2023-04-24 4:19 [PATCH] usb: typec: tcpm: remove unnecessary (void*) conversions Suhui
2023-04-24 13:03 ` Heikki Krogerus
@ 2023-05-08 14:55 ` Greg Kroah-Hartman
2023-05-09 2:14 ` Su Hui
1 sibling, 1 reply; 7+ messages in thread
From: Greg Kroah-Hartman @ 2023-05-08 14:55 UTC (permalink / raw)
To: Suhui
Cc: Guenter Roeck, Heikki Krogerus, linux-usb, linux-kernel,
kernel-janitors
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
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] usb: typec: tcpm: remove unnecessary (void*) conversions
2023-05-08 14:55 ` Greg Kroah-Hartman
@ 2023-05-09 2:14 ` Su Hui
0 siblings, 0 replies; 7+ messages in thread
From: Su Hui @ 2023-05-09 2:14 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: linux, heikki.krogerus, linux-usb, linux-kernel, kernel-janitors
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
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-05-09 2:16 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-04-24 4:19 [PATCH] usb: typec: tcpm: remove unnecessary (void*) conversions Suhui
2023-04-24 13:03 ` Heikki Krogerus
2023-05-08 14:55 ` Greg Kroah-Hartman
2023-05-09 2:14 ` Su Hui
-- strict thread matches above, loose matches on Subject: below --
2023-03-16 8:23 Yu Zhe
2023-03-17 11:29 ` Heikki Krogerus
2023-03-17 12:18 ` Guenter Roeck
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox