From: Michail Kurachkin <michail.kurachkin@promwad.com>
To: Oliver Neukum <oneukum@suse.de>
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[2]: TDM bus support in Linux Kernel [PATCH]
Date: Wed, 13 Feb 2013 20:08:26 +0300 [thread overview]
Message-ID: <1634686041.20130213200826@promwad.com> (raw)
In-Reply-To: <5007545.bVNiTjB1se@linux-5eaq.site>
Hi,
I just sent reworked version of the code. I am looking forward for comments.
Sorry, I have no time to fix your next requests:
1) It's a bit clunky having two device types on the same character device. Is there a better way to do this?
2) + mutex_lock(&slic_chr_dev_lock);
This locking is very heavy handed. You are holding it across the entire open, close, read, write, ioctl, and it is protecting a bunch of different things. Can you make the locking a bit more fine grained?
3) + rc = add_to_slic_devices_list(&tdm_dev->dev, TDM_DEVICE);
This function is the same as probe_spi_slic, except for the device type. A single function would prevent the code duplication.
Will do it later.
Thanks,
Michail
> 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
--
Kurochkin Michail
Software engineer
Promwad Innovation Company
22, Olshevskogo St.,
220073, Minsk, BELARUS
phone: +375 17 312-1246 ext. 801
mobile: +375 29 609-1024
mail: Michail.Kurachkin@promwad.com
www: www.promwad.com
next prev parent reply other threads:[~2013-02-13 17:13 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
2013-02-13 17:08 ` Michail Kurachkin [this message]
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=1634686041.20130213200826@promwad.com \
--to=michail.kurachkin@promwad.com \
--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=oneukum@suse.de \
/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