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 E6C7BECAAA1 for ; Tue, 6 Sep 2022 12:02:28 +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 8224F10E; Tue, 6 Sep 2022 14:01:36 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 8224F10E DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1662465746; bh=rySt5V0C2CmwlMUE7DGEyElG53QPCdJKWhVLQOjKhqI=; h=Date:From:To:Subject:In-Reply-To:References:Cc:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=Zgl1UHQqcqNVoAmn8Rm7EI60UzHYDmEwx6fJyv4S+SAGwB4cSuFa7X5fHPAxY89cZ 9Zt+A4M/vIjULt7tmSNcsnUPU8FuqYf8P4/fWPSNyO7tJKgjqKdN7uNbrJLhvhwxxK NinJ8trgg5LcPfH1PMdPYoin5fWbZ0sgIj66zySs= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 1F2AAF8019B; Tue, 6 Sep 2022 14:01:36 +0200 (CEST) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 196CFF8011C; Tue, 6 Sep 2022 14:01:35 +0200 (CEST) Received: from smtp-out2.suse.de (smtp-out2.suse.de [IPv6:2001:67c:2178:6::1d]) (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 EEE04F8011C for ; Tue, 6 Sep 2022 14:01:28 +0200 (CEST) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz EEE04F8011C Authentication-Results: alsa1.perex.cz; dkim=pass (1024-bit key) header.d=suse.de header.i=@suse.de header.b="DZ2b6xOZ"; dkim=permerror (0-bit key) header.d=suse.de header.i=@suse.de header.b="pRLA/3gH" 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-out2.suse.de (Postfix) with ESMTPS id 681171F9DD; Tue, 6 Sep 2022 12:01:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1662465688; 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=VYd9KqtaGym9N3B6x/APXqGLrtikSgVt1GlBl0IGkU4=; b=DZ2b6xOZZtc4ZDcz/zCUSoe+wKo85hlzdMySiorZVds83DEyIn78jjZuhybxTgHfELxOZ5 d/DJPKSpYIVJaa7uPV5z+nFuRndO4K7D2Ew3qtd5IplVUHB2TIUrAYbIRwhRPgP+aosCfz Cjho+/vHn95mpkQVjl5LngRUf4Wh6nc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1662465688; 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=VYd9KqtaGym9N3B6x/APXqGLrtikSgVt1GlBl0IGkU4=; b=pRLA/3gHiN0EMikTKvqnBghBMpKB3/9Ilfax9dnMyTmxA/xZWzA7TZ/L6eEWF3QCe1lQXD QNlGwht7qrYJVVAA== 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 3981D13A7A; Tue, 6 Sep 2022 12:01:28 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 8pBBDZg2F2NnNgAAMHmgww (envelope-from ); Tue, 06 Sep 2022 12:01:28 +0000 Date: Tue, 06 Sep 2022 14:01:27 +0200 Message-ID: <875yi0hfu0.wl-tiwai@suse.de> From: Takashi Iwai To: Andy Shevchenko Subject: Re: [PATCH v1 1/2] ALSA: hda: cs35l41: Call put_device() in the scope of get_device() In-Reply-To: <20220905165826.35979-1-andriy.shevchenko@linux.intel.com> References: <20220905165826.35979-1-andriy.shevchenko@linux.intel.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 Cc: alsa-devel@alsa-project.org, Lucas Tanure , patches@opensource.cirrus.com, Takashi Iwai , linux-kernel@vger.kernel.org, David Rhodes , Richard Fitzgerald , James Schulman 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, 05 Sep 2022 18:58:25 +0200, Andy Shevchenko wrote: > > When put_device() is called in another function it's hard to realize > that and easy to "fix" the code in a wrong way. Instead, move > put_device() to be in the same scope as get_device(), so we prevent > appearance of any attempts to "fix" the code. > > Signed-off-by: Andy Shevchenko Applied both patches now. Thanks. 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 66045C54EE9 for ; Tue, 6 Sep 2022 12:01:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234119AbiIFMBm (ORCPT ); Tue, 6 Sep 2022 08:01:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58736 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234355AbiIFMBd (ORCPT ); Tue, 6 Sep 2022 08:01:33 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BDFD2785A2 for ; Tue, 6 Sep 2022 05:01:29 -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-out2.suse.de (Postfix) with ESMTPS id 681171F9DD; Tue, 6 Sep 2022 12:01:28 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1662465688; 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=VYd9KqtaGym9N3B6x/APXqGLrtikSgVt1GlBl0IGkU4=; b=DZ2b6xOZZtc4ZDcz/zCUSoe+wKo85hlzdMySiorZVds83DEyIn78jjZuhybxTgHfELxOZ5 d/DJPKSpYIVJaa7uPV5z+nFuRndO4K7D2Ew3qtd5IplVUHB2TIUrAYbIRwhRPgP+aosCfz Cjho+/vHn95mpkQVjl5LngRUf4Wh6nc= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1662465688; 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=VYd9KqtaGym9N3B6x/APXqGLrtikSgVt1GlBl0IGkU4=; b=pRLA/3gHiN0EMikTKvqnBghBMpKB3/9Ilfax9dnMyTmxA/xZWzA7TZ/L6eEWF3QCe1lQXD QNlGwht7qrYJVVAA== 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 3981D13A7A; Tue, 6 Sep 2022 12:01:28 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id 8pBBDZg2F2NnNgAAMHmgww (envelope-from ); Tue, 06 Sep 2022 12:01:28 +0000 Date: Tue, 06 Sep 2022 14:01:27 +0200 Message-ID: <875yi0hfu0.wl-tiwai@suse.de> From: Takashi Iwai To: Andy Shevchenko Cc: Lucas Tanure , alsa-devel@alsa-project.org, patches@opensource.cirrus.com, linux-kernel@vger.kernel.org, James Schulman , David Rhodes , Richard Fitzgerald , Jaroslav Kysela , Takashi Iwai Subject: Re: [PATCH v1 1/2] ALSA: hda: cs35l41: Call put_device() in the scope of get_device() In-Reply-To: <20220905165826.35979-1-andriy.shevchenko@linux.intel.com> References: <20220905165826.35979-1-andriy.shevchenko@linux.intel.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 Mon, 05 Sep 2022 18:58:25 +0200, Andy Shevchenko wrote: > > When put_device() is called in another function it's hard to realize > that and easy to "fix" the code in a wrong way. Instead, move > put_device() to be in the same scope as get_device(), so we prevent > appearance of any attempts to "fix" the code. > > Signed-off-by: Andy Shevchenko Applied both patches now. Thanks. Takashi