lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 25 Aug 2008 22:53:36 +0200
From:	Marcin Slusarz <marcin.slusarz@...il.com>
To:	Jochen Voss <jochen.voss@...glemail.com>
Cc:	jassi_singh_brar@...oo.com, linux-kernel@...r.kernel.org
Subject: Re: An idea .... with code

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ