Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp922844imm; Thu, 31 May 2018 11:49:10 -0700 (PDT) X-Google-Smtp-Source: ADUXVKLDMhgjz/4l+V2Mp6LEuHePYVV/cyvfazpyeyOnvyqAdRKQT0mAGStTRB9sS/MDjE3zaR+M X-Received: by 2002:a17:902:c6b:: with SMTP id 98-v6mr7876989pls.37.1527792550100; Thu, 31 May 2018 11:49:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527792550; cv=none; d=google.com; s=arc-20160816; b=k2Y36rnOSS7B1Mb/B38BTD8k2Qt3Lea3aP2X4ayjVq2FBVBr3Ts9eW7K/Ieza/XICR eiV6o5uFsY06n5fDR4XTu1DmoxMUIe7jM13i47DMu4OscS2kC1LZ+9pcTDtXiSKP18dQ bgCLy8CFqO4aKoHThoW5+bNLWQ9GzyNPOm9ngZuN903HQjQ6om6xdcJxn0Vbr4BXpKtW hb4/GhNRH5ufprwGcO/zQjla1xu9vE+ddt1HZ+Jozs4yThnzlERtRgiEj8/LU3Neq4S/ LdD8qlMCmo/tGf42JlWycPJYGy+KqrtSTxW54SXgot5sGDLEM8eU/D/kbyvhQYTMHfwp 9D8g== 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=OGQWDhM578iy3UIVcf5mi7aZf7NT4A6b98B0UZ71+dI=; b=Xc8VNFLFEp7pyAHfGrxdEbqztSRGdYb4xUJWoeQ2MWn+bVDh/VPRAYc8hl2eer6rP0 lCdl9DaQXspLuFYyV3A5OM4fqF0eGJSF+GSGHxYnEJt49ZcuWu48Lje9pnEboKwAD2yu 643xSt4I6yUArlTdZmqNqGnY7dh/LLeL2CU8VmbLOS6RpE8OwRXaZooefl70g/ftwDUl MvN4PBivjVjt23CFHgA6hsP0iU5NX8aSvmDHxnSP8cON043vutXvOAw+7Cxi3qYeJJ0K X3skPz44N7EGb/L4aPojmnICCFMMG+eDBH+6ApOy3KVud7G32KbaB3b0NlVjdrtWS1cm 50bw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=oS0VuQaa; 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 h12-v6si37931282pfd.253.2018.05.31.11.48.16; Thu, 31 May 2018 11:49:10 -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=oS0VuQaa; 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 S1756003AbeEaSrl (ORCPT + 99 others); Thu, 31 May 2018 14:47:41 -0400 Received: from mail-qt0-f169.google.com ([209.85.216.169]:41400 "EHLO mail-qt0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755877AbeEaSrj (ORCPT ); Thu, 31 May 2018 14:47:39 -0400 Received: by mail-qt0-f169.google.com with SMTP id y20-v6so2905803qto.8; Thu, 31 May 2018 11:47:39 -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=OGQWDhM578iy3UIVcf5mi7aZf7NT4A6b98B0UZ71+dI=; b=oS0VuQaav/RnlsRrubPsdm1CXvRa3cYQwrDPsLt3flVQUxefNOWZ88ulP5GRMaPG5g X2o5lC09w46uCVPLBHIBf7t0ygWeAgeZi1c+gOUQLk2XPDHPdhFrFLpUEtAhSXBE6uoa PPxlekIxAGFKSFdLnurSrEbrGu5/Vzkyj1moyCEKqBnS5TJAKP2xOCAHkYJaZl1mgzcZ e0ejtpXZfRUS0XiR5coPrwjP7ukH+s5Xj6h8Nbx1CQF6GhOhb6V+luYNs3cR+N8Dwdi1 u0y7J54Hq5RT3pjqu34RgRHAtWsufiOCkpkB3LKJvWJo579zHD6BkaVMbRvTAO758k4f vA9Q== 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=OGQWDhM578iy3UIVcf5mi7aZf7NT4A6b98B0UZ71+dI=; b=JDJ3sg6+ku8/ldetgz46dwtOV1LadmRm/HlsvVO+hQUZhgof+gZ8975Xyaq7+75dsU xIoCQXE90pLuatr0SBs6CwKh6XvxaVkTmMtHviYYBwOOsoxZZenamh4Ati2sWsd3Uk3X wMgWlB9VMnUAVmlCkYfhnHGMTrX21we3u0wF0iHtqhY0Ntalu6NfkKtQSy4+iv9E73sv tGvrFMuDDbe4uyZFJPucebZE7aH99OQSF3orTLgMz7pdLMs2CtH6x3wnkZL62xYFj63y SH7dD3E/m6qYI99pdkIyRG1fTrAogPm/v/CFOHsRJV/rUdBP9wyOWNBNlwvLXjDaL4up rrJA== X-Gm-Message-State: APt69E1ZVk59Z1GegEFZjazPO7dk5RUgbkEkO12hIg9QqUFzc2KL/yLG 0s9Hfu75Wv9JtXH8EsLgFXQJwqVrzxuTAvmqDgiWeoox X-Received: by 2002:a0c:b2ca:: with SMTP id d10-v6mr2731747qvf.16.1527792458772; Thu, 31 May 2018 11:47:38 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a0c:9896:0:0:0:0:0 with HTTP; Thu, 31 May 2018 11:47:38 -0700 (PDT) In-Reply-To: References: <1527765086-19873-1-git-send-email-xieyisheng1@huawei.com> <1527765086-19873-2-git-send-email-xieyisheng1@huawei.com> From: Andy Shevchenko Date: Thu, 31 May 2018 21:47:38 +0300 Message-ID: Subject: Re: [PATCH v2 01/21] usb: phy: use match_string() helper To: Sergei Shtylyov Cc: Yisheng Xie , Linux Kernel Mailing List , USB , Felipe Balbi , Greg Kroah-Hartman 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 Thu, May 31, 2018 at 7:55 PM, Sergei Shtylyov wrote: >> - donot rename err to ret - per Andy > > Hm... >> - int err, i; >> + err = match_string(usbphy_modes, ARRAY_SIZE(usbphy_modes), phy_type); >> + if (err < 0) > > This is one of the few cases when 'err' is not the best name for such a > variable. I'd prefer to see something like 'match' or even 'rc' or 'ret'... :-) Then leaving i would make it? I'm okay with either which just not renames err, b/c it's used with something else in this function. -- With Best Regards, Andy Shevchenko