lkml.org 
[lkml]   [2005]   [Jun]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 01/10] IOCHK interface for I/O error handling/detecting
Hi Greg,

Thank you for giving me many useful advices!

Greg KH wrote:
> On Thu, Jun 09, 2005 at 09:48:15PM +0900, Hidetoshi Seto wrote:
>
>>+void iochk_init(void) { ; }
>>+
>>+void iochk_clear(iocookie *cookie, struct pci_dev *dev)
>>+{
>>+ /* no-ops */
>>+}
>
> A bit of a coding style difference between the two functions, yet they
> do the same thing :)

I intended to emphasize the pair. I'll unify them if not needed.

>>+int iochk_read(iocookie *cookie)
>>+{
>>+ /* no-ops */
>>+ return 0;
>>+}
>
> Why not just return the cookie? Can this ever fail?

In this time, no one initializes the cookie, so I just ignored it.

> Shouldn't these go into a .h file and be made "static inline" so they
> just compile away to nothing?

I'm not used to inlining...
In case of generic definition above, absolutely it should be inlined.
OK, I'll try.

>>+EXPORT_SYMBOL(iochk_clear);
>>+EXPORT_SYMBOL(iochk_read);
>
> EXPORT_SYMBOL_GPL() perhaps?

Yea.

>>+#ifndef HAVE_ARCH_IOMAP_CHECK
>>+typedef unsigned long iocookie;
>>+#endif
>
> Why typedef this if it isn't specified?

Because I stuck to have short name alias, and wanted to hide even
whether it is struct or not.

Thanks,
H.Seto

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

\
 
 \ /
  Last update: 2005-06-10 12:29    [W:0.046 / U:0.120 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site