From: Marcin Slusarz <marcin.slusarz@gmail.com>
To: Jochen Voss <jochen.voss@googlemail.com>
Cc: jassi_singh_brar@yahoo.com, linux-kernel@vger.kernel.org
Subject: Re: An idea .... with code
Date: Mon, 25 Aug 2008 22:53:36 +0200 [thread overview]
Message-ID: <20080825205221.GA5635@joi> (raw)
In-Reply-To: <ef1cd66f0808250522s5b661e21k772ce208afa33489@mail.gmail.com>
On Mon, Aug 25, 2008 at 01:22:16PM +0100, =?ISO-8859-1?Q?Jochen_Vo=DF_ wrote:
> >
> > static LIST_HEAD(vbd_head);
> >
> > static struct device vir_dev = {
> > .bus_id = "virblk",
> > };
> >
> > static int data_xfer(struct vir_blk_dev *vbd, struct page *page, unsigned int len,
> > unsigned int off, int wr, sector_t sector)
>
> strange indentation
>
> > {
> > ssize_t ret;
> > loff_t pos = sector * (1<<(vbd->sect_size_bits));
> > void *buf = kmap(page) + off;
> >
> > if(sector + (len >> vbd->sect_size_bits) > get_capacity(vbd->gd)){
>
> Kernel coding style seems to prefer spaces after "if" and before "{"
> (more instances below).
It's better to check this patch with scripts/checkpatch.pl - it will tell you
about all style issues.
> > init_MUTEX(&vbd->sem);
You seem to use this semaphore as a mutex - why don't you convert it to mutex then?
Semaphores should be used only when they are absolutely necessary.
Marcin
next prev parent reply other threads:[~2008-08-25 20:54 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-08-24 8:53 An idea .... with code jassi brar
2008-08-25 12:22 ` Jochen Voß
2008-08-25 20:53 ` Marcin Slusarz [this message]
2008-08-26 2:47 ` Bill Davidsen
2008-08-26 8:24 ` Andi Kleen
2008-08-26 10:44 ` Alexey Dobriyan
2008-08-26 11:08 ` Andi Kleen
2008-08-27 7:24 ` jassi brar
2008-08-27 7:47 ` Andi Kleen
2008-08-27 9:57 ` David Newall
2008-08-27 10:01 ` Andi Kleen
2008-08-27 12:38 ` jassi brar
2008-08-27 12:47 ` Andi Kleen
2008-08-27 14:49 ` Kasper Sandberg
2008-08-27 15:02 ` Andi Kleen
2008-08-28 1:24 ` jassi brar
2008-08-28 9:41 ` Kasper Sandberg
2008-08-30 2:57 ` Bill Davidsen
-- strict thread matches above, loose matches on Subject: below --
2008-08-27 0:44 jassi brar
2008-08-27 2:27 jassi brar
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=20080825205221.GA5635@joi \
--to=marcin.slusarz@gmail.com \
--cc=jassi_singh_brar@yahoo.com \
--cc=jochen.voss@googlemail.com \
--cc=linux-kernel@vger.kernel.org \
/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