From patchwork Wed Mar 12 08:50:08 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime COQUELIN X-Patchwork-Id: 26076 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f197.google.com (mail-ig0-f197.google.com [209.85.213.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 55FBA202E1 for ; Wed, 12 Mar 2014 08:59:48 +0000 (UTC) Received: by mail-ig0-f197.google.com with SMTP id hl1sf23958588igb.0 for ; Wed, 12 Mar 2014 01:59:47 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:subject:date:message-id :in-reply-to:references:cc:precedence:list-id:list-unsubscribe :list-archive:list-post:list-help:list-subscribe:mime-version:sender :errors-to:x-original-sender:x-original-authentication-results :mailing-list:content-type:content-transfer-encoding; bh=kTkNHgj/iWrxsEQUW+37sOTc/EhDGV+u+YGFWlfBBr8=; b=bZ4yklNPe52Ddclyn7mqRq4hUo2VkG6Jxp51AL7zZmmkaYWFdSiZZabwwXQuz/+Jbz IFXSdBTbSNTl/rAp5BsKbqmgQq5Ev2SteF/R7sI6/gWnSEEDbQL+7F9WmD70+bAkARVA r9r7h05AGTqV6cc9g84+yUNU6um7FBDkPDXl5D2AonnZnbLzcDazr6fXIACJrDD//BBf 69LlXeD5gnJtn7UNXPsotykubGQZMH/ECFXyW2Pm2ylwDyMJuLAdvK79puQPKX2rT3R4 683lxbqb+drtFMnPelQKNEjJmAn3PBu43M5N3qkkKkZCPqwvFw5F0XTwuQxT0rj9eWBX JFIQ== X-Gm-Message-State: ALoCoQnq5rsAyenxw7F5upxYYoI+8KA59Bgjgu9DeCFbh7HClMEX7hTBmMCsxERcXCxZl4EfFSNe X-Received: by 10.182.19.164 with SMTP id g4mr17103685obe.21.1394614787759; Wed, 12 Mar 2014 01:59:47 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.22.139 with SMTP id 11ls2780306qgn.84.gmail; Wed, 12 Mar 2014 01:59:47 -0700 (PDT) X-Received: by 10.58.201.5 with SMTP id jw5mr30410369vec.6.1394614787646; Wed, 12 Mar 2014 01:59:47 -0700 (PDT) Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by mx.google.com with ESMTPS id fi2si7299522vdb.49.2014.03.12.01.59.47 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 12 Mar 2014 01:59:47 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.176; Received: by mail-vc0-f176.google.com with SMTP id lc6so9095419vcb.7 for ; Wed, 12 Mar 2014 01:59:47 -0700 (PDT) X-Received: by 10.52.251.199 with SMTP id zm7mr21759640vdc.21.1394614787407; Wed, 12 Mar 2014 01:59:47 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp272091vck; Wed, 12 Mar 2014 01:59:46 -0700 (PDT) X-Received: by 10.194.81.164 with SMTP id b4mr40796602wjy.2.1394614786368; Wed, 12 Mar 2014 01:59:46 -0700 (PDT) Received: from casper.infradead.org (casper.infradead.org. [2001:770:15f::2]) by mx.google.com with ESMTPS id lf9si19708062wjc.111.2014.03.12.01.59.45 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 12 Mar 2014 01:59:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org designates 2001:770:15f::2 as permitted sender) client-ip=2001:770:15f::2; Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WNf0c-0000XR-M7; Wed, 12 Mar 2014 08:59:30 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1WNevk-000201-SK; Wed, 12 Mar 2014 08:54:28 +0000 Received: from mx08-00178001.pphosted.com ([91.207.212.93]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1WNevh-0001xq-36 for linux-arm-kernel@lists.infradead.org; Wed, 12 Mar 2014 08:54:25 +0000 Received: from pps.filterd (m0046660.ppops.net [127.0.0.1]) by mx08-00178001.pphosted.com (8.14.5/8.14.5) with SMTP id s2C8pPNr008861; Wed, 12 Mar 2014 09:51:30 +0100 Received: from beta.dmz-eu.st.com (beta.dmz-eu.st.com [164.129.1.35]) by mx08-00178001.pphosted.com with ESMTP id 1jfvgfhh5v-1 (version=TLSv1/SSLv3 cipher=AES256-SHA bits=256 verify=NOT); Wed, 12 Mar 2014 09:51:30 +0100 Received: from zeta.dmz-eu.st.com (zeta.dmz-eu.st.com [164.129.230.9]) by beta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 92B075F; Wed, 12 Mar 2014 08:51:22 +0000 (GMT) Received: from mail7.sgp.st.com (unknown [164.129.223.81]) by zeta.dmz-eu.st.com (STMicroelectronics) with ESMTP id 1BD04B447; Wed, 12 Mar 2014 08:51:22 +0000 (GMT) Received: from lmenx29l.st.com (lmenx29l.lme.st.com [10.201.23.80]) by mail7.sgp.st.com (MOS 4.3.3-GA) with ESMTP id BYV62441 (AUTH lme00137); Wed, 12 Mar 2014 09:50:56 +0100 From: Maxime COQUELIN To: Rob Landley , Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , Russell King , Srinivas Kandagatla , Stuart Menefy , Linus Walleij , Giuseppe Cavallaro , Maxime Coquelin , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, kernel@stlinux.com Subject: [PATCH v4 4/6] pinctrl: st: Use ARRAY_SIZE instead of raw value for number of delays Date: Wed, 12 Mar 2014 09:50:08 +0100 Message-Id: <1394614210-15698-5-git-send-email-maxime.coquelin@st.com> X-Mailer: git-send-email 1.9.0 In-Reply-To: <1394614210-15698-1-git-send-email-maxime.coquelin@st.com> References: <1394614210-15698-1-git-send-email-maxime.coquelin@st.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.11.87, 1.0.14, 0.0.0000 definitions=2014-03-12_03:2014-03-11, 2014-03-12, 1970-01-01 signatures=0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140312_045425_349072_410413F5 X-CRM114-Status: GOOD ( 13.21 ) X-Spam-Score: -1.9 (-) X-Spam-Report: SpamAssassin version 3.3.2 on merlin.infradead.org summary: Content analysis details: (-1.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Cc: lee.jones@linaro.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patch=linaro.org@lists.infradead.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: maxime.coquelin@st.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.176 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 This patch replaces the raw values with ARRAY_SIZE for assigning the ninput_delays and noutput_delays fields of STiH416's st_pctl_data struct. CC: Lee Jones Acked-by: Giuseppe Cavallaro Signed-off-by: Maxime Coquelin Acked-by: Lee Jones --- drivers/pinctrl/pinctrl-st.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/pinctrl-st.c b/drivers/pinctrl/pinctrl-st.c index 39cddaa..e4c4799 100644 --- a/drivers/pinctrl/pinctrl-st.c +++ b/drivers/pinctrl/pinctrl-st.c @@ -384,9 +384,9 @@ static unsigned int stih416_delays[] = {0, 300, 500, 750, 1000, 1250, 1500, static const struct st_pctl_data stih416_data = { .rt_style = st_retime_style_dedicated, .input_delays = stih416_delays, - .ninput_delays = 14, + .ninput_delays = ARRAY_SIZE(stih416_delays), .output_delays = stih416_delays, - .noutput_delays = 14, + .noutput_delays = ARRAY_SIZE(stih416_delays), .alt = 0, .oe = 40, .pu = 50, .od = 60, .rt = 100, };