From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8A839C433F5 for ; Fri, 30 Sep 2022 08:23:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230285AbiI3IXH (ORCPT ); Fri, 30 Sep 2022 04:23:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44660 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229458AbiI3IXF (ORCPT ); Fri, 30 Sep 2022 04:23:05 -0400 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1BAF41032E4 for ; Fri, 30 Sep 2022 01:23:04 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id BA5512188D; Fri, 30 Sep 2022 08:23:02 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1664526182; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=a9vFPBsMZ/lR4Rnr7DSlKNEwmVjQkET02In6wEnYZEc=; b=wtgU1kHChJFsmb58NCv/oTgPIOQ6VIE/htr7GA+MOAivpUcHcTUI7TjV2CELDbJuY/isKX OChLv+1RXpMkpGoAHkfDL6ZkaXqESC7psengfbcEiYTMNb1oDC912YzTo4AGZ+MeaOMMVo DPeKMFkm0CKbQWJz+EiZ9vv86g20W8E= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1664526182; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=a9vFPBsMZ/lR4Rnr7DSlKNEwmVjQkET02In6wEnYZEc=; b=WKlFm+3b12DymiIWwhCXu/Hb0q10vxgGGeJUHttIHWi86LN5AyKFiIrZnY9EC1FdGW5lpg KLBLln0ag0GioxDg== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 9320213776; Fri, 30 Sep 2022 08:23:02 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id ArQPI2anNmN5QQAAMHmgww (envelope-from ); Fri, 30 Sep 2022 08:23:02 +0000 Date: Fri, 30 Sep 2022 10:23:02 +0200 Message-ID: <87k05l6zkp.wl-tiwai@suse.de> From: Takashi Iwai To: shijm Cc: Linux-kernel@vger.kernel.org Subject: Re: [PATCH] sound:remove unnecessary conversions In-Reply-To: <20220930025244.9762-1-junming@nfschina.com> References: <20220930025244.9762-1-junming@nfschina.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) Emacs/27.2 Mule/6.0 MIME-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 30 Sep 2022 04:52:44 +0200, shijm wrote: > > From: Shi junming > > remove unnecessary conversions > > Signed-off-by: Shi junming 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 >