Received: by 2002:a25:c593:0:0:0:0:0 with SMTP id v141csp743987ybe; Fri, 13 Sep 2019 05:41:47 -0700 (PDT) X-Google-Smtp-Source: APXvYqxa9igZN71JuqkDueMdMvWRD+baLY4fydJpuZTOoFiNV3CkDHHcjI3acLRhGg3tOZ7v9j0R X-Received: by 2002:a17:906:6852:: with SMTP id a18mr37533294ejs.229.1568378507627; Fri, 13 Sep 2019 05:41:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1568378507; cv=none; d=google.com; s=arc-20160816; b=fHxI8EShZvoq67oxOqxuJG3BSabbczs06SjJwLcA29W5AV3MO7ibOK6PizukP5zqAj CE3HZ4cSmwK+1GSXK7pSH5f9vgg+odZU2US3CkSGVuZHzvPAsFBR6xZ77ZNnCTVKfJED jie5eotr10zIKIFsnq2HETPJlLu7GuMDXMqopw01/df8QSj9E6IpSPFtpsTqsw5mRImp 7hLqHz4DQbX/gs+5BzG1qigBvOKwccUILKVvMscVz7s7YiKWDNhwwer68rAqta0D33/X wmeKjHhY4IANWBoDzKFjIpDDWRc0mo6HaEdj99o+n2zD7RLyCBGptBo4XYKm2+0/q/IY wu3A== 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 :in-reply-to:references:mime-version:dkim-signature; bh=8pSb7ipxDEbBBNYVFT9VmqMM2iZRGR+yb26FbUargVY=; b=dCyEDYT/2vKNVPfLXwoofHJtpyMaLNNgTUO9ZY8cQoLVEs4Xq+nlpQ/4OVw8KCAKv+ piHbZezOZ/ZoYrh1GkhuDhe3bSEGrpS9sy/Rt5BOegBqWa0w1TGL2tPMuOl9mWx9dZIR TNW0jpbYtBDd9UuyPyEc6JkfYlyH4ciap0LP5XXHR3IFKwL/OVCSqv48CMTaFYPbO9j1 PxWhpbYlItiJfKk3dM6j7hNcm6WNfdk/8RLEEYXM3sJbcXbFiCUp/zOl07KcjDYEoc/n VNTCav6gqWN1295NPQVCrGRa2gm7Of2y5TAZEBdZhfb3kuIaNvHKRF/xF6LpuLBJt2a4 NxhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=YhjYxFjB; 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=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id z12si14389065eju.15.2019.09.13.05.41.23; Fri, 13 Sep 2019 05:41:47 -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=@linaro.org header.s=google header.b=YhjYxFjB; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729982AbfIMMjj (ORCPT + 99 others); Fri, 13 Sep 2019 08:39:39 -0400 Received: from mail-lj1-f196.google.com ([209.85.208.196]:42950 "EHLO mail-lj1-f196.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726771AbfIMMjj (ORCPT ); Fri, 13 Sep 2019 08:39:39 -0400 Received: by mail-lj1-f196.google.com with SMTP id y23so26933381lje.9 for ; Fri, 13 Sep 2019 05:39:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=8pSb7ipxDEbBBNYVFT9VmqMM2iZRGR+yb26FbUargVY=; b=YhjYxFjBqg+kG8mrU9/YmXPsS8hajlgFK3l9scWiFwopNjmhYW1Gpoa7g1nTliuW3o zCwMwBECsgn0FldeUKIVDrYPrme2jmYbyLIILUk2p+KGL2X833RHWZYfW5KYEtdIMoCi em1FI5GEzDzRzVXo+NDJjjkkZZc00VvallTjOY7+ifw/eZI54eXXfUiP/QfsGKUfySPE ++0HHZcYgbg7Or8g26dVFn0JzOHfqCEAfoW1b/Si20aQ7FVrTPR4vDEcTL88Oex9A5Kh DTDc1AGZLSFXs14Om5nO7DEQJq665Zk90lody6chSrUV93xuAWU3KmueptCtMb+lHY8Q +V7g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=8pSb7ipxDEbBBNYVFT9VmqMM2iZRGR+yb26FbUargVY=; b=tQu6YsqjUb0cIKUQrmsXMMBJMEVVMqtsx4rKZObB59kw4HTkyGV7w7A8jTxHu6Du7p ObDOC67gdlRYu0ulJ6EDrwH7d5pdbdiL2vMfX7coN7VKysImRR+VM4WhHzwRgD00ATDT 4xSu/QAzzkyisTfuH6NDKyFBxqB5+6S/eEUUxThNow8pqruOVA8nqmt8XJBwmVC0VTem iT3bnPUHwo1lbsdt5Zuv8oRfLCXFgPt8PQSzIFYuFdNxMPGedFUNESJX60dTDljkZZlZ rtT4QmwVpm2xibvXDvJKtZTL6pbMQNrRMBcARxPOmG2IqNLquA8vtI7hXF6685IXOM+n DbHQ== X-Gm-Message-State: APjAAAVhlDN1txULf8xWO6zi1MmvQx7x58Lan7YxLiXQB0VHPFXtn6oF vpvaAzmfJem0cVA7+sIkvxhQHMEjqZwkDOC6Foh4FQ== X-Received: by 2002:a2e:7d15:: with SMTP id y21mr22856642ljc.28.1568378377447; Fri, 13 Sep 2019 05:39:37 -0700 (PDT) MIME-Version: 1.0 References: <1567662796-25508-1-git-send-email-light.hsieh@mediatek.com> <1567662796-25508-3-git-send-email-light.hsieh@mediatek.com> In-Reply-To: <1567662796-25508-3-git-send-email-light.hsieh@mediatek.com> From: Linus Walleij Date: Fri, 13 Sep 2019 14:39:26 +0200 Message-ID: Subject: Re: [PATCH v2 3/5] pinctrl: mediatek: Refine mtk_pinconf_get() and mtk_pinconf_set() To: Light Hsieh Cc: "moderated list:ARM/Mediatek SoC support" , "open list:GPIO SUBSYSTEM" , "linux-kernel@vger.kernel.org" , Sean Wang 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, Sep 5, 2019 at 7:53 AM Light Hsieh wrote: > From: Light Hsieh > > 1.Refine mtk_pinconf_get(): (...) > 2.Refine mtk_pinconf_set(): This explodes on the build servers and it's because of this: > @@ -78,93 +78,75 @@ static int mtk_pinconf_get(struct pinctrl_dev *pctldev, > { > struct mtk_pinctrl *hw = pinctrl_dev_get_drvdata(pctldev); > u32 param = pinconf_to_config_param(*config); > - int val, val2, err, reg, ret = 1; > + int err, reg, ret = 1; Deletes "val" and "val2" > case MTK_PIN_CONFIG_TDSEL: > case MTK_PIN_CONFIG_RDSEL: > reg = (param == MTK_PIN_CONFIG_TDSEL) ? > PINCTRL_PIN_REG_TDSEL : PINCTRL_PIN_REG_RDSEL; > - > err = mtk_hw_get_value(hw, desc, reg, &val); > - if (err) > - return err; > - > - ret = val; > - Updates a bit, but look on the reg = line: "val" is still used. This patch can not have been properly compile tested. Please rebase on latest "devel" branch from pinctrl, fix up the problems and resubmit the entire series after making sure it compiles and works. Yours, Linus Walleij