Defining devctl() commands

According to the documentation, device-control commands are supposed to be
set up by the following macros:
__DIOF(class, cmd, data)
Get information from the device.
__DIOT(class, cmd, data)
Pass information to the device.
__DIOTF(class, cmd, data)
Pass some information to the device, and get some from it.
__DION(class, cmd)
A command with no associated data.
data: The type of data to be passed to and/or from the device. The
dev_data_ptr argument to devctl() must be a pointer to this type of data,
and n_bytes is usually the size of this type of data.

Apparently, theses macros (except DION) encode the size of the data in the
command code. Is this data size actually used in any way? Why do I have to
specify n_bytes in the actual devctl() call if it’s already known by
examining the command code itself? What if I specify a different size in the
devctl()? What if I want to pass a variable number of bytes to the resource
manager? I can’t see why these macros need to know the size of the data.