Received: by 2002:ac0:a594:0:0:0:0:0 with SMTP id m20-v6csp794123imm; Mon, 21 May 2018 14:35:30 -0700 (PDT) X-Google-Smtp-Source: AB8JxZoGHIfmeftvQIDeNUrFqEr6U02aNzGOFBafWFlHUAKmtHsRMebvQ82S4w8pCYKRWsb7CiQ7 X-Received: by 2002:a17:902:8541:: with SMTP id d1-v6mr22841765plo.106.1526938530718; Mon, 21 May 2018 14:35:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526938530; cv=none; d=google.com; s=arc-20160816; b=wJt0e2994gUW8hf6XoQ/rpbLb1Ou4+1cmAAoNwp0KuU3jxZecQN5hsihtiQLWAQPHf b2XnDzt6FR4sRBKTzfLyUCfwSrNDutVdA6LM2VItv3t8hjRsvjA8ojcDAKKv0tQR91wd UPP3TKaUl03TXka+rdyKjj2L0uza28oPr5qkSTeaoAPVUnYDLaGNlqsiWOoLEMruJtBn DpFwZdxGo4ioLGUIfzHKPs/FjP6B328ZRsqA54sswu2bZB8vOlkMpiVip/2Ohr8zFI6i pY6Nl49RR9xap6IPeXfSnxcZzuseMxhj5hZ/Dz5NdzJk+v1yrqxpHUI4tBX/s5ZM/11W lzSg== 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=nA5qOrX7IRY0RyRcUHG2OJDBNJaGCAIlS9Wvp9PYg74=; b=yLUJwoRJFkKulGylD9UeLrJ3kBWL5VM6nDiJvCjWydmzLnY23MCqxS1IZPQNF0Suo4 igzvtc5p8kT0uNTMlXHptkskJhgQ22Tt4XhwxMqKzzTlYqYaCdJaORu517t7YLO+jHe7 LiV/CYxLtNmGD5lPJeob5yLEzOEi23EO0YhXUR6RlKeooDB05jXXNRepBCIPh5ZulweG InWABOlqqS9bIzkvBJG2tPPncQplh0k/LpD/TK8iS7zDOmN75pEwGWgzL+jTC0r3z9mp V1kXNaxX6+mcSPeDLBUIf2TcYTIdddLc40GFh7XkbF07gykzT91hGaXJrjEVyfo7M9Od FIag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=kJCzmmox; 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 33-v6si15216490plf.308.2018.05.21.14.35.16; Mon, 21 May 2018 14:35:30 -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=kJCzmmox; 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 S1754527AbeEUVfI (ORCPT + 99 others); Mon, 21 May 2018 17:35:08 -0400 Received: from mail-qk0-f195.google.com ([209.85.220.195]:38085 "EHLO mail-qk0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751202AbeEUVfF (ORCPT ); Mon, 21 May 2018 17:35:05 -0400 Received: by mail-qk0-f195.google.com with SMTP id b39-v6so12966329qkb.5 for ; Mon, 21 May 2018 14:35:05 -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=nA5qOrX7IRY0RyRcUHG2OJDBNJaGCAIlS9Wvp9PYg74=; b=kJCzmmoxJPxjcDhsKHQ4sqgDVjUbgGMo+QdDs7VrOSBmCT/QSwUhwqvhMYocSkePYL rBbzHW186vYBtHVoP6OOR79rz5pd7kbmFJjv83MlWijGa4WNDSUsLNiQBKdVe5nBA8B0 nhS2YEhk25kpIjgxe1JELoAIyjmgN4rICx1nDdHanyoOB3O37F3NJ49u9ynLL8dbFZ0Z 6x0ufZQbABeJzmHYRpnQSGH21dCXexh4/qkySULB4Ce3xIHST8lb7aNOVoAWXLrlyKTw OeSDLtEOmfgOr1rKGGu53pbm1SGO4UXjKzMdVxg8ASmOG6cTJMenGnmYIXgdjSghFryw zHUg== 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=nA5qOrX7IRY0RyRcUHG2OJDBNJaGCAIlS9Wvp9PYg74=; b=r1p/WTs42O0p+C1kIV9FLhgQxixxu908ETde78/89ueH60Uyzjx1YZ7VwAQCuTjjqe s+x1rmScK1ByTJ2Orf2sWN4cJ7CxbcUqIqSMF21V/1q05A07lBNLKWKLFsKpV+WzOm+b 2N5HLb0z0QVqvkGTAQk7MChi1MrT5hQePCoA26c6yzOwLvkD4yt66fVSJMOOnAoPvvXJ WzOkHAfzKLgOP6FWCFWe+nFO46nskwFvB+KTOhpnhqXT9DQsCfl7gHni/vtEpX8dxR1k u3g1O4VF0vuRN8N2nVNPSLzfsUhgJbGN2aUVVgbS+vRce4hE09xEgIjk73fgvyskDZ32 C4ig== X-Gm-Message-State: ALKqPwfyljL221mUfXkwUaWG+3ZJioE3nSjgIIR8DRFO7SJpwCPyvJ0F r5KvXFfkga1ZM3pwSllBmW6TGURAzoFYE0uMCHY= X-Received: by 2002:a37:cbc1:: with SMTP id u62-v6mr17907474qkl.83.1526938505131; Mon, 21 May 2018 14:35:05 -0700 (PDT) MIME-Version: 1.0 Received: by 10.12.152.150 with HTTP; Mon, 21 May 2018 14:35:04 -0700 (PDT) In-Reply-To: <1526903890-35761-4-git-send-email-xieyisheng1@huawei.com> References: <1526903890-35761-1-git-send-email-xieyisheng1@huawei.com> <1526903890-35761-4-git-send-email-xieyisheng1@huawei.com> From: Andy Shevchenko Date: Tue, 22 May 2018 00:35:04 +0300 Message-ID: Subject: Re: [PATCH 03/33] Staging: gdm724x: use match_string() helper To: Yisheng Xie Cc: Linux Kernel Mailing List , Greg Kroah-Hartman , Quytelda Kahja , devel@driverdev.osuosl.org 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:57 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. > + ret = match_string((const char **)DRIVER_STRING, > + TTY_MAX_COUNT, tty->driver->driver_name); It looks like DRIVER_STRING should be converted to const * const. -- With Best Regards, Andy Shevchenko