* [U-Boot] [PATCH 1/3] hwmon: lm63: Use ARRAY_SIZE at appropriate place
@ 2013-06-22 16:55 Axel Lin
2013-06-22 16:56 ` [U-Boot] [PATCH 2/3] mtd: cfi_flash: Use ARRAY_SIZE at appropriate places Axel Lin
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Axel Lin @ 2013-06-22 16:55 UTC (permalink / raw)
To: u-boot
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
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))
--
1.8.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 2/3] mtd: cfi_flash: Use ARRAY_SIZE at appropriate places
2013-06-22 16:55 [U-Boot] [PATCH 1/3] hwmon: lm63: Use ARRAY_SIZE at appropriate place Axel Lin
@ 2013-06-22 16:56 ` Axel Lin
2013-06-22 16:57 ` [U-Boot] [PATCH 3/3] usb: musb: " Axel Lin
2013-06-26 20:25 ` [U-Boot] [U-Boot, 1/3] hwmon: lm63: Use ARRAY_SIZE at appropriate place Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Axel Lin @ 2013-06-22 16:56 UTC (permalink / raw)
To: u-boot
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/mtd/cfi_flash.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/drivers/mtd/cfi_flash.c b/drivers/mtd/cfi_flash.c
index 25f8752..a13b0b8 100644
--- a/drivers/mtd/cfi_flash.c
+++ b/drivers/mtd/cfi_flash.c
@@ -1797,7 +1797,7 @@ static int flash_detect_legacy(phys_addr_t base, int banknum)
};
int i;
- for (i = 0; i < sizeof(modes) / sizeof(modes[0]); i++) {
+ for (i = 0; i < ARRAY_SIZE(modes); i++) {
info->vendor = modes[i];
info->start[0] =
(ulong)map_physmem(base,
@@ -1883,8 +1883,7 @@ static int __flash_detect_cfi (flash_info_t * info, struct cfi_qry *qry)
/* Issue FLASH reset command */
flash_cmd_reset(info);
- for (cfi_offset=0;
- cfi_offset < sizeof(flash_offset_cfi) / sizeof(uint);
+ for (cfi_offset = 0; cfi_offset < ARRAY_SIZE(flash_offset_cfi);
cfi_offset++) {
flash_write_cmd (info, 0, flash_offset_cfi[cfi_offset],
FLASH_CMD_CFI);
@@ -2336,7 +2335,7 @@ void flash_protect_default(void)
#endif
#if defined(CONFIG_SYS_FLASH_AUTOPROTECT_LIST)
- for (i = 0; i < (sizeof(apl) / sizeof(struct apl_s)); i++) {
+ for (i = 0; i < ARRAY_SIZE(apl); i++) {
debug("autoprotecting from %08lx to %08lx\n",
apl[i].start, apl[i].start + apl[i].size - 1);
flash_protect(FLAG_PROTECT_SET,
--
1.8.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [PATCH 3/3] usb: musb: Use ARRAY_SIZE at appropriate places
2013-06-22 16:55 [U-Boot] [PATCH 1/3] hwmon: lm63: Use ARRAY_SIZE at appropriate place Axel Lin
2013-06-22 16:56 ` [U-Boot] [PATCH 2/3] mtd: cfi_flash: Use ARRAY_SIZE at appropriate places Axel Lin
@ 2013-06-22 16:57 ` Axel Lin
2013-06-26 20:25 ` [U-Boot] [U-Boot, 1/3] hwmon: lm63: Use ARRAY_SIZE at appropriate place Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Axel Lin @ 2013-06-22 16:57 UTC (permalink / raw)
To: u-boot
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/usb/musb/musb_hcd.c | 3 +--
drivers/usb/musb/musb_udc.c | 3 +--
2 files changed, 2 insertions(+), 4 deletions(-)
diff --git a/drivers/usb/musb/musb_hcd.c b/drivers/usb/musb/musb_hcd.c
index 60e03a4..7bb91e5 100644
--- a/drivers/usb/musb/musb_hcd.c
+++ b/drivers/usb/musb/musb_hcd.c
@@ -1105,8 +1105,7 @@ int usb_lowlevel_init(int index, void **controller)
/* Configure all the endpoint FIFO's and start usb controller */
musbr = musb_cfg.regs;
- musb_configure_ep(&epinfo[0],
- sizeof(epinfo) / sizeof(struct musb_epinfo));
+ musb_configure_ep(&epinfo[0], ARRAY_SIZE(epinfo));
musb_start();
/*
diff --git a/drivers/usb/musb/musb_udc.c b/drivers/usb/musb/musb_udc.c
index e0b4217..e8a2ce0 100644
--- a/drivers/usb/musb/musb_udc.c
+++ b/drivers/usb/musb/musb_udc.c
@@ -894,8 +894,7 @@ void udc_setup_ep(struct usb_device_instance *device, unsigned int id,
epinfo[id * 2].epsize = endpoint->rcv_packetSize;
}
- musb_configure_ep(&epinfo[0],
- sizeof(epinfo) / sizeof(struct musb_epinfo));
+ musb_configure_ep(&epinfo[0], ARRAY_SIZE(epinfo));
} else {
if (debug_level > 0)
serial_printf("ERROR : %s endpoint request %d "
--
1.8.1.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [U-Boot] [U-Boot, 1/3] hwmon: lm63: Use ARRAY_SIZE at appropriate place
2013-06-22 16:55 [U-Boot] [PATCH 1/3] hwmon: lm63: Use ARRAY_SIZE at appropriate place Axel Lin
2013-06-22 16:56 ` [U-Boot] [PATCH 2/3] mtd: cfi_flash: Use ARRAY_SIZE at appropriate places Axel Lin
2013-06-22 16:57 ` [U-Boot] [PATCH 3/3] usb: musb: " Axel Lin
@ 2013-06-26 20:25 ` Tom Rini
2 siblings, 0 replies; 4+ messages in thread
From: Tom Rini @ 2013-06-26 20:25 UTC (permalink / raw)
To: u-boot
On Sun, Jun 23, 2013 at 12:55:14AM +0800, Axel Lin wrote:
> Signed-off-by: Axel Lin <axel.lin@ingics.com>
>
> ---
> drivers/hwmon/lm63.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
This, along with the rest of the series is now applied to u-boot/master,
thanks!
--
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20130626/83121c8f/attachment.pgp>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2013-06-26 20:25 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-06-22 16:55 [U-Boot] [PATCH 1/3] hwmon: lm63: Use ARRAY_SIZE at appropriate place Axel Lin
2013-06-22 16:56 ` [U-Boot] [PATCH 2/3] mtd: cfi_flash: Use ARRAY_SIZE at appropriate places Axel Lin
2013-06-22 16:57 ` [U-Boot] [PATCH 3/3] usb: musb: " Axel Lin
2013-06-26 20:25 ` [U-Boot] [U-Boot, 1/3] hwmon: lm63: Use ARRAY_SIZE at appropriate place Tom Rini
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.