diff options
author | Stefani Seibold <stefani@seibold.net> | 2009-12-21 17:37:28 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-12-22 17:17:56 -0500 |
commit | e64c026dd09b73faf20707711402fc5ed55a8e70 (patch) | |
tree | 4780736e021824f15329a0826eff3cc27d3f9646 /drivers | |
parent | c1e13f25674ed564948ecb7dfe5f83e578892896 (diff) |
kfifo: cleanup namespace
change name of __kfifo_* functions to kfifo_*, because the prefix __kfifo
should be reserved for internal functions only.
Signed-off-by: Stefani Seibold <stefani@seibold.net>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Acked-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: Andi Kleen <ak@linux.intel.com>
Acked-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/char/nozomi.c | 12 | ||||
-rw-r--r-- | drivers/infiniband/hw/cxgb3/cxio_resource.c | 10 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/cmd.c | 4 | ||||
-rw-r--r-- | drivers/net/wireless/libertas/main.c | 8 | ||||
-rw-r--r-- | drivers/platform/x86/sony-laptop.c | 2 | ||||
-rw-r--r-- | drivers/scsi/libiscsi.c | 14 | ||||
-rw-r--r-- | drivers/scsi/libiscsi_tcp.c | 20 | ||||
-rw-r--r-- | drivers/scsi/libsrp.c | 2 | ||||
-rw-r--r-- | drivers/usb/host/fhci.h | 6 | ||||
-rw-r--r-- | drivers/usb/serial/generic.c | 4 |
10 files changed, 41 insertions, 41 deletions
diff --git a/drivers/char/nozomi.c b/drivers/char/nozomi.c index 935b30d80adf..61f5bfe74f38 100644 --- a/drivers/char/nozomi.c +++ b/drivers/char/nozomi.c | |||
@@ -798,7 +798,7 @@ static int send_data(enum port_type index, struct nozomi *dc) | |||
798 | struct tty_struct *tty = tty_port_tty_get(&port->port); | 798 | struct tty_struct *tty = tty_port_tty_get(&port->port); |
799 | 799 | ||
800 | /* Get data from tty and place in buf for now */ | 800 | /* Get data from tty and place in buf for now */ |
801 | size = __kfifo_get(&port->fifo_ul, dc->send_buf, | 801 | size = kfifo_get(&port->fifo_ul, dc->send_buf, |
802 | ul_size < SEND_BUF_MAX ? ul_size : SEND_BUF_MAX); | 802 | ul_size < SEND_BUF_MAX ? ul_size : SEND_BUF_MAX); |
803 | 803 | ||
804 | if (size == 0) { | 804 | if (size == 0) { |
@@ -988,11 +988,11 @@ static int receive_flow_control(struct nozomi *dc) | |||
988 | 988 | ||
989 | } else if (old_ctrl.CTS == 0 && ctrl_dl.CTS == 1) { | 989 | } else if (old_ctrl.CTS == 0 && ctrl_dl.CTS == 1) { |
990 | 990 | ||
991 | if (__kfifo_len(&dc->port[port].fifo_ul)) { | 991 | if (kfifo_len(&dc->port[port].fifo_ul)) { |
992 | DBG1("Enable interrupt (0x%04X) on port: %d", | 992 | DBG1("Enable interrupt (0x%04X) on port: %d", |
993 | enable_ier, port); | 993 | enable_ier, port); |
994 | DBG1("Data in buffer [%d], enable transmit! ", | 994 | DBG1("Data in buffer [%d], enable transmit! ", |
995 | __kfifo_len(&dc->port[port].fifo_ul)); | 995 | kfifo_len(&dc->port[port].fifo_ul)); |
996 | enable_transmit_ul(port, dc); | 996 | enable_transmit_ul(port, dc); |
997 | } else { | 997 | } else { |
998 | DBG1("No data in buffer..."); | 998 | DBG1("No data in buffer..."); |
@@ -1672,7 +1672,7 @@ static int ntty_write(struct tty_struct *tty, const unsigned char *buffer, | |||
1672 | goto exit; | 1672 | goto exit; |
1673 | } | 1673 | } |
1674 | 1674 | ||
1675 | rval = __kfifo_put(&port->fifo_ul, (unsigned char *)buffer, count); | 1675 | rval = kfifo_put(&port->fifo_ul, (unsigned char *)buffer, count); |
1676 | 1676 | ||
1677 | /* notify card */ | 1677 | /* notify card */ |
1678 | if (unlikely(dc == NULL)) { | 1678 | if (unlikely(dc == NULL)) { |
@@ -1720,7 +1720,7 @@ static int ntty_write_room(struct tty_struct *tty) | |||
1720 | if (!port->port.count) | 1720 | if (!port->port.count) |
1721 | goto exit; | 1721 | goto exit; |
1722 | 1722 | ||
1723 | room = port->fifo_ul.size - __kfifo_len(&port->fifo_ul); | 1723 | room = port->fifo_ul.size - kfifo_len(&port->fifo_ul); |
1724 | 1724 | ||
1725 | exit: | 1725 | exit: |
1726 | mutex_unlock(&port->tty_sem); | 1726 | mutex_unlock(&port->tty_sem); |
@@ -1877,7 +1877,7 @@ static s32 ntty_chars_in_buffer(struct tty_struct *tty) | |||
1877 | goto exit_in_buffer; | 1877 | goto exit_in_buffer; |
1878 | } | 1878 | } |
1879 | 1879 | ||
1880 | rval = __kfifo_len(&port->fifo_ul); | 1880 | rval = kfifo_len(&port->fifo_ul); |
1881 | 1881 | ||
1882 | exit_in_buffer: | 1882 | exit_in_buffer: |
1883 | return rval; | 1883 | return rval; |
diff --git a/drivers/infiniband/hw/cxgb3/cxio_resource.c b/drivers/infiniband/hw/cxgb3/cxio_resource.c index 98f24e6d906e..d7d18fb02c93 100644 --- a/drivers/infiniband/hw/cxgb3/cxio_resource.c +++ b/drivers/infiniband/hw/cxgb3/cxio_resource.c | |||
@@ -59,7 +59,7 @@ static int __cxio_init_resource_fifo(struct kfifo *fifo, | |||
59 | return -ENOMEM; | 59 | return -ENOMEM; |
60 | 60 | ||
61 | for (i = 0; i < skip_low + skip_high; i++) | 61 | for (i = 0; i < skip_low + skip_high; i++) |
62 | __kfifo_put(fifo, (unsigned char *) &entry, sizeof(u32)); | 62 | kfifo_put(fifo, (unsigned char *) &entry, sizeof(u32)); |
63 | if (random) { | 63 | if (random) { |
64 | j = 0; | 64 | j = 0; |
65 | random_bytes = random32(); | 65 | random_bytes = random32(); |
@@ -71,19 +71,19 @@ static int __cxio_init_resource_fifo(struct kfifo *fifo, | |||
71 | random_bytes = random32(); | 71 | random_bytes = random32(); |
72 | } | 72 | } |
73 | idx = (random_bytes >> (j * 2)) & 0xF; | 73 | idx = (random_bytes >> (j * 2)) & 0xF; |
74 | __kfifo_put(fifo, | 74 | kfifo_put(fifo, |
75 | (unsigned char *) &rarray[idx], | 75 | (unsigned char *) &rarray[idx], |
76 | sizeof(u32)); | 76 | sizeof(u32)); |
77 | rarray[idx] = i; | 77 | rarray[idx] = i; |
78 | j++; | 78 | j++; |
79 | } | 79 | } |
80 | for (i = 0; i < RANDOM_SIZE; i++) | 80 | for (i = 0; i < RANDOM_SIZE; i++) |
81 | __kfifo_put(fifo, | 81 | kfifo_put(fifo, |
82 | (unsigned char *) &rarray[i], | 82 | (unsigned char *) &rarray[i], |
83 | sizeof(u32)); | 83 | sizeof(u32)); |
84 | } else | 84 | } else |
85 | for (i = skip_low; i < nr - skip_high; i++) | 85 | for (i = skip_low; i < nr - skip_high; i++) |
86 | __kfifo_put(fifo, (unsigned char *) &i, sizeof(u32)); | 86 | kfifo_put(fifo, (unsigned char *) &i, sizeof(u32)); |
87 | 87 | ||
88 | for (i = 0; i < skip_low + skip_high; i++) | 88 | for (i = 0; i < skip_low + skip_high; i++) |
89 | kfifo_get_locked(fifo, (unsigned char *) &entry, | 89 | kfifo_get_locked(fifo, (unsigned char *) &entry, |
@@ -119,7 +119,7 @@ static int cxio_init_qpid_fifo(struct cxio_rdev *rdev_p) | |||
119 | 119 | ||
120 | for (i = 16; i < T3_MAX_NUM_QP; i++) | 120 | for (i = 16; i < T3_MAX_NUM_QP; i++) |
121 | if (!(i & rdev_p->qpmask)) | 121 | if (!(i & rdev_p->qpmask)) |
122 | __kfifo_put(&rdev_p->rscp->qpid_fifo, | 122 | kfifo_put(&rdev_p->rscp->qpid_fifo, |
123 | (unsigned char *) &i, sizeof(u32)); | 123 | (unsigned char *) &i, sizeof(u32)); |
124 | return 0; | 124 | return 0; |
125 | } | 125 | } |
diff --git a/drivers/net/wireless/libertas/cmd.c b/drivers/net/wireless/libertas/cmd.c index ffed17f4f506..42611bea76a3 100644 --- a/drivers/net/wireless/libertas/cmd.c +++ b/drivers/net/wireless/libertas/cmd.c | |||
@@ -1365,7 +1365,7 @@ static void lbs_send_confirmsleep(struct lbs_private *priv) | |||
1365 | priv->dnld_sent = DNLD_RES_RECEIVED; | 1365 | priv->dnld_sent = DNLD_RES_RECEIVED; |
1366 | 1366 | ||
1367 | /* If nothing to do, go back to sleep (?) */ | 1367 | /* If nothing to do, go back to sleep (?) */ |
1368 | if (!__kfifo_len(&priv->event_fifo) && !priv->resp_len[priv->resp_idx]) | 1368 | if (!kfifo_len(&priv->event_fifo) && !priv->resp_len[priv->resp_idx]) |
1369 | priv->psstate = PS_STATE_SLEEP; | 1369 | priv->psstate = PS_STATE_SLEEP; |
1370 | 1370 | ||
1371 | spin_unlock_irqrestore(&priv->driver_lock, flags); | 1371 | spin_unlock_irqrestore(&priv->driver_lock, flags); |
@@ -1439,7 +1439,7 @@ void lbs_ps_confirm_sleep(struct lbs_private *priv) | |||
1439 | } | 1439 | } |
1440 | 1440 | ||
1441 | /* Pending events or command responses? */ | 1441 | /* Pending events or command responses? */ |
1442 | if (__kfifo_len(&priv->event_fifo) || priv->resp_len[priv->resp_idx]) { | 1442 | if (kfifo_len(&priv->event_fifo) || priv->resp_len[priv->resp_idx]) { |
1443 | allowed = 0; | 1443 | allowed = 0; |
1444 | lbs_deb_host("pending events or command responses\n"); | 1444 | lbs_deb_host("pending events or command responses\n"); |
1445 | } | 1445 | } |
diff --git a/drivers/net/wireless/libertas/main.c b/drivers/net/wireless/libertas/main.c index 2cc7ecd8d123..0622104f0a03 100644 --- a/drivers/net/wireless/libertas/main.c +++ b/drivers/net/wireless/libertas/main.c | |||
@@ -459,7 +459,7 @@ static int lbs_thread(void *data) | |||
459 | else if (!list_empty(&priv->cmdpendingq) && | 459 | else if (!list_empty(&priv->cmdpendingq) && |
460 | !(priv->wakeup_dev_required)) | 460 | !(priv->wakeup_dev_required)) |
461 | shouldsleep = 0; /* We have a command to send */ | 461 | shouldsleep = 0; /* We have a command to send */ |
462 | else if (__kfifo_len(&priv->event_fifo)) | 462 | else if (kfifo_len(&priv->event_fifo)) |
463 | shouldsleep = 0; /* We have an event to process */ | 463 | shouldsleep = 0; /* We have an event to process */ |
464 | else | 464 | else |
465 | shouldsleep = 1; /* No command */ | 465 | shouldsleep = 1; /* No command */ |
@@ -511,9 +511,9 @@ static int lbs_thread(void *data) | |||
511 | 511 | ||
512 | /* Process hardware events, e.g. card removed, link lost */ | 512 | /* Process hardware events, e.g. card removed, link lost */ |
513 | spin_lock_irq(&priv->driver_lock); | 513 | spin_lock_irq(&priv->driver_lock); |
514 | while (__kfifo_len(&priv->event_fifo)) { | 514 | while (kfifo_len(&priv->event_fifo)) { |
515 | u32 event; | 515 | u32 event; |
516 | __kfifo_get(&priv->event_fifo, (unsigned char *) &event, | 516 | kfifo_get(&priv->event_fifo, (unsigned char *) &event, |
517 | sizeof(event)); | 517 | sizeof(event)); |
518 | spin_unlock_irq(&priv->driver_lock); | 518 | spin_unlock_irq(&priv->driver_lock); |
519 | lbs_process_event(priv, event); | 519 | lbs_process_event(priv, event); |
@@ -1175,7 +1175,7 @@ void lbs_queue_event(struct lbs_private *priv, u32 event) | |||
1175 | if (priv->psstate == PS_STATE_SLEEP) | 1175 | if (priv->psstate == PS_STATE_SLEEP) |
1176 | priv->psstate = PS_STATE_AWAKE; | 1176 | priv->psstate = PS_STATE_AWAKE; |
1177 | 1177 | ||
1178 | __kfifo_put(&priv->event_fifo, (unsigned char *) &event, sizeof(u32)); | 1178 | kfifo_put(&priv->event_fifo, (unsigned char *) &event, sizeof(u32)); |
1179 | 1179 | ||
1180 | wake_up_interruptible(&priv->waitq); | 1180 | wake_up_interruptible(&priv->waitq); |
1181 | 1181 | ||
diff --git a/drivers/platform/x86/sony-laptop.c b/drivers/platform/x86/sony-laptop.c index 1538a0a3c0af..36e5dc6fc953 100644 --- a/drivers/platform/x86/sony-laptop.c +++ b/drivers/platform/x86/sony-laptop.c | |||
@@ -2107,7 +2107,7 @@ static int sonypi_misc_open(struct inode *inode, struct file *file) | |||
2107 | spin_lock_irqsave(&sonypi_compat.fifo_lock, flags); | 2107 | spin_lock_irqsave(&sonypi_compat.fifo_lock, flags); |
2108 | 2108 | ||
2109 | if (atomic_inc_return(&sonypi_compat.open_count) == 1) | 2109 | if (atomic_inc_return(&sonypi_compat.open_count) == 1) |
2110 | __kfifo_reset(&sonypi_compat.fifo); | 2110 | kfifo_reset(&sonypi_compat.fifo); |
2111 | 2111 | ||
2112 | spin_unlock_irqrestore(&sonypi_compat.fifo_lock, flags); | 2112 | spin_unlock_irqrestore(&sonypi_compat.fifo_lock, flags); |
2113 | 2113 | ||
diff --git a/drivers/scsi/libiscsi.c b/drivers/scsi/libiscsi.c index 1bccbc1e588e..5f0c46f43ee1 100644 --- a/drivers/scsi/libiscsi.c +++ b/drivers/scsi/libiscsi.c | |||
@@ -517,7 +517,7 @@ static void iscsi_free_task(struct iscsi_task *task) | |||
517 | if (conn->login_task == task) | 517 | if (conn->login_task == task) |
518 | return; | 518 | return; |
519 | 519 | ||
520 | __kfifo_put(&session->cmdpool.queue, (void*)&task, sizeof(void*)); | 520 | kfifo_put(&session->cmdpool.queue, (void*)&task, sizeof(void*)); |
521 | 521 | ||
522 | if (sc) { | 522 | if (sc) { |
523 | task->sc = NULL; | 523 | task->sc = NULL; |
@@ -737,7 +737,7 @@ __iscsi_conn_send_pdu(struct iscsi_conn *conn, struct iscsi_hdr *hdr, | |||
737 | BUG_ON(conn->c_stage == ISCSI_CONN_INITIAL_STAGE); | 737 | BUG_ON(conn->c_stage == ISCSI_CONN_INITIAL_STAGE); |
738 | BUG_ON(conn->c_stage == ISCSI_CONN_STOPPED); | 738 | BUG_ON(conn->c_stage == ISCSI_CONN_STOPPED); |
739 | 739 | ||
740 | if (!__kfifo_get(&session->cmdpool.queue, | 740 | if (!kfifo_get(&session->cmdpool.queue, |
741 | (void*)&task, sizeof(void*))) | 741 | (void*)&task, sizeof(void*))) |
742 | return NULL; | 742 | return NULL; |
743 | } | 743 | } |
@@ -1567,7 +1567,7 @@ static inline struct iscsi_task *iscsi_alloc_task(struct iscsi_conn *conn, | |||
1567 | { | 1567 | { |
1568 | struct iscsi_task *task; | 1568 | struct iscsi_task *task; |
1569 | 1569 | ||
1570 | if (!__kfifo_get(&conn->session->cmdpool.queue, | 1570 | if (!kfifo_get(&conn->session->cmdpool.queue, |
1571 | (void *) &task, sizeof(void *))) | 1571 | (void *) &task, sizeof(void *))) |
1572 | return NULL; | 1572 | return NULL; |
1573 | 1573 | ||
@@ -2469,7 +2469,7 @@ iscsi_pool_init(struct iscsi_pool *q, int max, void ***items, int item_size) | |||
2469 | q->max = i; | 2469 | q->max = i; |
2470 | goto enomem; | 2470 | goto enomem; |
2471 | } | 2471 | } |
2472 | __kfifo_put(&q->queue, (void*)&q->pool[i], sizeof(void*)); | 2472 | kfifo_put(&q->queue, (void*)&q->pool[i], sizeof(void*)); |
2473 | } | 2473 | } |
2474 | 2474 | ||
2475 | if (items) { | 2475 | if (items) { |
@@ -2819,7 +2819,7 @@ iscsi_conn_setup(struct iscsi_cls_session *cls_session, int dd_size, | |||
2819 | 2819 | ||
2820 | /* allocate login_task used for the login/text sequences */ | 2820 | /* allocate login_task used for the login/text sequences */ |
2821 | spin_lock_bh(&session->lock); | 2821 | spin_lock_bh(&session->lock); |
2822 | if (!__kfifo_get(&session->cmdpool.queue, | 2822 | if (!kfifo_get(&session->cmdpool.queue, |
2823 | (void*)&conn->login_task, | 2823 | (void*)&conn->login_task, |
2824 | sizeof(void*))) { | 2824 | sizeof(void*))) { |
2825 | spin_unlock_bh(&session->lock); | 2825 | spin_unlock_bh(&session->lock); |
@@ -2839,7 +2839,7 @@ iscsi_conn_setup(struct iscsi_cls_session *cls_session, int dd_size, | |||
2839 | return cls_conn; | 2839 | return cls_conn; |
2840 | 2840 | ||
2841 | login_task_data_alloc_fail: | 2841 | login_task_data_alloc_fail: |
2842 | __kfifo_put(&session->cmdpool.queue, (void*)&conn->login_task, | 2842 | kfifo_put(&session->cmdpool.queue, (void*)&conn->login_task, |
2843 | sizeof(void*)); | 2843 | sizeof(void*)); |
2844 | login_task_alloc_fail: | 2844 | login_task_alloc_fail: |
2845 | iscsi_destroy_conn(cls_conn); | 2845 | iscsi_destroy_conn(cls_conn); |
@@ -2902,7 +2902,7 @@ void iscsi_conn_teardown(struct iscsi_cls_conn *cls_conn) | |||
2902 | free_pages((unsigned long) conn->data, | 2902 | free_pages((unsigned long) conn->data, |
2903 | get_order(ISCSI_DEF_MAX_RECV_SEG_LEN)); | 2903 | get_order(ISCSI_DEF_MAX_RECV_SEG_LEN)); |
2904 | kfree(conn->persistent_address); | 2904 | kfree(conn->persistent_address); |
2905 | __kfifo_put(&session->cmdpool.queue, (void*)&conn->login_task, | 2905 | kfifo_put(&session->cmdpool.queue, (void*)&conn->login_task, |
2906 | sizeof(void*)); | 2906 | sizeof(void*)); |
2907 | if (session->leadconn == conn) | 2907 | if (session->leadconn == conn) |
2908 | session->leadconn = NULL; | 2908 | session->leadconn = NULL; |
diff --git a/drivers/scsi/libiscsi_tcp.c b/drivers/scsi/libiscsi_tcp.c index 41643c860d26..c0be926637b1 100644 --- a/drivers/scsi/libiscsi_tcp.c +++ b/drivers/scsi/libiscsi_tcp.c | |||
@@ -445,15 +445,15 @@ void iscsi_tcp_cleanup_task(struct iscsi_task *task) | |||
445 | return; | 445 | return; |
446 | 446 | ||
447 | /* flush task's r2t queues */ | 447 | /* flush task's r2t queues */ |
448 | while (__kfifo_get(&tcp_task->r2tqueue, (void*)&r2t, sizeof(void*))) { | 448 | while (kfifo_get(&tcp_task->r2tqueue, (void*)&r2t, sizeof(void*))) { |
449 | __kfifo_put(&tcp_task->r2tpool.queue, (void*)&r2t, | 449 | kfifo_put(&tcp_task->r2tpool.queue, (void*)&r2t, |
450 | sizeof(void*)); | 450 | sizeof(void*)); |
451 | ISCSI_DBG_TCP(task->conn, "pending r2t dropped\n"); | 451 | ISCSI_DBG_TCP(task->conn, "pending r2t dropped\n"); |
452 | } | 452 | } |
453 | 453 | ||
454 | r2t = tcp_task->r2t; | 454 | r2t = tcp_task->r2t; |
455 | if (r2t != NULL) { | 455 | if (r2t != NULL) { |
456 | __kfifo_put(&tcp_task->r2tpool.queue, (void*)&r2t, | 456 | kfifo_put(&tcp_task->r2tpool.queue, (void*)&r2t, |
457 | sizeof(void*)); | 457 | sizeof(void*)); |
458 | tcp_task->r2t = NULL; | 458 | tcp_task->r2t = NULL; |
459 | } | 459 | } |
@@ -541,7 +541,7 @@ static int iscsi_tcp_r2t_rsp(struct iscsi_conn *conn, struct iscsi_task *task) | |||
541 | return 0; | 541 | return 0; |
542 | } | 542 | } |
543 | 543 | ||
544 | rc = __kfifo_get(&tcp_task->r2tpool.queue, (void*)&r2t, sizeof(void*)); | 544 | rc = kfifo_get(&tcp_task->r2tpool.queue, (void*)&r2t, sizeof(void*)); |
545 | if (!rc) { | 545 | if (!rc) { |
546 | iscsi_conn_printk(KERN_ERR, conn, "Could not allocate R2T. " | 546 | iscsi_conn_printk(KERN_ERR, conn, "Could not allocate R2T. " |
547 | "Target has sent more R2Ts than it " | 547 | "Target has sent more R2Ts than it " |
@@ -554,7 +554,7 @@ static int iscsi_tcp_r2t_rsp(struct iscsi_conn *conn, struct iscsi_task *task) | |||
554 | if (r2t->data_length == 0) { | 554 | if (r2t->data_length == 0) { |
555 | iscsi_conn_printk(KERN_ERR, conn, | 555 | iscsi_conn_printk(KERN_ERR, conn, |
556 | "invalid R2T with zero data len\n"); | 556 | "invalid R2T with zero data len\n"); |
557 | __kfifo_put(&tcp_task->r2tpool.queue, (void*)&r2t, | 557 | kfifo_put(&tcp_task->r2tpool.queue, (void*)&r2t, |
558 | sizeof(void*)); | 558 | sizeof(void*)); |
559 | return ISCSI_ERR_DATALEN; | 559 | return ISCSI_ERR_DATALEN; |
560 | } | 560 | } |
@@ -570,7 +570,7 @@ static int iscsi_tcp_r2t_rsp(struct iscsi_conn *conn, struct iscsi_task *task) | |||
570 | "invalid R2T with data len %u at offset %u " | 570 | "invalid R2T with data len %u at offset %u " |
571 | "and total length %d\n", r2t->data_length, | 571 | "and total length %d\n", r2t->data_length, |
572 | r2t->data_offset, scsi_out(task->sc)->length); | 572 | r2t->data_offset, scsi_out(task->sc)->length); |
573 | __kfifo_put(&tcp_task->r2tpool.queue, (void*)&r2t, | 573 | kfifo_put(&tcp_task->r2tpool.queue, (void*)&r2t, |
574 | sizeof(void*)); | 574 | sizeof(void*)); |
575 | return ISCSI_ERR_DATALEN; | 575 | return ISCSI_ERR_DATALEN; |
576 | } | 576 | } |
@@ -580,7 +580,7 @@ static int iscsi_tcp_r2t_rsp(struct iscsi_conn *conn, struct iscsi_task *task) | |||
580 | r2t->sent = 0; | 580 | r2t->sent = 0; |
581 | 581 | ||
582 | tcp_task->exp_datasn = r2tsn + 1; | 582 | tcp_task->exp_datasn = r2tsn + 1; |
583 | __kfifo_put(&tcp_task->r2tqueue, (void*)&r2t, sizeof(void*)); | 583 | kfifo_put(&tcp_task->r2tqueue, (void*)&r2t, sizeof(void*)); |
584 | conn->r2t_pdus_cnt++; | 584 | conn->r2t_pdus_cnt++; |
585 | 585 | ||
586 | iscsi_requeue_task(task); | 586 | iscsi_requeue_task(task); |
@@ -951,7 +951,7 @@ int iscsi_tcp_task_init(struct iscsi_task *task) | |||
951 | return conn->session->tt->init_pdu(task, 0, task->data_count); | 951 | return conn->session->tt->init_pdu(task, 0, task->data_count); |
952 | } | 952 | } |
953 | 953 | ||
954 | BUG_ON(__kfifo_len(&tcp_task->r2tqueue)); | 954 | BUG_ON(kfifo_len(&tcp_task->r2tqueue)); |
955 | tcp_task->exp_datasn = 0; | 955 | tcp_task->exp_datasn = 0; |
956 | 956 | ||
957 | /* Prepare PDU, optionally w/ immediate data */ | 957 | /* Prepare PDU, optionally w/ immediate data */ |
@@ -982,7 +982,7 @@ static struct iscsi_r2t_info *iscsi_tcp_get_curr_r2t(struct iscsi_task *task) | |||
982 | if (r2t->data_length <= r2t->sent) { | 982 | if (r2t->data_length <= r2t->sent) { |
983 | ISCSI_DBG_TCP(task->conn, | 983 | ISCSI_DBG_TCP(task->conn, |
984 | " done with r2t %p\n", r2t); | 984 | " done with r2t %p\n", r2t); |
985 | __kfifo_put(&tcp_task->r2tpool.queue, | 985 | kfifo_put(&tcp_task->r2tpool.queue, |
986 | (void *)&tcp_task->r2t, | 986 | (void *)&tcp_task->r2t, |
987 | sizeof(void *)); | 987 | sizeof(void *)); |
988 | tcp_task->r2t = r2t = NULL; | 988 | tcp_task->r2t = r2t = NULL; |
@@ -990,7 +990,7 @@ static struct iscsi_r2t_info *iscsi_tcp_get_curr_r2t(struct iscsi_task *task) | |||
990 | } | 990 | } |
991 | 991 | ||
992 | if (r2t == NULL) { | 992 | if (r2t == NULL) { |
993 | __kfifo_get(&tcp_task->r2tqueue, | 993 | kfifo_get(&tcp_task->r2tqueue, |
994 | (void *)&tcp_task->r2t, sizeof(void *)); | 994 | (void *)&tcp_task->r2t, sizeof(void *)); |
995 | r2t = tcp_task->r2t; | 995 | r2t = tcp_task->r2t; |
996 | } | 996 | } |
diff --git a/drivers/scsi/libsrp.c b/drivers/scsi/libsrp.c index db1b41c55fd3..975e448cfcb9 100644 --- a/drivers/scsi/libsrp.c +++ b/drivers/scsi/libsrp.c | |||
@@ -61,7 +61,7 @@ static int srp_iu_pool_alloc(struct srp_queue *q, size_t max, | |||
61 | kfifo_init(&q->queue, (void *) q->pool, max * sizeof(void *)); | 61 | kfifo_init(&q->queue, (void *) q->pool, max * sizeof(void *)); |
62 | 62 | ||
63 | for (i = 0, iue = q->items; i < max; i++) { | 63 | for (i = 0, iue = q->items; i < max; i++) { |
64 | __kfifo_put(&q->queue, (void *) &iue, sizeof(void *)); | 64 | kfifo_put(&q->queue, (void *) &iue, sizeof(void *)); |
65 | iue->sbuf = ring[i]; | 65 | iue->sbuf = ring[i]; |
66 | iue++; | 66 | iue++; |
67 | } | 67 | } |
diff --git a/drivers/usb/host/fhci.h b/drivers/usb/host/fhci.h index a76da201183b..96aa787f208f 100644 --- a/drivers/usb/host/fhci.h +++ b/drivers/usb/host/fhci.h | |||
@@ -505,19 +505,19 @@ static inline void cq_delete(struct kfifo *kfifo) | |||
505 | 505 | ||
506 | static inline unsigned int cq_howmany(struct kfifo *kfifo) | 506 | static inline unsigned int cq_howmany(struct kfifo *kfifo) |
507 | { | 507 | { |
508 | return __kfifo_len(kfifo) / sizeof(void *); | 508 | return kfifo_len(kfifo) / sizeof(void *); |
509 | } | 509 | } |
510 | 510 | ||
511 | static inline int cq_put(struct kfifo *kfifo, void *p) | 511 | static inline int cq_put(struct kfifo *kfifo, void *p) |
512 | { | 512 | { |
513 | return __kfifo_put(kfifo, (void *)&p, sizeof(p)); | 513 | return kfifo_put(kfifo, (void *)&p, sizeof(p)); |
514 | } | 514 | } |
515 | 515 | ||
516 | static inline void *cq_get(struct kfifo *kfifo) | 516 | static inline void *cq_get(struct kfifo *kfifo) |
517 | { | 517 | { |
518 | void *p = NULL; | 518 | void *p = NULL; |
519 | 519 | ||
520 | __kfifo_get(kfifo, (void *)&p, sizeof(p)); | 520 | kfifo_get(kfifo, (void *)&p, sizeof(p)); |
521 | return p; | 521 | return p; |
522 | } | 522 | } |
523 | 523 | ||
diff --git a/drivers/usb/serial/generic.c b/drivers/usb/serial/generic.c index 61eef18218be..d0a2e464cacd 100644 --- a/drivers/usb/serial/generic.c +++ b/drivers/usb/serial/generic.c | |||
@@ -276,7 +276,7 @@ static int usb_serial_generic_write_start(struct usb_serial_port *port) | |||
276 | if (port->write_urb_busy) | 276 | if (port->write_urb_busy) |
277 | start_io = false; | 277 | start_io = false; |
278 | else { | 278 | else { |
279 | start_io = (__kfifo_len(port->write_fifo) != 0); | 279 | start_io = (kfifo_len(port->write_fifo) != 0); |
280 | port->write_urb_busy = start_io; | 280 | port->write_urb_busy = start_io; |
281 | } | 281 | } |
282 | spin_unlock_irqrestore(&port->lock, flags); | 282 | spin_unlock_irqrestore(&port->lock, flags); |
@@ -370,7 +370,7 @@ int usb_serial_generic_write_room(struct tty_struct *tty) | |||
370 | (serial->type->max_in_flight_urbs - | 370 | (serial->type->max_in_flight_urbs - |
371 | port->urbs_in_flight); | 371 | port->urbs_in_flight); |
372 | } else if (serial->num_bulk_out) | 372 | } else if (serial->num_bulk_out) |
373 | room = port->write_fifo->size - __kfifo_len(port->write_fifo); | 373 | room = port->write_fifo->size - kfifo_len(port->write_fifo); |
374 | spin_unlock_irqrestore(&port->lock, flags); | 374 | spin_unlock_irqrestore(&port->lock, flags); |
375 | 375 | ||
376 | dbg("%s - returns %d", __func__, room); | 376 | dbg("%s - returns %d", __func__, room); |