Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit e64c026d authored by Stefani Seibold's avatar Stefani Seibold Committed by Linus Torvalds
Browse files

kfifo: cleanup namespace



change name of __kfifo_* functions to kfifo_*, because the prefix __kfifo
should be reserved for internal functions only.

Signed-off-by: default avatarStefani Seibold <stefani@seibold.net>
Acked-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
Acked-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
Acked-by: default avatarAndi Kleen <ak@linux.intel.com>
Acked-by: default avatarArnd Bergmann <arnd@arndb.de>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent c1e13f25
Loading
Loading
Loading
Loading
+6 −6
Original line number Diff line number Diff line
@@ -798,7 +798,7 @@ static int send_data(enum port_type index, struct nozomi *dc)
	struct tty_struct *tty = tty_port_tty_get(&port->port);

	/* Get data from tty and place in buf for now */
	size = __kfifo_get(&port->fifo_ul, dc->send_buf,
	size = kfifo_get(&port->fifo_ul, dc->send_buf,
			   ul_size < SEND_BUF_MAX ? ul_size : SEND_BUF_MAX);

	if (size == 0) {
@@ -988,11 +988,11 @@ static int receive_flow_control(struct nozomi *dc)

	} else if (old_ctrl.CTS == 0 && ctrl_dl.CTS == 1) {

		if (__kfifo_len(&dc->port[port].fifo_ul)) {
		if (kfifo_len(&dc->port[port].fifo_ul)) {
			DBG1("Enable interrupt (0x%04X) on port: %d",
				enable_ier, port);
			DBG1("Data in buffer [%d], enable transmit! ",
				__kfifo_len(&dc->port[port].fifo_ul));
				kfifo_len(&dc->port[port].fifo_ul));
			enable_transmit_ul(port, dc);
		} else {
			DBG1("No data in buffer...");
@@ -1672,7 +1672,7 @@ static int ntty_write(struct tty_struct *tty, const unsigned char *buffer,
		goto exit;
	}

	rval = __kfifo_put(&port->fifo_ul, (unsigned char *)buffer, count);
	rval = kfifo_put(&port->fifo_ul, (unsigned char *)buffer, count);

	/* notify card */
	if (unlikely(dc == NULL)) {
@@ -1720,7 +1720,7 @@ static int ntty_write_room(struct tty_struct *tty)
	if (!port->port.count)
		goto exit;

	room = port->fifo_ul.size - __kfifo_len(&port->fifo_ul);
	room = port->fifo_ul.size - kfifo_len(&port->fifo_ul);

exit:
	mutex_unlock(&port->tty_sem);
@@ -1877,7 +1877,7 @@ static s32 ntty_chars_in_buffer(struct tty_struct *tty)
		goto exit_in_buffer;
	}

	rval = __kfifo_len(&port->fifo_ul);
	rval = kfifo_len(&port->fifo_ul);

exit_in_buffer:
	return rval;
+5 −5
Original line number Diff line number Diff line
@@ -59,7 +59,7 @@ static int __cxio_init_resource_fifo(struct kfifo *fifo,
		return -ENOMEM;

	for (i = 0; i < skip_low + skip_high; i++)
		__kfifo_put(fifo, (unsigned char *) &entry, sizeof(u32));
		kfifo_put(fifo, (unsigned char *) &entry, sizeof(u32));
	if (random) {
		j = 0;
		random_bytes = random32();
@@ -71,19 +71,19 @@ static int __cxio_init_resource_fifo(struct kfifo *fifo,
				random_bytes = random32();
			}
			idx = (random_bytes >> (j * 2)) & 0xF;
			__kfifo_put(fifo,
			kfifo_put(fifo,
				(unsigned char *) &rarray[idx],
				sizeof(u32));
			rarray[idx] = i;
			j++;
		}
		for (i = 0; i < RANDOM_SIZE; i++)
			__kfifo_put(fifo,
			kfifo_put(fifo,
				(unsigned char *) &rarray[i],
				sizeof(u32));
	} else
		for (i = skip_low; i < nr - skip_high; i++)
			__kfifo_put(fifo, (unsigned char *) &i, sizeof(u32));
			kfifo_put(fifo, (unsigned char *) &i, sizeof(u32));

	for (i = 0; i < skip_low + skip_high; i++)
		kfifo_get_locked(fifo, (unsigned char *) &entry,
@@ -119,7 +119,7 @@ static int cxio_init_qpid_fifo(struct cxio_rdev *rdev_p)

	for (i = 16; i < T3_MAX_NUM_QP; i++)
		if (!(i & rdev_p->qpmask))
			__kfifo_put(&rdev_p->rscp->qpid_fifo,
			kfifo_put(&rdev_p->rscp->qpid_fifo,
				    (unsigned char *) &i, sizeof(u32));
	return 0;
}
+2 −2
Original line number Diff line number Diff line
@@ -1365,7 +1365,7 @@ static void lbs_send_confirmsleep(struct lbs_private *priv)
	priv->dnld_sent = DNLD_RES_RECEIVED;

	/* If nothing to do, go back to sleep (?) */
	if (!__kfifo_len(&priv->event_fifo) && !priv->resp_len[priv->resp_idx])
	if (!kfifo_len(&priv->event_fifo) && !priv->resp_len[priv->resp_idx])
		priv->psstate = PS_STATE_SLEEP;

	spin_unlock_irqrestore(&priv->driver_lock, flags);
@@ -1439,7 +1439,7 @@ void lbs_ps_confirm_sleep(struct lbs_private *priv)
	}

	/* Pending events or command responses? */
	if (__kfifo_len(&priv->event_fifo) || priv->resp_len[priv->resp_idx]) {
	if (kfifo_len(&priv->event_fifo) || priv->resp_len[priv->resp_idx]) {
		allowed = 0;
		lbs_deb_host("pending events or command responses\n");
	}
+4 −4
Original line number Diff line number Diff line
@@ -459,7 +459,7 @@ static int lbs_thread(void *data)
		else if (!list_empty(&priv->cmdpendingq) &&
					!(priv->wakeup_dev_required))
			shouldsleep = 0;	/* We have a command to send */
		else if (__kfifo_len(&priv->event_fifo))
		else if (kfifo_len(&priv->event_fifo))
			shouldsleep = 0;	/* We have an event to process */
		else
			shouldsleep = 1;	/* No command */
@@ -511,9 +511,9 @@ static int lbs_thread(void *data)

		/* Process hardware events, e.g. card removed, link lost */
		spin_lock_irq(&priv->driver_lock);
		while (__kfifo_len(&priv->event_fifo)) {
		while (kfifo_len(&priv->event_fifo)) {
			u32 event;
			__kfifo_get(&priv->event_fifo, (unsigned char *) &event,
			kfifo_get(&priv->event_fifo, (unsigned char *) &event,
				sizeof(event));
			spin_unlock_irq(&priv->driver_lock);
			lbs_process_event(priv, event);
@@ -1175,7 +1175,7 @@ void lbs_queue_event(struct lbs_private *priv, u32 event)
	if (priv->psstate == PS_STATE_SLEEP)
		priv->psstate = PS_STATE_AWAKE;

	__kfifo_put(&priv->event_fifo, (unsigned char *) &event, sizeof(u32));
	kfifo_put(&priv->event_fifo, (unsigned char *) &event, sizeof(u32));

	wake_up_interruptible(&priv->waitq);

+1 −1
Original line number Diff line number Diff line
@@ -2107,7 +2107,7 @@ static int sonypi_misc_open(struct inode *inode, struct file *file)
	spin_lock_irqsave(&sonypi_compat.fifo_lock, flags);

	if (atomic_inc_return(&sonypi_compat.open_count) == 1)
		__kfifo_reset(&sonypi_compat.fifo);
		kfifo_reset(&sonypi_compat.fifo);

	spin_unlock_irqrestore(&sonypi_compat.fifo_lock, flags);

Loading