mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-25 07:51:28 +00:00
Change (int)ARRAY_SIZE(...) back into ARRAY_SIZE(...)
This patch does not change any functionality. git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@8012 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
@@ -2754,7 +2754,7 @@ static int dev_user_unjam_dev(struct scst_user_dev *dev)
|
||||
spin_lock_irq(&dev->udev_cmd_threads.cmd_list_lock);
|
||||
|
||||
repeat:
|
||||
for (i = 0; i < (int)ARRAY_SIZE(dev->ucmd_hash); i++) {
|
||||
for (i = 0; i < ARRAY_SIZE(dev->ucmd_hash); i++) {
|
||||
struct list_head *head = &dev->ucmd_hash[i];
|
||||
|
||||
list_for_each_entry(ucmd, head, hash_list_entry) {
|
||||
@@ -3368,7 +3368,7 @@ static int dev_user_register_dev(struct file *file,
|
||||
dev->blocking = 0;
|
||||
} else
|
||||
dev->blocking = 1;
|
||||
for (i = 0; i < (int)ARRAY_SIZE(dev->ucmd_hash); i++)
|
||||
for (i = 0; i < ARRAY_SIZE(dev->ucmd_hash); i++)
|
||||
INIT_LIST_HEAD(&dev->ucmd_hash[i]);
|
||||
|
||||
scst_init_threads(&dev->udev_cmd_threads);
|
||||
@@ -3923,7 +3923,7 @@ static void dev_user_check_lost_ucmds(struct scst_user_dev *dev)
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < (int)ARRAY_SIZE(dev->ucmd_hash); i++) {
|
||||
for (i = 0; i < ARRAY_SIZE(dev->ucmd_hash); i++) {
|
||||
struct list_head *head = &dev->ucmd_hash[i];
|
||||
struct scst_user_cmd *ucmd2, *tmp;
|
||||
|
||||
@@ -4001,7 +4001,7 @@ static ssize_t dev_user_sysfs_commands_show(struct kobject *kobj,
|
||||
udev = dev->dh_priv;
|
||||
|
||||
spin_lock_irqsave(&udev->udev_cmd_threads.cmd_list_lock, flags);
|
||||
for (i = 0; i < (int)ARRAY_SIZE(udev->ucmd_hash); i++) {
|
||||
for (i = 0; i < ARRAY_SIZE(udev->ucmd_hash); i++) {
|
||||
struct list_head *head = &udev->ucmd_hash[i];
|
||||
struct scst_user_cmd *ucmd;
|
||||
|
||||
|
||||
@@ -1669,7 +1669,7 @@ static const struct scst_sdbops scst_scsi_op_table[] = {
|
||||
.get_cdb_info = get_cdb_info_len_10}
|
||||
};
|
||||
|
||||
#define SCST_CDB_TBL_SIZE ((int)ARRAY_SIZE(scst_scsi_op_table))
|
||||
#define SCST_CDB_TBL_SIZE (ARRAY_SIZE(scst_scsi_op_table))
|
||||
|
||||
static void scst_del_tgt_dev(struct scst_tgt_dev *tgt_dev);
|
||||
static void scst_free_tgt_dev(struct scst_tgt_dev *tgt_dev);
|
||||
@@ -4162,7 +4162,7 @@ static void scst_init_order_data(struct scst_order_data *order_data)
|
||||
order_data->curr_sn = (typeof(order_data->curr_sn))(-20);
|
||||
order_data->expected_sn = order_data->curr_sn;
|
||||
order_data->cur_sn_slot = &order_data->sn_slots[0];
|
||||
for (i = 0; i < (int)ARRAY_SIZE(order_data->sn_slots); i++)
|
||||
for (i = 0; i < ARRAY_SIZE(order_data->sn_slots); i++)
|
||||
atomic_set(&order_data->sn_slots[i], 0);
|
||||
spin_lock_init(&order_data->init_done_lock);
|
||||
return;
|
||||
@@ -15337,7 +15337,7 @@ static void __init scst_scsi_op_list_init(void)
|
||||
|
||||
TRACE_ENTRY();
|
||||
|
||||
TRACE_DBG("tblsize=%d", SCST_CDB_TBL_SIZE);
|
||||
TRACE_DBG("tblsize=%zd", SCST_CDB_TBL_SIZE);
|
||||
|
||||
for (i = 0; i < 256; i++)
|
||||
scst_scsi_op_list[i] = SCST_CDB_TBL_SIZE;
|
||||
|
||||
@@ -826,7 +826,7 @@ int scst_get_cmd_counter(void)
|
||||
{
|
||||
int i, res = 0;
|
||||
|
||||
for (i = 0; i < (int)ARRAY_SIZE(scst_percpu_infos); i++)
|
||||
for (i = 0; i < ARRAY_SIZE(scst_percpu_infos); i++)
|
||||
res += atomic_read(&scst_percpu_infos[i].cpu_cmd_count);
|
||||
return res;
|
||||
}
|
||||
@@ -2545,7 +2545,7 @@ static int __init init_scst(void)
|
||||
if (res != 0)
|
||||
goto out_destroy_sgv_pool;
|
||||
|
||||
for (i = 0; i < (int)ARRAY_SIZE(scst_percpu_infos); i++) {
|
||||
for (i = 0; i < ARRAY_SIZE(scst_percpu_infos); i++) {
|
||||
atomic_set(&scst_percpu_infos[i].cpu_cmd_count, 0);
|
||||
spin_lock_init(&scst_percpu_infos[i].tasklet_lock);
|
||||
INIT_LIST_HEAD(&scst_percpu_infos[i].tasklet_cmd_list);
|
||||
|
||||
Reference in New Issue
Block a user