Received: by 2002:a05:7412:8d10:b0:f3:1519:9f41 with SMTP id bj16csp2826007rdb; Sat, 9 Dec 2023 00:11:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IFIMP0zuCyhZeoKxGLeR1xO/MCEaXI38znIInrj2jeuWKFICFk8YDOpkt4vY45VTyc0gvzG X-Received: by 2002:a05:6870:8290:b0:1fb:e62:5247 with SMTP id q16-20020a056870829000b001fb0e625247mr1979822oae.14.1702109478192; Sat, 09 Dec 2023 00:11:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702109478; cv=none; d=google.com; s=arc-20160816; b=qfmyDm3eTKLFgxSis+GbbKGlL24C/8lPPMhTX0U62C/Pm43+nx6f+cr+MLhOCacO/1 B3BpE8l//HkLHP7hpcOAgmAwUkxzXy4bb8WvB+FnthwHjhM+v1/hbzbeXimXh47d5nY2 0bhqIb3pjKZxYVc4A5Ttgjt1bSVc31sqtHuNntSo1kf3SnmRGSYX1fCYJ9WBPDzz02RS 8hVUzmUi3oV0BwEKmMdgcq7FaevOghvihMvZhSJEPt4WbpbCgtMrmzGAnFkeBktpDFn1 mNtiaCz/49LGk1Qfze1d/RUOel68YFIGd6xyXn7P2sAwQ00ha6OOiSeHOyQ8emBqTidg DshA== 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 :dkim-signature:dkim-signature; bh=7c26mC+66VMAVt1GIwXQwVx/6dZRK5Hi5j94l+x99q0=; fh=BKtipKovsCGcWnDysz6K+aSHDcfhPOHqPEDNW3phKx8=; b=uJI6jaBokzQA0DgrMFV09Q/y2EaP13DIe8CfWuO/M4DyyDqsMsAzcUgIPSwkXp9KSZ yYSa+to64Pcp/kdvDB/iy1bSLhwFYI6pVgbEwOaALHjQ4urf0trTJ0Mgy/LJKcyvooGm 8Ii9+SXnxbt45bIcnfYLQOc7kfpnoXHXvB2iLewBz46Gq86EfjcknbzG+lW2r5i0xzRs D5aOr6S8DOquN9JOU1zYQ563eGUpCDmzggBWuKXOQgfLE87YzVelCC6OuBiQr6ZpcvJG z5ZfFyQRrt+RAZTq2Y2+gFY6Sw5SMhyupM4BzKNoPz9IROT9HPIu0VhE3Eklc+uaGeS9 Cpmg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="13p/SZfi"; dkim=neutral (no key) header.i=@suse.de header.b=9gL8jGZn; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="13p/SZfi"; 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::3:3 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 lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id k125-20020a632483000000b005c677007fa1si2696148pgk.447.2023.12.09.00.11.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 09 Dec 2023 00:11:18 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="13p/SZfi"; dkim=neutral (no key) header.i=@suse.de header.b=9gL8jGZn; dkim=pass header.i=@suse.de header.s=susede2_rsa header.b="13p/SZfi"; 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::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=suse.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id 1960481A2056; Sat, 9 Dec 2023 00:11:14 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230076AbjLIIKz (ORCPT + 99 others); Sat, 9 Dec 2023 03:10:55 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229510AbjLIIKx (ORCPT ); Sat, 9 Dec 2023 03:10:53 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [IPv6:2a07:de40:b251:101:10:150:64:1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EB852F1; Sat, 9 Dec 2023 00:10:57 -0800 (PST) Received: from imap1.dmz-prg2.suse.org (imap1.dmz-prg2.suse.org [10.150.64.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 4EB3021DAA; Sat, 9 Dec 2023 08:10:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1702109456; 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=7c26mC+66VMAVt1GIwXQwVx/6dZRK5Hi5j94l+x99q0=; b=13p/SZfimif1weYWzGmk4lztLxOjIQlEvV+IRoJf84mrAuNmvA0kq0nNgMe1I7kDK+hbtr vlYAD/ZPQvuizUh6aISL7vEShjyVy6+QPv8WTRmH0y4cXuhFOyF7Gxe5ZfbpAYM2V8oKXR MxhQ/E1bpwnFCuY/j7nJD2iPtX5HeZY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1702109456; 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=7c26mC+66VMAVt1GIwXQwVx/6dZRK5Hi5j94l+x99q0=; b=9gL8jGZnNgB0J8ZRNAGlJvX0Jp0orL8XvNXPIYD4vT1qImlMpynMhT4BEQZCwnji8+Y/tO mmjVqwdzTdEvRwAg== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1702109456; 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=7c26mC+66VMAVt1GIwXQwVx/6dZRK5Hi5j94l+x99q0=; b=13p/SZfimif1weYWzGmk4lztLxOjIQlEvV+IRoJf84mrAuNmvA0kq0nNgMe1I7kDK+hbtr vlYAD/ZPQvuizUh6aISL7vEShjyVy6+QPv8WTRmH0y4cXuhFOyF7Gxe5ZfbpAYM2V8oKXR MxhQ/E1bpwnFCuY/j7nJD2iPtX5HeZY= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1702109456; 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=7c26mC+66VMAVt1GIwXQwVx/6dZRK5Hi5j94l+x99q0=; b=9gL8jGZnNgB0J8ZRNAGlJvX0Jp0orL8XvNXPIYD4vT1qImlMpynMhT4BEQZCwnji8+Y/tO mmjVqwdzTdEvRwAg== Received: from imap1.dmz-prg2.suse.org (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by imap1.dmz-prg2.suse.org (Postfix) with ESMTPS id F0E98136D6; Sat, 9 Dec 2023 08:10:55 +0000 (UTC) Received: from dovecot-director2.suse.de ([10.150.64.162]) by imap1.dmz-prg2.suse.org with ESMTPSA id RI9QOQ8hdGWSdQAAD6G6ig (envelope-from ); Sat, 09 Dec 2023 08:10:55 +0000 Date: Sat, 09 Dec 2023 09:10:55 +0100 Message-ID: <87ttor6bjk.wl-tiwai@suse.de> From: Takashi Iwai To: Gergo Koteles Cc: Shenghao Ding , Kevin Lu , Baojun Xu , Jaroslav Kysela , Takashi Iwai , linux-kernel@vger.kernel.org, alsa-devel@alsa-project.org, stable@vger.kernel.org Subject: Re: [PATCH v2] ALSA: hda/tas2781: leave hda_component in usable state In-Reply-To: References: 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-Level: X-Spam-Score: -3.29 Authentication-Results: smtp-out1.suse.de; none X-Spam-Level: X-Spam-Score: -3.29 X-Spamd-Result: default: False [-3.29 / 50.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FROM_HAS_DN(0.00)[]; TO_DN_SOME(0.00)[]; TO_MATCH_ENVRCPT_ALL(0.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000]; MIME_GOOD(-0.10)[text/plain]; RCVD_COUNT_THREE(0.00)[3]; DKIM_SIGNED(0.00)[suse.de:s=susede2_rsa,suse.de:s=susede2_ed25519]; NEURAL_HAM_SHORT(-0.20)[-0.983]; RCPT_COUNT_SEVEN(0.00)[9]; MID_CONTAINS_FROM(1.00)[]; FUZZY_BLOCKED(0.00)[rspamd.com]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_ALL(0.00)[]; BAYES_HAM(-2.99)[99.96%] X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Sat, 09 Dec 2023 00:11:14 -0800 (PST) On Fri, 08 Dec 2023 19:06:49 +0100, Gergo Koteles wrote: > > @@ -612,9 +612,13 @@ static void tas2781_hda_unbind(struct device *dev, > { > struct tasdevice_priv *tas_priv = dev_get_drvdata(dev); > struct hda_component *comps = master_data; > + comps = &comps[tas_priv->index]; > > - if (comps[tas_priv->index].dev == dev) > - memset(&comps[tas_priv->index], 0, sizeof(*comps)); > + if (comps->dev == dev) { > + comps->dev = NULL; > + strscpy(comps->name, "", sizeof(comps->name)); This looks suboptimal. Either just set *comp->name = 0, or fill all with memset(). thanks, Takashi