From patchwork Sat Jun 22 16:55:14 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Axel Lin X-Patchwork-Id: 253419 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id B601C2C041C for ; Sun, 23 Jun 2013 02:55:47 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 32E5A4A13E; Sat, 22 Jun 2013 18:55:46 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Ukt8Bybb3ZM2; Sat, 22 Jun 2013 18:55:46 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id A43CA4A13F; Sat, 22 Jun 2013 18:55:42 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4F8994A13F for ; Sat, 22 Jun 2013 18:55:35 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Z6OqPRNYmV+v for ; Sat, 22 Jun 2013 18:55:29 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-pb0-f41.google.com (mail-pb0-f41.google.com [209.85.160.41]) by theia.denx.de (Postfix) with ESMTPS id 155E54A13E for ; Sat, 22 Jun 2013 18:55:21 +0200 (CEST) Received: by mail-pb0-f41.google.com with SMTP id rp16so9179358pbb.14 for ; Sat, 22 Jun 2013 09:55:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=message-id:subject:from:to:cc:date:content-type:x-mailer :mime-version:content-transfer-encoding:x-gm-message-state; bh=/fkM4x0x1CmlWsf4B3XnywnHyc+3GR359NxPa8TGPcs=; b=Fvr7o2oJRxImkhGkE+ppYE9dXLQHNPlu1/qCyo19civvWakyqg33KyKSP3A8QgvRq0 eFGL6hbX6Zhg6DIMJIwE/CYzGQ8DP6L/6xzjRTy41cwwvd69mb3ruzQcR/OPXTScRBXI qubQ+k3MKTyTtHXnzFuIvK54WnfHNqZqzAcF7KvQCr+pGJYLbhAtrA3Y6dpxNMtREOtu npOJqZVPw0pQy7DPzJlzYv5GPqSyKopBRFEXFVuF5M1RyEAsDPupP8wy5waCYYVjflvj cVQvy3wyvK/q/pKQmZeXHLFJL5GHxmfZrHDz/WUd4pAi1BEIEMhPvdXvcyp6nswfAMmz qygQ== X-Received: by 10.68.223.34 with SMTP id qr2mr9451790pbc.75.1371920120446; Sat, 22 Jun 2013 09:55:20 -0700 (PDT) Received: from [192.168.0.100] (218-173-173-121.dynamic.hinet.net. [218.173.173.121]) by mx.google.com with ESMTPSA id aj3sm2584369pad.8.2013.06.22.09.55.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Sat, 22 Jun 2013 09:55:19 -0700 (PDT) Message-ID: <1371920114.31971.3.camel@phoenix> From: Axel Lin To: Heiko Schocher Date: Sun, 23 Jun 2013 00:55:14 +0800 X-Mailer: Evolution 3.6.4-0ubuntu1 Mime-Version: 1.0 X-Gm-Message-State: ALoCoQmcwASKYRytes+hkhM/M3AzReUpgydGx0JOOvcHA3TPnL2FCKhwH11UT+D9MDX4rq5v4dcw Cc: u-boot@lists.denx.de, Holger Brunck , Marek Vasut Subject: [U-Boot] [PATCH 1/3] hwmon: lm63: Use ARRAY_SIZE at appropriate place X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de Signed-off-by: Axel Lin --- drivers/hwmon/lm63.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/drivers/hwmon/lm63.c b/drivers/hwmon/lm63.c index f3adf64..bb8e644 100644 --- a/drivers/hwmon/lm63.c +++ b/drivers/hwmon/lm63.c @@ -133,8 +133,7 @@ int dtt_init_one(int sensor) /* * Setup PWM Lookup-Table */ - for (i = 0; i < sizeof(pwm_lookup) / sizeof(struct pwm_lookup_entry); - i++) { + for (i = 0; i < ARRAY_SIZE(pwm_lookup); i++) { int address = DTT_PWM_LOOKUP_BASE + 2 * i; val = pwm_lookup[i].temp; if (is_lm64(sensor))