Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3314412rwb; Fri, 30 Sep 2022 01:31:09 -0700 (PDT) X-Google-Smtp-Source: AMsMyM5rGKGvoELllgXA1fdnMIADZUkBZ0kkSQ3DNMWCg3hvEZcgdQ9kOFTglDZWRFIitNzcvBQP X-Received: by 2002:a17:907:9495:b0:787:84e9:35c3 with SMTP id dm21-20020a170907949500b0078784e935c3mr5754330ejc.701.1664526669545; Fri, 30 Sep 2022 01:31:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664526669; cv=none; d=google.com; s=arc-20160816; b=jzju8oHqoM9vNF7D3ev+Ui9GyGIg/fSVl7BCK4M0S50mJRxRCUehlyRYDO+qsKikOR CkdkXtTFJPZDTZv5Irb2XOfGS7t4fu4f5HCqYZXLUvycj3yauFU3Z5+qRR+REOtP9jms Sxe6TVyP6KcIW0pgrWAt4H/572m44jHDiLz1++SPocUhMgXkWjHZiZ0esfyZviL2eUxN +iwzp/6kxCrFP5Zpj6BC24p0oqq8HPXd1eamB/G3ctzRoNKfhqIjeuBlB48HLIJwPqql KWzmlpQfyJGPJUdpxxMGX9CKvIT3WwWrIsVArrNri/fHP5XC8UY0Sh5bNiz2RZiVVb6J kQcw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:in-reply-to :subject:cc:to:from:message-id:date:dkim-signature:dkim-signature; bh=a9vFPBsMZ/lR4Rnr7DSlKNEwmVjQkET02In6wEnYZEc=; b=dDDIhcAq3+1bOSSONlCaaj94d+2i6EX1VwqxIVEeIdKUum219NwHUQ+RAJPCI2aEQx iX1rDEEUR/S4KoMojOUH2NfTQb8Tb92Yzd/YvxD41XEwPWXYSiohhcqJ/fwwSdneyk0U shyqVqyE2T7s/uFvC+iFuU/AI+m5MxEz7x306dBJiq/jS2NUI/4dUsBUGKJqs7mf4ZyT LnFuMMnXiUMwMUOEN6OiWSt5g8xPtR93xd18nJNpCkID4a/v3Yp43RpSIwP/Q0wpJRFS nxHd4wD4IRW5pYzy/a+1K4pUMhLsdVd/c3XSL53wbh4vkhx1jR35v0DkYFJbPX3s3WRB YWCw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=wtgU1kHC; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id wy11-20020a170906fe0b00b00730870cb4b6si1372696ejb.621.2022.09.30.01.30.42; Fri, 30 Sep 2022 01:31:09 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b=wtgU1kHC; dkim=neutral (no key) header.i=@suse.de header.s=susede2_ed25519; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230269AbiI3IXH (ORCPT + 99 others); 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 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 >