Re: [PATCH 01/10] IOCHK interface for I/O error handling/detecting

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux