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 X-Spam-Level: X-Spam-Status: No, score=-15.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C56D8C48BE6 for ; Wed, 16 Jun 2021 11:07:55 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A13BF6128B for ; Wed, 16 Jun 2021 11:07:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231373AbhFPLJ7 (ORCPT ); Wed, 16 Jun 2021 07:09:59 -0400 Received: from smtp-out2.suse.de ([195.135.220.29]:36572 "EHLO smtp-out2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229713AbhFPLJ4 (ORCPT ); Wed, 16 Jun 2021 07:09:56 -0400 Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id EAB281FD6E; Wed, 16 Jun 2021 11:07:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1623841669; 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=nAbGrWoG60KN5mQTsO5Y7mwWTIs/ork4w4bAwiRuuro=; b=LQP7PdMok24SO0aOqd3aQMNMKz5heWdXUr3O/2votYND0Q87VgetG9py8XJgx06Mo8lr5K KmKU8eSUtiQd+LFdVdCjR0SlfUxTcx64l870xvgzfaveW+H580XXJtn2oABLVd5bcB0LGd gtWsFdeAFJH09mIiWNe1GLY23eoyK3k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1623841669; 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=nAbGrWoG60KN5mQTsO5Y7mwWTIs/ork4w4bAwiRuuro=; b=3wmALmay+gH20mWXfG1Nd4qNYxzqG+vHRECYuBCeDs/imYJgSoYbfk6O+vC6S/mcgecgvj TPk1DTVjmtyKMMDw== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id D59C0A3B98; Wed, 16 Jun 2021 11:07:49 +0000 (UTC) Date: Wed, 16 Jun 2021 13:07:49 +0200 Message-ID: From: Takashi Iwai To: Jiapeng Chong Cc: perex@perex.cz, alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ALSA: oss: Remove redundant assignment to src_access In-Reply-To: <1623754423-84072-1-git-send-email-jiapeng.chong@linux.alibaba.com> References: <1623754423-84072-1-git-send-email-jiapeng.chong@linux.alibaba.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 15 Jun 2021 12:53:43 +0200, Jiapeng Chong wrote: > > Variable src_access is set to 'dst_access', but this value is never read > as it is not used later on, hence it is a redundant assignment and can > be removed. > > Clean up the following clang-analyzer warning: > > sound/core/oss/pcm_plugin.c:472:4: warning: Value stored to 'src_access' > is never read [clang-analyzer-deadcode.DeadStores]. That's true, but OTOH, this is better to kept for synchronization with other parts where all set the same src_access. So I'd keep it as is. The compiler will optimize out, after all. thanks, Takashi > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong > --- > sound/core/oss/pcm_plugin.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/sound/core/oss/pcm_plugin.c b/sound/core/oss/pcm_plugin.c > index 061ba06..a7c0e50 100644 > --- a/sound/core/oss/pcm_plugin.c > +++ b/sound/core/oss/pcm_plugin.c > @@ -469,7 +469,6 @@ int snd_pcm_plug_format_plugins(struct snd_pcm_substream *plug, > return err; > } > srcformat = tmpformat; > - src_access = dst_access; > } > tmpformat.rate = dstformat.rate; > err = snd_pcm_plugin_build_rate(plug, > -- > 1.8.3.1 > 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 X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BECA9C49EA3 for ; Wed, 16 Jun 2021 11:08:49 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 6A16361351 for ; Wed, 16 Jun 2021 11:08:48 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 6A16361351 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=suse.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 12B50166B; Wed, 16 Jun 2021 13:07:56 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 12B50166B DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1623841726; bh=hHCm7QGRqaZC8Gl2fPTCRiIe+dhhN8+ksDa9QdeMqB4=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=fHHXwJNrFy9Rwh4Omq5s+FoNicNqPm9WMNjSkAREdjdXZ5lpY6zIAxuXPjUwPEXEC lGgoDmQLqKdEQ4T1lJm/7oo0zkoulBR5+alTrFappOFtsIEseOvkT9SIdQBW/9QGAi vKBrChbDUYOobhRFHEi2xMXq2FUp7yGU7DuaVNzA= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 93F8CF8028B; Wed, 16 Jun 2021 13:07:55 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id BFDF9F80423; Wed, 16 Jun 2021 13:07:54 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id 8148FF8028B for ; Wed, 16 Jun 2021 13:07:51 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 8148FF8028B Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="LQP7PdMo"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="3wmALmay" Received: from relay2.suse.de (relay2.suse.de [149.44.160.134]) by smtp-out2.suse.de (Postfix) with ESMTP id EAB281FD6E; Wed, 16 Jun 2021 11:07:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1623841669; 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=nAbGrWoG60KN5mQTsO5Y7mwWTIs/ork4w4bAwiRuuro=; b=LQP7PdMok24SO0aOqd3aQMNMKz5heWdXUr3O/2votYND0Q87VgetG9py8XJgx06Mo8lr5K KmKU8eSUtiQd+LFdVdCjR0SlfUxTcx64l870xvgzfaveW+H580XXJtn2oABLVd5bcB0LGd gtWsFdeAFJH09mIiWNe1GLY23eoyK3k= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1623841669; 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=nAbGrWoG60KN5mQTsO5Y7mwWTIs/ork4w4bAwiRuuro=; b=3wmALmay+gH20mWXfG1Nd4qNYxzqG+vHRECYuBCeDs/imYJgSoYbfk6O+vC6S/mcgecgvj TPk1DTVjmtyKMMDw== Received: from alsa1.suse.de (alsa1.suse.de [10.160.4.42]) by relay2.suse.de (Postfix) with ESMTP id D59C0A3B98; Wed, 16 Jun 2021 11:07:49 +0000 (UTC) Date: Wed, 16 Jun 2021 13:07:49 +0200 Message-ID: From: Takashi Iwai To: Jiapeng Chong Subject: Re: [PATCH] ALSA: oss: Remove redundant assignment to src_access In-Reply-To: <1623754423-84072-1-git-send-email-jiapeng.chong@linux.alibaba.com> References: <1623754423-84072-1-git-send-email-jiapeng.chong@linux.alibaba.com> User-Agent: Wanderlust/2.15.9 (Almost Unreal) SEMI/1.14.6 (Maruoka) FLIM/1.14.9 (=?UTF-8?B?R29qxY0=?=) APEL/10.8 Emacs/25.3 (x86_64-suse-linux-gnu) MULE/6.0 (HANACHIRUSATO) MIME-Version: 1.0 (generated by SEMI 1.14.6 - "Maruoka") Content-Type: text/plain; charset=US-ASCII Cc: alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Tue, 15 Jun 2021 12:53:43 +0200, Jiapeng Chong wrote: > > Variable src_access is set to 'dst_access', but this value is never read > as it is not used later on, hence it is a redundant assignment and can > be removed. > > Clean up the following clang-analyzer warning: > > sound/core/oss/pcm_plugin.c:472:4: warning: Value stored to 'src_access' > is never read [clang-analyzer-deadcode.DeadStores]. That's true, but OTOH, this is better to kept for synchronization with other parts where all set the same src_access. So I'd keep it as is. The compiler will optimize out, after all. thanks, Takashi > > Reported-by: Abaci Robot > Signed-off-by: Jiapeng Chong > --- > sound/core/oss/pcm_plugin.c | 1 - > 1 file changed, 1 deletion(-) > > diff --git a/sound/core/oss/pcm_plugin.c b/sound/core/oss/pcm_plugin.c > index 061ba06..a7c0e50 100644 > --- a/sound/core/oss/pcm_plugin.c > +++ b/sound/core/oss/pcm_plugin.c > @@ -469,7 +469,6 @@ int snd_pcm_plug_format_plugins(struct snd_pcm_substream *plug, > return err; > } > srcformat = tmpformat; > - src_access = dst_access; > } > tmpformat.rate = dstformat.rate; > err = snd_pcm_plugin_build_rate(plug, > -- > 1.8.3.1 >