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 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 smtp.lore.kernel.org (Postfix) with ESMTPS id 863DFC433FE for ; Mon, 14 Nov 2022 08:55:51 +0000 (UTC) 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 6ECA383D; Mon, 14 Nov 2022 09:54:59 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 6ECA383D DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1668416149; bh=eqrRyVAe78ZqDAnzT1Sw+Yjk3x6fHus0lYGFUBRBt6w=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=KuuMa+tM9S+ZBCNJA/iZJRpUyg59Fu3o9vVMIKW1bKzc9K9WPjKeMW3RJ2h+LXhBO uKeM1PGHDIC4iiczyQrc9ShgVnL40GMWkpZjKEZpzyN8wbClwmmsDEIHbeBVUQeJQy ov6w7x7eUD9Xt4ZDnwkK24K802nG+H9Ftbz/wzCc= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 0E563F80245; Mon, 14 Nov 2022 09:54:59 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id A0E54F80431; Mon, 14 Nov 2022 09:54:57 +0100 (CET) Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) (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 9C3E7F800B6 for ; Mon, 14 Nov 2022 09:54:51 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz 9C3E7F800B6 Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="J+87jFaZ"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="fD80/1Ft" 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 E860622874; Mon, 14 Nov 2022 08:54:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1668416090; 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=2kpCoTStDLbC0mDpL36oNJqRAWBqkoojNVraAyspOWw=; b=J+87jFaZ7xCpG3IxH9cRl+30Ilvlt1Af69iuLmO0AQG8bwdgDcHCeDog+BQ6qAuwTwMrz/ KTDa4QilSwTlygiH0PeTcvhRIwVvMx/0zO8yNWrRbaapdlxA0C3/IouqpYFzeYjHiFX5vK 19fJKUeVk7qeYY7Ka5poQdIomQCOVmw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1668416090; 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=2kpCoTStDLbC0mDpL36oNJqRAWBqkoojNVraAyspOWw=; b=fD80/1FtpAS7P8XmNfXh4Jryy6XUJR53Iu+SPwvjaUoTQ9zgiL1H2jHajKPta3DCcf2Yyl no6iQbUeqkCyO5Cw== 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 A17D813A8C; Mon, 14 Nov 2022 08:54:50 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id FZJFJloCcmMkLwAAMHmgww (envelope-from ); Mon, 14 Nov 2022 08:54:50 +0000 Date: Mon, 14 Nov 2022 09:54:50 +0100 Message-ID: <87o7t9531h.wl-tiwai@suse.de> From: Takashi Iwai To: Daniil Tatianin Subject: Re: [PATCH v1] sound/pci/hda/patch_realtek: don't call alc_shutup_pins without a spec In-Reply-To: References: <20221114082048.3477027-1-d-tatianin@yandex-team.ru> <87r0y63psf.wl-tiwai@suse.de> 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 Cc: Stefan Binding , lvc-project@linuxtesting.org, Lucas Tanure , Meng Tang , Philipp Jungkamp , Tim Crawford , Takashi Iwai , Werner Sembach , Kai-Heng Feng , yc-core@yandex-team.ru, 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 Mon, 14 Nov 2022 09:35:10 +0100, Daniil Tatianin wrote: > > > > On 11/14/22 11:26 AM, Takashi Iwai wrote: > > On Mon, 14 Nov 2022 09:20:48 +0100, > > Daniil Tatianin wrote: > >> > >> alc_shutup_pins always expects the spec to be present, so make sure > >> it is before we call it. > >> > >> Found by Linux Verification Center (linuxtesting.org) with the SVACE > >> static analysis tool. > >> > >> Signed-off-by: Daniil Tatianin > > > > In which path can it be without spec assigned? > > That's the internal callback that is set only by the codec driver > > where the allocation of codec->spec is mandatory. > > Would you then say that the "if (spec && ...)" that was there before > was redundant? Yes. Takashi 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 D0F13C43217 for ; Mon, 14 Nov 2022 08:55:15 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236362AbiKNIzM (ORCPT ); Mon, 14 Nov 2022 03:55:12 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37670 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235456AbiKNIyw (ORCPT ); Mon, 14 Nov 2022 03:54:52 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 349531C401 for ; Mon, 14 Nov 2022 00:54:52 -0800 (PST) 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 E860622874; Mon, 14 Nov 2022 08:54:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1668416090; 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=2kpCoTStDLbC0mDpL36oNJqRAWBqkoojNVraAyspOWw=; b=J+87jFaZ7xCpG3IxH9cRl+30Ilvlt1Af69iuLmO0AQG8bwdgDcHCeDog+BQ6qAuwTwMrz/ KTDa4QilSwTlygiH0PeTcvhRIwVvMx/0zO8yNWrRbaapdlxA0C3/IouqpYFzeYjHiFX5vK 19fJKUeVk7qeYY7Ka5poQdIomQCOVmw= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1668416090; 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=2kpCoTStDLbC0mDpL36oNJqRAWBqkoojNVraAyspOWw=; b=fD80/1FtpAS7P8XmNfXh4Jryy6XUJR53Iu+SPwvjaUoTQ9zgiL1H2jHajKPta3DCcf2Yyl no6iQbUeqkCyO5Cw== 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 A17D813A8C; Mon, 14 Nov 2022 08:54:50 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id FZJFJloCcmMkLwAAMHmgww (envelope-from ); Mon, 14 Nov 2022 08:54:50 +0000 Date: Mon, 14 Nov 2022 09:54:50 +0100 Message-ID: <87o7t9531h.wl-tiwai@suse.de> From: Takashi Iwai To: Daniil Tatianin Cc: Jaroslav Kysela , Takashi Iwai , Tim Crawford , Stefan Binding , Kai-Heng Feng , Meng Tang , Lucas Tanure , Philipp Jungkamp , Werner Sembach , alsa-devel@alsa-project.org, linux-kernel@vger.kernel.org, lvc-project@linuxtesting.org, yc-core@yandex-team.ru Subject: Re: [PATCH v1] sound/pci/hda/patch_realtek: don't call alc_shutup_pins without a spec In-Reply-To: References: <20221114082048.3477027-1-d-tatianin@yandex-team.ru> <87r0y63psf.wl-tiwai@suse.de> 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 Mon, 14 Nov 2022 09:35:10 +0100, Daniil Tatianin wrote: > > > > On 11/14/22 11:26 AM, Takashi Iwai wrote: > > On Mon, 14 Nov 2022 09:20:48 +0100, > > Daniil Tatianin wrote: > >> > >> alc_shutup_pins always expects the spec to be present, so make sure > >> it is before we call it. > >> > >> Found by Linux Verification Center (linuxtesting.org) with the SVACE > >> static analysis tool. > >> > >> Signed-off-by: Daniil Tatianin > > > > In which path can it be without spec assigned? > > That's the internal callback that is set only by the codec driver > > where the allocation of codec->spec is mandatory. > > Would you then say that the "if (spec && ...)" that was there before > was redundant? Yes. Takashi