From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D366FC433F5 for ; Wed, 27 Oct 2021 18:35:21 +0000 (UTC) Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4931E610A4 for ; Wed, 27 Oct 2021 18:35:21 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4931E610A4 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=lists.denx.de Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 8C3808358A; Wed, 27 Oct 2021 20:35:19 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="MPc6ukDW"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id B9A7783499; Wed, 27 Oct 2021 20:35:08 +0200 (CEST) Received: from mail-ua1-x932.google.com (mail-ua1-x932.google.com [IPv6:2607:f8b0:4864:20::932]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id A81398358A for ; Wed, 27 Oct 2021 20:35:00 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=chromium.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=sjg@google.com Received: by mail-ua1-x932.google.com with SMTP id u9so6719921uac.8 for ; Wed, 27 Oct 2021 11:35:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=q4w+wSFsgYAfx06NlLJpvimklN6z2DEJPjRJ3acer6U=; b=MPc6ukDW6/AdtoXORX3q6ty4crNJ37ubes79LIIWW+CdirrIpHuzOHNEJik0+o2qRC KhooYOYx+60EBoYk+H+RsulBr78B+5fhAhW/NeyWrME4dUfyB8p6Syf8rMCSfMyctrz0 CJjasYBZPeRtVynUzFRx+AVdnEUZM9jbK1WdY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=q4w+wSFsgYAfx06NlLJpvimklN6z2DEJPjRJ3acer6U=; b=qJKAwV/V8YUQy4wUn7C5eTjvLtJEpyNoLTQWTYfBwGBudSyY0RHxZ/PzQFMH6O/Y/9 Kc5XDBNS5XhMj4kn5C7UwD050uxllEc+6wY1IFVTr8E7yZocdJkihSva5pmJEl3wf2Bq +JrcAQiJfRGY1Sfz8p2x1KGkeM6bhcmRv8ZMTo09GRGWCTBLNcs5joYFLMIEuHdfx6JP CGvKYHpkhyilEJCLmUSmKhasNLwA5s22DS4Cub5Oy5HMtexE6Y5jagJZrnjC5wxMDedD C37jKJ/kmJuZvvLVu4yxh1n45Dmpu1X6K1dLAeRUc1cHzQB6RFxM/QCsq/s3NgXKa01j MBlw== X-Gm-Message-State: AOAM5322Eq50LHx2DsbCY8MGcqacifgOfmVqhygG7kWYGOtJZ19VO5oQ 19WQDbBPd2LL7Aab3971wySWYedZ1WxHGTA1A2fI84L/x1A= X-Google-Smtp-Source: ABdhPJw4cOvYb5HM9wS8yIoPpGkxC+WImuK1LUqhYUNvrxR48vwF1Xb80UPl6jY1d84NO/rx5xwtqlfpDVNKOoQa8w8= X-Received: by 2002:a05:6102:34e4:: with SMTP id bi4mr26804245vsb.20.1635359699328; Wed, 27 Oct 2021 11:34:59 -0700 (PDT) MIME-Version: 1.0 References: <20211027142338.77161-1-andriy.shevchenko@linux.intel.com> In-Reply-To: <20211027142338.77161-1-andriy.shevchenko@linux.intel.com> From: Simon Glass Date: Wed, 27 Oct 2021 12:34:48 -0600 Message-ID: Subject: Re: [PATCH v1 1/2] x86: tangier: pinmux: Move is_protected assignment closer to its user To: Andy Shevchenko Cc: U-Boot Mailing List , Bin Meng Content-Type: text/plain; charset="UTF-8" X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.34 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.2 at phobos.denx.de X-Virus-Status: Clean On Wed, 27 Oct 2021 at 08:23, Andy Shevchenko wrote: > > Move is_protected assignment closer to its user. > This increases readability and makes maintenance easier. > > Signed-off-by: Andy Shevchenko > --- > arch/x86/cpu/tangier/pinmux.c | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) Reviewed-by: Simon Glass (with a note that normally we would read the devicetree in the of_to_plat() method) > > diff --git a/arch/x86/cpu/tangier/pinmux.c b/arch/x86/cpu/tangier/pinmux.c > index 8385167b2b6b..883860f75e28 100644 > --- a/arch/x86/cpu/tangier/pinmux.c > +++ b/arch/x86/cpu/tangier/pinmux.c > @@ -162,8 +162,6 @@ static int mrfld_pinctrl_cfg_pin(ofnode pin_node) > u32 mask; > int ret; > > - is_protected = ofnode_read_bool(pin_node, "protected"); > - > pad_offset = ofnode_read_s32_default(pin_node, "pad-offset", -1); > if (pad_offset == -1) > return -EINVAL; > @@ -178,6 +176,7 @@ static int mrfld_pinctrl_cfg_pin(ofnode pin_node) > if (mode & ~mask) > return -ENOTSUPP; > > + is_protected = ofnode_read_bool(pin_node, "protected"); > if (is_protected) > ret = mrfld_pinconfig_protected(pad_offset, mask, mode); > else > -- > 2.33.0 >