linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] sound:remove unnecessary conversions
@ 2022-09-30  2:52 shijm
  2022-09-30  8:23 ` Takashi Iwai
  0 siblings, 1 reply; 3+ messages in thread
From: shijm @ 2022-09-30  2:52 UTC (permalink / raw)
  To: tiwai; +Cc: Linux-kernel, Shi junming

From: Shi junming <junming@nfschina.com>

remove unnecessary conversions

Signed-off-by: Shi junming <junming@nfschina.com>
---
 include/sound/pcm.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 6b99310b5b88..0530cfa08892 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -1344,7 +1344,7 @@ snd_pcm_sgbuf_get_chunk_size(struct snd_pcm_substream *substream,
  */
 static inline void snd_pcm_mmap_data_open(struct vm_area_struct *area)
 {
-	struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data;
+	struct snd_pcm_substream *substream = area->vm_private_data;
 	atomic_inc(&substream->mmap_count);
 }
 
@@ -1356,7 +1356,7 @@ static inline void snd_pcm_mmap_data_open(struct vm_area_struct *area)
  */
 static inline void snd_pcm_mmap_data_close(struct vm_area_struct *area)
 {
-	struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data;
+	struct snd_pcm_substream *substream = area->vm_private_data;
 	atomic_dec(&substream->mmap_count);
 }
 
-- 
2.18.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] sound:remove unnecessary conversions
  2022-09-30  2:52 [PATCH] sound:remove unnecessary conversions shijm
@ 2022-09-30  8:23 ` Takashi Iwai
  0 siblings, 0 replies; 3+ messages in thread
From: Takashi Iwai @ 2022-09-30  8:23 UTC (permalink / raw)
  To: shijm; +Cc: Linux-kernel

On Fri, 30 Sep 2022 04:52:44 +0200,
shijm wrote:
> 
> From: Shi junming <junming@nfschina.com>
> 
> remove unnecessary conversions
> 
> Signed-off-by: Shi junming <junming@nfschina.com>

The code changes themselves are fine, but this patch has more room for
(trivial) improvements.

First off, it won't hurt if you give more text in the patch
description.  Only from this one line text, it's not entirely clear
what the patch is doing and how.

In this case, it might be better understandable to use a term "cast"
(or "type cast") instead of "conversion", too.  And, a sentence should
start with a capital letter.

The subject line for sound subsystem should be with "ALSA:" prefix,
and in this case, "ALSA: pcm: xxx" would be more suitable (the subject
prefix depends on the system, see other git logs).

Last but not least, at the next submission, please put the
corresponding subsystem mailing list (alsa-devel ML) to Cc, too.


thanks,

Takashi

> ---
>  include/sound/pcm.h | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/include/sound/pcm.h b/include/sound/pcm.h
> index 6b99310b5b88..0530cfa08892 100644
> --- a/include/sound/pcm.h
> +++ b/include/sound/pcm.h
> @@ -1344,7 +1344,7 @@ snd_pcm_sgbuf_get_chunk_size(struct snd_pcm_substream *substream,
>   */
>  static inline void snd_pcm_mmap_data_open(struct vm_area_struct *area)
>  {
> -	struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data;
> +	struct snd_pcm_substream *substream = area->vm_private_data;
>  	atomic_inc(&substream->mmap_count);
>  }
>  
> @@ -1356,7 +1356,7 @@ static inline void snd_pcm_mmap_data_open(struct vm_area_struct *area)
>   */
>  static inline void snd_pcm_mmap_data_close(struct vm_area_struct *area)
>  {
> -	struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data;
> +	struct snd_pcm_substream *substream = area->vm_private_data;
>  	atomic_dec(&substream->mmap_count);
>  }
>  
> -- 
> 2.18.2
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] sound:remove unnecessary conversions
@ 2022-09-30  2:55 shijm
  0 siblings, 0 replies; 3+ messages in thread
From: shijm @ 2022-09-30  2:55 UTC (permalink / raw)
  To: tiwai; +Cc: Linux-kernel, junming, Shi junming

From: Shi junming <junming@nfschina.com>

remove unnecessary conversions

Signed-off-by: Shi junming <junming@nfschina.com>
---
 include/sound/pcm.h | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/sound/pcm.h b/include/sound/pcm.h
index 6b99310b5b88..0530cfa08892 100644
--- a/include/sound/pcm.h
+++ b/include/sound/pcm.h
@@ -1344,7 +1344,7 @@ snd_pcm_sgbuf_get_chunk_size(struct snd_pcm_substream *substream,
  */
 static inline void snd_pcm_mmap_data_open(struct vm_area_struct *area)
 {
-	struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data;
+	struct snd_pcm_substream *substream = area->vm_private_data;
 	atomic_inc(&substream->mmap_count);
 }
 
@@ -1356,7 +1356,7 @@ static inline void snd_pcm_mmap_data_open(struct vm_area_struct *area)
  */
 static inline void snd_pcm_mmap_data_close(struct vm_area_struct *area)
 {
-	struct snd_pcm_substream *substream = (struct snd_pcm_substream *)area->vm_private_data;
+	struct snd_pcm_substream *substream = area->vm_private_data;
 	atomic_dec(&substream->mmap_count);
 }
 
-- 
2.18.2


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-09-30  8:23 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-30  2:52 [PATCH] sound:remove unnecessary conversions shijm
2022-09-30  8:23 ` Takashi Iwai
2022-09-30  2:55 shijm

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).