Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp836094imm; Mon, 21 May 2018 15:27:08 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoVWy6XZQ7gvezuaa3dcV0lJL9KI0265Z71gDuwmdHon4weKLlh3sX20V+Xg/w0EvvT2YQr X-Received: by 2002:a63:6e8b:: with SMTP id j133-v6mr6760080pgc.91.1526941628454; Mon, 21 May 2018 15:27:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526941628; cv=none; d=google.com; s=arc-20160816; b=uCRabF5sB6xkB5fSF84SkvW7uU6fFmhb/AyZO1+0wSC/7Gbrp65vFHtpYIandyG+9P ICmsiPc+FiILmS5K072rZEjGOOOORjJbacFhcevafSN0J1xTyxjpdsmqUhr4hTDDVpBl aqeKJv/xIEjepPiZji7/Iw1Ug8r+bGBi+aNKXcnf1oAWIKxdj9U4uIzqU+c9WMxaCK8Z qJqZi6JHeU4d6iiVZgqkyJT4mP46qNVVZLYDGZSqP/OhUcXAeGb9Rjt0+tnivQhpqnb0 SMzsW8RMpzi6XKDnZRVnGVym2imH2Pwp8sLiDb+yKopPybb8dASkDllSfZQdgIrP3plM gxkw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=FmnzK6Ee6CWhJUjscPx5AmrW45NGpXJQ9TKnSwf/TRE=; b=PGRr1QrM5LJrlOci7llidvleXTzVarS3A+NVrsBr6LepSpyym1eOC+1tj7ZD5wVHKf Tft3C3U06FefqsnW2He767wRZ2IxaPAz/lBKuT4ECn1Kcv2MKkt0uSc2QIjUc0G8KbgV n897hCY7ClSs/ge7uVNNUImSxwLwdixoLGSZtW9PkJ5H25ttDljXUPHgJHYNMD1AoZR3 8ENcxf3FqTkTlow0CbEq9Lrm/qZ/+RYQUNv6jEr083Fc2FBroKbe+z7/DJK3zTxrqmlr LGd+kBzpSbyYnpOBWlODacnlcsEbq/O5J57AOfdMXvql84EQRSDb7OOmej0zKopuggRI m76g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VPqoEpNz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id w6-v6si14932038plq.382.2018.05.21.15.26.54; Mon, 21 May 2018 15:27:08 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=VPqoEpNz; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753230AbeEUWZp (ORCPT + 99 others); Mon, 21 May 2018 18:25:45 -0400 Received: from mail-qk0-f195.google.com ([209.85.220.195]:44379 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753432AbeEUWZl (ORCPT ); Mon, 21 May 2018 18:25:41 -0400 Received: by mail-qk0-f195.google.com with SMTP id d8-v6so4246036qke.11 for ; Mon, 21 May 2018 15:25:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=FmnzK6Ee6CWhJUjscPx5AmrW45NGpXJQ9TKnSwf/TRE=; b=VPqoEpNzoxkraF77FWn8vBl0E8vnYK7QN6DSeg20FHYZDjCuzgRib27ieORR5K8AHe AWYVTxE+3xm0nwixuh6ydLFHBQ2B3aBqdK/PURcOHxlG5oBOT5grQlveUU+wo1lmQ1JA LnyWsY3/3PgaB6pgtDK/KmeIAGfxiTly7g8UnHRVoL6TB+47rPnY5ZYtcOWUkyGcaQh0 YAGyf2AWbwmrSM8Q8QCOrQwxtUSNfl4ypEz6MZ4ZSoubW2FUYHuugADs+YkBWNPmF3CE iML4OhSNOeYShAXDRPLOdcz4DLa7HK07Eo1AvWOYgqwFVIMCpiIjW6Ejw7TwuISt9Q1A yq8A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=FmnzK6Ee6CWhJUjscPx5AmrW45NGpXJQ9TKnSwf/TRE=; b=WWdHQwU9LaISczfCEiLCfF0XkT7QZoxMV8ufpCzUFujhWCG2a8dgxZBWtkytzomMi6 SUiDdhDluQGKipChmFfe7MotdKVd5omJX3rnO8DRc5IldUzoS/ZTQzqW3IF2H+WiDQD/ XGLY/AEWNGYLNvmnvTKlUFVmAe8plMM6zti/JZidUAREfOUCnS+D8rNDxKX/tWqbsP9G jYk0qPukDqDbKaN05EWscwVGpjXAaf4MNa6n1gxS73svVJpMKdpG1CgcxRYYYBLBXcBQ nLXjMPkKJz2DYiRC2xiJjC/8I6QBniCH0xZHnjpyPJ/XSkXQ4jNK9dy8hp01onb+6she fIPQ== X-Gm-Message-State: ALKqPwdwndCifEARVe7y+o08x4uh5KfaKfoX0/z+Xf+gFu9GPhR6I1mI zUP8tOHuaSCrCvi/CY2JgJgv9xWppmqz/eYqjs8= X-Received: by 2002:a37:83c4:: with SMTP id f187-v6mr18130576qkd.97.1526941540396; Mon, 21 May 2018 15:25:40 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.152.150 with HTTP; Mon, 21 May 2018 15:25:39 -0700 (PDT) In-Reply-To: <1526903890-35761-33-git-send-email-xieyisheng1@huawei.com> References: <1526903890-35761-1-git-send-email-xieyisheng1@huawei.com> <1526903890-35761-33-git-send-email-xieyisheng1@huawei.com> From: Andy Shevchenko Date: Tue, 22 May 2018 01:25:39 +0300 Message-ID: Subject: Re: [PATCH 32/33] ASoC: max98095: use match_string() helper To: Yisheng Xie Cc: Linux Kernel Mailing List , Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , ALSA Development Mailing List Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, May 21, 2018 at 2:58 PM, Yisheng Xie wrote: > match_string() returns the index of an array for a matching string, > which can be used intead of open coded variant. > + int ret = match_string(bq_mode_name, ARRAY_SIZE(bq_mode_name), name); Rather split and move an assignment to the line before 'if'. > > /* Shouldn't happen */ > + if (ret < 0) > + dev_err(component->dev, "Bad biquad channel name '%s'\n", name); > + return ret; > } -- With Best Regards, Andy Shevchenko