usb: serial: handle -EPROTO quietly in generic_read_bulk

If a USB serial device is unplugged while there is an active program
using the device it will spam the logs with -EPROTO (71) messages as it
attempts to retry.

Most serial usb drivers (metro-usb, pl2303, mos7840, ...) only output
these messages for debugging.  The generic driver treats these as
errors.

Change the default output for the generic serial driver from error to
debug.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
usb: serial: handle -ENODEV quietly in generic_submit_read_urb

If a USB serial device (e.g. /dev/ttyUSB0) with an active program is
unplugged, an -ENODEV (19) error will be produced after it gives up
trying to resubmit a read.

  usb_serial_generic_submit_read_urb - usb_submit_urb failed: -19

Add -ENODEV as one of the permanent errors along with -EPERM that
usb_serial_generic_submit_read_urb() handles quietly without an error.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
staging: lustre: use min/max instead of MIN/MAX, simple cases

Custom MIN/MAX operations are being used which are not as robust
as the built in min/max operations which will warn about potentially
problematic type comparisons.

For the simple cases, where no type warning is produced, simply
replace MIN/MAX with min/max.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
staging: lustre: replace MIN with min_t

Switch from MIN to the built in min_t with the int type.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
staging: lustre: replace MIN/MAX with min_t/max_t

Switch from MIN/MAX to min_t/max_t with a size_t type.  The size_t type
was chosen because one operand is a size_t and all the others are
immediate integer values.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
staging: lustre: replace MIN with min, cast (__kernel_size_t)

Switch from MIN to min and fix the new type warning.  The
warning is produced because a comparison between iov_len,
which is a __kernel_size_t, is made to kiov_len, which is an
unsigned int (include/linux/lnet/types.h).  Fix the warning
by casting kiov_len to __kernel_size_t.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
staging: lustre: replace MIN with min_t, remove cast

Switch from MIN to min_t and remove the previous cast of the second
argument to int.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>
staging: lustre: remove custom MIN/MAX and min_t operations

Remove all custom MIN/MAX and min_t operations since they are
no longer needed.

Signed-off-by: Jeremiah Mahler <jmmahler@gmail.com>