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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <4B1314F8.10500@imap.cc>
Date:	Mon, 30 Nov 2009 01:42:32 +0100
From:	Tilman Schmidt <tilman@...p.cc>
To:	Alexey Dobriyan <adobriyan@...il.com>
CC:	Andrew Morton <akpm@...ux-foundation.org>,
	linux-kernel@...r.kernel.org, isdn@...ux-pingi.de, mac@...ware.de
Subject: Re: [PATCH] proc_fops: convert drivers/isdn/ to seq_file

Am 25.11.2009 05:59 schrieb Alexey Dobriyan:
> --- a/drivers/isdn/gigaset/capi.c
> +++ b/drivers/isdn/gigaset/capi.c
> @@ -2106,35 +2106,22 @@ static char *gigaset_procinfo(struct capi_ctr *ctr)
>  	return ctr->name;	/* ToDo: more? */
>  }
>  
> -/**
> - * gigaset_ctr_read_proc() - build controller proc file entry
> - * @page:	buffer of PAGE_SIZE bytes for receiving the entry.
> - * @start:	unused.
> - * @off:	unused.
> - * @count:	unused.
> - * @eof:	unused.
> - * @ctr:	controller descriptor structure.
> - *
> - * Return value: length of generated entry
> - */
> -static int gigaset_ctr_read_proc(char *page, char **start, off_t off,
> -			  int count, int *eof, struct capi_ctr *ctr)
> +static int gigaset_proc_show(struct seq_file *m, void *v)

I would prefer that, instead of throwing the kerneldoc comment away,
you adapted it to the new function. Specifically, I would like to
know what the second argument "void *v" is for.

>  {
> +	struct capi_ctr *ctr = m->private;

See below.

> +static int gigaset_proc_open(struct inode *inode, struct file *file)
> +{
> +	return single_open(file, gigaset_proc_show, PDE(inode)->data);

I'd like to understand how that works.

According to Documentation/filesystems/seq_file.txt, the value of
the last argument will be passed to the proc_show function in the
private field of the seq_file structure. Your gigaset_proc_show()
function assumes that this will be the capi_ctr pointer for the
device.

So what is PDE(inode)->data and where does it get set to the
capi_ctr pointer for the device?

Thanks,
Tilman

-- 
Tilman Schmidt                    E-Mail: tilman@...p.cc
Bonn, Germany
Diese Nachricht besteht zu 100% aus wiederverwerteten Bits.
Ungeöffnet mindestens haltbar bis: (siehe Rückseite)


Download attachment "signature.asc" of type "application/pgp-signature" (260 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ