From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?B?SsO2cm4=?= Engel Subject: Re: [Patch 05/18] fs/logfs/logfs.h Date: Mon, 4 Jun 2007 11:11:06 +0200 Message-ID: <20070604091106.GE14823@lazybastard.org> References: <20070603183845.GA8952@lazybastard.org> <20070603184303.GF8952@lazybastard.org> <200706032350.57556.arnd@arndb.de> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: QUOTED-PRINTABLE Cc: linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, linux-mtd@lists.infradead.org, akpm@osdl.org, Sam Ravnborg , John Stoffel , David Woodhouse , Jamie Lokier , Artem Bityutskiy , CaT , Jan Engelhardt , Evgeniy Polyakov , David Weinehall , Willy Tarreau , Kyle Moffett , Dongjun Shin , Pavel Machek , Bill Davidsen , Thomas Gleixner , Albert Cahalan , Pekka Enberg , Roland Dreier , Ondrej Zajicek , Ulisses Furquim To: Arnd Bergmann Return-path: Received: from lazybastard.de ([212.112.238.170]:56795 "EHLO longford.lazybastard.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751713AbXFDJPr (ORCPT ); Mon, 4 Jun 2007 05:15:47 -0400 Content-Disposition: inline In-Reply-To: <200706032350.57556.arnd@arndb.de> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Sun, 3 June 2007 23:50:55 +0200, Arnd Bergmann wrote: > On Sunday 03 June 2007, J=C3=B6rn Engel wrote: > > +/** > > + * struct logfs_device_ops - device access operations > > + * > > + * @read:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0read from the device > > + * @write:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0wr= ite to the device > > + * @erase:=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0er= ase part of the device > > + */ > > +struct logfs_device_ops { > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0int (*read)(struct super= _block *sb, loff_t ofs, size_t len, void *buf); > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0int (*write)(struct supe= r_block *sb, loff_t ofs, size_t len, void *buf); > > +=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0int (*erase)(struct supe= r_block *sb, loff_t ofs, size_t len); > > +}; >=20 > I wonder if there is a way to document the prototypes of these functi= on > pointers with kerneldoc, other than having a typedef for each. >=20 > What brought me to this point is that I first assumed they would retu= rn > the number of bytes transferred, like read/write file operations, whe= re > your functions return zero on success. I can just add a comment about the return code in the struct documentation. For the foreseeable future there will be exactly two instances of this structure. It's not as if every driver would implement this. J=C3=B6rn --=20 A defeated army first battles and then seeks victory. -- Sun Tzu - To unsubscribe from this list: send the line "unsubscribe linux-fsdevel= " in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html