linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Neukum <oneukum@suse.de>
To: promwad_imap <michail.kurachkin@promwad.com>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	Kuten Ivan <Ivan.Kuten@promwad.com>,
	"benavi@marvell.com" <benavi@marvell.com>,
	Palstsiuk Viktar <Viktar.Palstsiuk@promwad.com>
Subject: Re: TDM bus support in Linux Kernel [PATCH]
Date: Tue, 05 Feb 2013 16:34:28 +0100	[thread overview]
Message-ID: <5007545.bVNiTjB1se@linux-5eaq.site> (raw)
In-Reply-To: <6757302.20130204160858@promwad.com>

On Monday 04 February 2013 16:08:58 Michail Kurachkin wrote:
> Hi Oliver,
> 
> Thank you for the code review. I am working on the sources and soon
> will send you the update.
> 
> By the way, I did not find suitable implementation of software circular buffer management. src/include/linux/circ_buf.h seems to be very limited solution. 
> What do you think about adding the following functions/macros to the global namespace?

Additions to the global namespace needs to be done very carefully.

> int cb_init(struct circ_buf *cb, int item_size, int count);
> void cb_free(struct circ_buf *cb);
> int cb_push(struct circ_buf *cb, void *item);
> int cb_pop(struct circ_buf *cb, void *item);

void pointers here may be suboptimal

> int cb_is_full(struct circ_buf *cb);
> int cb_is_empty(struct circ_buf *cb);

I suggest you implement them in private and if they serve you well,
we can discuss making them global. The important point is that you
don't duplicate code.

	Regards
		Oliver


  reply	other threads:[~2013-02-05 15:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-30 12:37 TDM bus support in Linux Kernel [PATCH] Kurachkin Michail
2013-01-30 12:59 ` Oliver Neukum
2013-02-04 13:08   ` Re[2]: " Michail Kurachkin
2013-02-05 15:34     ` Oliver Neukum [this message]
2013-02-13 17:08       ` Michail Kurachkin
2013-02-14 12:46         ` Ivan Kuten
2013-01-30 13:03 ` Oliver Neukum
2013-01-30 13:28 ` Oliver Neukum
2013-01-30 13:35 ` Oliver Neukum
2013-01-30 13:43 ` Oliver Neukum
2013-01-30 15:57 ` Greg Kroah-Hartman
     [not found] ` <511044C9.9090809@gmail.com>
2013-02-04 23:49   ` Greg Kroah-Hartman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5007545.bVNiTjB1se@linux-5eaq.site \
    --to=oneukum@suse.de \
    --cc=Ivan.Kuten@promwad.com \
    --cc=Viktar.Palstsiuk@promwad.com \
    --cc=benavi@marvell.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michail.kurachkin@promwad.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).