2
0
mirror of https://github.com/edk2-porting/linux-next.git synced 2024-12-22 04:03:58 +08:00
linux-next/drivers/firewire
Stefan Richter 664d8010b1 firewire: cdev: simplify FW_CDEV_IOC_SEND_REQUEST return value
This changes the ioctl() return value of FW_CDEV_IOC_SEND_REQUEST and of
the as yet unreleased FW_CDEV_IOC_SEND_BROADCAST_REQUEST.  They used to
return
	sizeof(struct fw_cdev_send_request *) + data_length

which is obviously a failed attempt to emulate the return value of
raw1394's respective interface which uses write() instead of ioctl().

However, the first summand, as size of a kernel pointer, is entirely
meaningless to clients and the second summand is already known to
clients.  And the result does not resemble raw1394's write() return
code anyway.

So simplify it to a constant non-negative value, i.e. 0.  The only
dangers here would be that future client implementations check for error
by ret != 0 instead of ret < 0 when running on top of an old kernel; or
that current clients interpret ret = 0 or more as failure.  But both are
hypothetical cases which don't justify to return irritating values.

While we touch this code, also remove "& 0x1f" from tcode in the call of
fw_send_request.  The tcode cannot be bigger than 0x1f at this point.

Signed-off-by: Stefan Richter <stefanr@s5r6.in-berlin.de>
2009-03-24 20:56:50 +01:00
..
fw-card.c firewire: broadcast channel support 2009-03-24 20:56:49 +01:00
fw-cdev.c firewire: cdev: simplify FW_CDEV_IOC_SEND_REQUEST return value 2009-03-24 20:56:50 +01:00
fw-device.c firewire: broadcast channel support 2009-03-24 20:56:49 +01:00
fw-device.h firewire: core: clean up includes 2009-03-24 20:56:47 +01:00
fw-iso.c firewire: normalize a variable name 2009-03-24 20:56:48 +01:00
fw-ohci.c firewire: implement asynchronous stream transmission 2009-03-24 20:56:49 +01:00
fw-ohci.h firewire: fw-ohci: log regAccessFail events 2008-04-18 17:55:34 +02:00
fw-sbp2.c firewire: remove line breaks before function names 2009-03-24 20:56:40 +01:00
fw-topology.c firewire: remove line breaks before function names 2009-03-24 20:56:40 +01:00
fw-topology.h firewire: core: topology header fix 2009-03-24 20:56:43 +01:00
fw-transaction.c firewire: implement asynchronous stream transmission 2009-03-24 20:56:49 +01:00
fw-transaction.h firewire: broadcast channel support 2009-03-24 20:56:49 +01:00
Kconfig firewire: Kconfig help update 2008-08-19 18:47:56 +02:00
Makefile firewire: prefix modules with firewire- instead of fw- 2007-05-27 23:21:01 +02:00