Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp1857088imm; Tue, 22 May 2018 10:25:07 -0700 (PDT) X-Google-Smtp-Source: AB8JxZos8I0ydHMpXS5csDzVIcW0RDu0TYYDnRZJs0X6WtSvk3ytIc5U6cpcTVBDGyfYbERs1R9D X-Received: by 2002:a17:902:28ab:: with SMTP id f40-v6mr25890048plb.208.1527009907234; Tue, 22 May 2018 10:25:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527009907; cv=none; d=google.com; s=arc-20160816; b=MtGcPntpFcufTQ0sX5LMlkJSeFqclWkima0zW3slbDqfeISGoCqVSL/AN173Nnao8H U4IDsHMmRLiEf7xl0mHmQYb1rkeeNAWQBoWfSyLVw0qAcfumR26hZSlIf+XwzwUKu++b FTH/g5MtiHZE88R3XzC3icgXK/9O+YKcNo0Kafo3kt47kP9voemZ+6JUgsdO8a8kQFkO PtNZEKFB1lhUVwDFJU8jhO2YcHudpQX4AMwO02oWjR640L8jilkwA6BrVzU1kHlufRfd ssmLMO0RtEKSvdQVEmxjNBqlPV7THjyhvA+CCuwhezAo08Lqos2VZG54F9QThSkCkwgr FhlA== 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=i6EOTYoMvDVDPXHFswJ2Z0svtOutikUSKVXICAitK6Q=; b=mhqjIBz49kHcWc1ROI0UdYtq4Mc+cMwld92++r6u/8lPV7v0WLE2M6cost5AfCdMqN myNV5DKpCq/+3vY82+0EjRYHTxjD4m3GS1ggAmeTtL76+5T8tEx/WS7kazTuH7IrmfsO 092ylgJuh3uwVqySqivsxQBRkWsaenFRD1qsqvKpQ40GrMuF+vzUw8jgnrdJwMDw9Xse gQ/FDpc7Z/UoADG8lCvZrjHjZ/mRbrgbqSz5YVr8i1FtMMJcPzVKlfRGtCer/8cwEHzw b1Mngc0iM9yYMVsr4wvDAYHn9MKQdbDIRaQID3mk6AMaIk/hmak1hSWRaG456mYcFam4 kXZQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tRkA3da4; 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 g89-v6si16780566pfj.349.2018.05.22.10.24.51; Tue, 22 May 2018 10:25:07 -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=tRkA3da4; 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 S1751532AbeEVRXg (ORCPT + 99 others); Tue, 22 May 2018 13:23:36 -0400 Received: from mail-qt0-f195.google.com ([209.85.216.195]:37732 "EHLO mail-qt0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751278AbeEVRXf (ORCPT ); Tue, 22 May 2018 13:23:35 -0400 Received: by mail-qt0-f195.google.com with SMTP id q13-v6so24429198qtp.4 for ; Tue, 22 May 2018 10:23:34 -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=i6EOTYoMvDVDPXHFswJ2Z0svtOutikUSKVXICAitK6Q=; b=tRkA3da4sBdf0CecYlr+tFrQDXOjCUEUJBlL1HS5qjC/DN6W83uV/ka0EU9SGI+oU5 PFOEIHdQEJ6QxdCe8p2lvUanP1zrMwg1YqVONsfMhGay86WY/0h2xj/mvAUeH+GM6XX6 FLmtHMNVXlGLqWCi013GuDCKIiv17BnFqu64pGZUQUMDykA8xa/xMi4+ve1YPBWzDVFi aD9rdEMYWPhvY3R7sA9+Yi3EqlIVh8Wu2F/9G8Tp92Oeq+skloWTGB5WHm9VRbgVJ9V2 HSDd4gHuoRYste9kiiJKBdbKCDoREEmFvGYSShkeQDDBmS3D5hgSqOXh5Q/S6gbwGM7Q /New== 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=i6EOTYoMvDVDPXHFswJ2Z0svtOutikUSKVXICAitK6Q=; b=cFKFZkAz5bZHMPAdHSvSha8dOW0GnEBrXvx4GOnYlsiTQ4W3W7NYPT5XoRgG/Ui2I3 O2LrJ5vEanZAjHyV4f0prbw86ZpHhswy31dx/2iL/2d4y4eG+9CTi0NHL6rADpOVkroh qmZ9dtyxlJrOydXEDeLMOVxgo01X+DdpqxxF7+VmAoeCwSU5usgqAcz4aHw+gjTVwEwg 3WdWrxq32OmS8+oA/eo5U0r6KN1nX3zI//KN0bESKM0LpIFw+qss5qnoeYIGoY45vyEB se8A4nC06Szx60r5np/X1rueYMAd+GB524paFavrCOvE5oimLnFlwrpEq5HGr7SQnTYo ySxg== X-Gm-Message-State: ALKqPwffoCZldYNyDdRfjq0MH6q+MVE8QF0KEwqy0ibihd4i0QVUxMZm ld9A0EM3o64ViKaqdABFjiX0bX54HqOKDKemB7EZpEjt X-Received: by 2002:ac8:3488:: with SMTP id w8-v6mr24538290qtb.278.1527009814434; Tue, 22 May 2018 10:23:34 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a0c:9896:0:0:0:0:0 with HTTP; Tue, 22 May 2018 10:23:33 -0700 (PDT) In-Reply-To: <92b32dee-7ba9-ad6d-573b-9924453a69fb@huawei.com> References: <1526903890-35761-1-git-send-email-xieyisheng1@huawei.com> <1526903890-35761-32-git-send-email-xieyisheng1@huawei.com> <92b32dee-7ba9-ad6d-573b-9924453a69fb@huawei.com> From: Andy Shevchenko Date: Tue, 22 May 2018 20:23:33 +0300 Message-ID: Subject: Re: [PATCH 31/33] ASoC: max98088: 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 Tue, May 22, 2018 at 3:30 PM, Yisheng Xie wrote: > hmm, you mean something like: > > int ret; > > ret = match_string(eq_mode_name, ARRAY_SIZE(eq_mode_name), name); > if (ret < 0) /* Shouldn't happen */ > dev_err(component->dev, "Bad EQ channel name '%s'\n", name); > return ret; Yes. (But remove that useless comment). -- With Best Regards, Andy Shevchenko