Received: by 2002:a05:7412:f589:b0:e2:908c:2ebd with SMTP id eh9csp124156rdb; Tue, 31 Oct 2023 02:46:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IH+IuthEjTYOSlJiBmqPxoF08ftQSZXVU1/rVWAKDSZXSf/TINlBgRu2ynzhqMr9A/vHCGi X-Received: by 2002:a17:902:e54e:b0:1cc:3fe1:f45e with SMTP id n14-20020a170902e54e00b001cc3fe1f45emr6020051plf.27.1698745584078; Tue, 31 Oct 2023 02:46:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1698745584; cv=none; d=google.com; s=arc-20160816; b=amUBBhItaaTd4fHut6A+vCRu4f9T4Wcb/PGj20QYch5LJC+r+b24ztoKicI2QeBfUE 0NU+Kft+ifdN8P8p8se46XnEGIApSnVuPaag9Tawx9l6KHHM8lPUH1dml3+gCa2vP5kJ FwLjOHQ0ts8wT9dLdT3458THmf5P1Gji+/tEyxQ17ZHZg8pr+P+O/M3TiLKDN48Z85wq iZ0WYhV0KMgckMObu37V7zGYQH51qW0YD6gBqsRITruclhvhfnxS0uoWmUJDSKzUNmx3 chgmaykWIgCdKzE1WM3xKnEJqmMiSR7pMOXyivlAwsaG9IyumlP3+Nvbe0LsG2xVSHVg MbUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:user-agent:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=hDhCUSb8NPaaSvLcNg8fVpHX9lTKTxY1dI2P3S4thf4=; fh=eZ63SLy6EmVjB/E94yHBqgLa9dBs2WW6TwvrCQAw7BM=; b=XizJZEzNuq/mXZgqDBhv3UiAeHoLDLrXAE7aNW3QjZ6VNsLJ23mnGQzmlLFB2npjO4 SLn0o9x/r3G+UKVdk3oE+oOvmZAEsyN/S9Jae8tRkeHx2NxQuZ1BVDHV5M5n/b7XsHZH 1INKxcKYTv6vZlQF1xvCWHiXYZlQ3YdCe2Gh/FUuCtvAIIZ7EQwIZO3BgrV35CAiD8Zt mSnM1R6PNqtVkKAPzTbNyeS40GWUSEaV98/ettQuouCjRf6NXR819yKqsqR/VidkB8p6 BL8XL56s+R0X2EPD7kFWoIHL7E/4MFiEJPwNOJ41xGbMOJ2xE3ZP4rn7XRLuTcTwymMo N6dA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id kc6-20020a17090333c600b001cc686a4128si750009plb.600.2023.10.31.02.46.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 31 Oct 2023 02:46:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 3F63480BA6AB; Tue, 31 Oct 2023 02:46:20 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229705AbjJaJqN (ORCPT + 99 others); Tue, 31 Oct 2023 05:46:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36912 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229436AbjJaJqL (ORCPT ); Tue, 31 Oct 2023 05:46:11 -0400 Received: from mg.richtek.com (mg.richtek.com [220.130.44.152]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 38BACDB for ; Tue, 31 Oct 2023 02:46:06 -0700 (PDT) X-MailGates: (SIP:2,PASS,NONE)(compute_score:DELIVER,40,3) Received: from 192.168.10.47 by mg.richtek.com with MailGates ESMTPS Server V6.0(1849591:0:AUTH_RELAY) (envelope-from ) (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256/256); Tue, 31 Oct 2023 17:45:35 +0800 (CST) Received: from ex4.rt.l (192.168.10.47) by ex4.rt.l (192.168.10.47) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1258.27; Tue, 31 Oct 2023 17:45:35 +0800 Received: from linuxcarl2.richtek.com (192.168.10.154) by ex4.rt.l (192.168.10.45) with Microsoft SMTP Server id 15.2.1258.27 via Frontend Transport; Tue, 31 Oct 2023 17:45:35 +0800 Date: Tue, 31 Oct 2023 17:45:35 +0800 From: ChiYuan Huang To: Mark Brown CC: Liam Girdwood , Jaroslav Kysela , Takashi Iwai , Allen Lin , , Subject: Re: [PATCH 1/3] ASoC: codecs: rtq9128: Fix string compare in DAPM event callback Message-ID: <20231031094535.GA15465@linuxcarl2.richtek.com> References: <1697795435-5858-1-git-send-email-cy_huang@richtek.com> <1697795435-5858-2-git-send-email-cy_huang@richtek.com> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Disposition: inline In-Reply-To: <1697795435-5858-2-git-send-email-cy_huang@richtek.com> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, score=-0.8 required=5.0 tests=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 agentk.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 (agentk.vger.email [0.0.0.0]); Tue, 31 Oct 2023 02:46:20 -0700 (PDT) On Fri, Oct 20, 2023 at 05:50:33PM +0800, cy_huang@richtek.com wrote: > From: ChiYuan Huang > > Since widget name may concatenate the component prefix. To compare the > the name with 'strcmp' function in shared DAPM event callback will > cause the wrong RG field control. Use 'strstr' function, instead. > > Signed-off-by: ChiYuan Huang > --- > sound/soc/codecs/rtq9128.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/sound/soc/codecs/rtq9128.c b/sound/soc/codecs/rtq9128.c > index 371d622c6214..8c1c3c65475e 100644 > --- a/sound/soc/codecs/rtq9128.c > +++ b/sound/soc/codecs/rtq9128.c > @@ -291,11 +291,11 @@ static int rtq9128_dac_power_event(struct snd_soc_dapm_widget *w, struct snd_kco > > dev_dbg(comp->dev, "%s: %s event %d\n", __func__, w->name, event); > > - if (strcmp(w->name, "DAC1") == 0) > + if (strstr(w->name, "DAC1")) > shift = 6; > - else if (strcmp(w->name, "DAC2") == 0) > + else if (strstr(w->name, "DAC2")) > shift = 4; > - else if (strcmp(w->name, "DAC3") == 0) > + else if (strstr(w->name, "DAC3")) > shift = 2; > else > shift = 0; https://lore.kernel.org/lkml/20231023095428.166563-8-krzysztof.kozlowski@linaro.org/ Since the better change is applied. Please ignore this one. Still wait the other patch(2&3)'s feedback. Thanks. > -- > 2.34.1 >