cport: simplify cport packing functions
cport: simplify cport packing functions

We currently never support more than 256 CPort IDs.  As a result we
never need more than one byte to represent the CPort ID that's
packed into a message header.

Simplify the message packing/unpacking functions to reflect this.
This matches the way the kernel Greybus code works.

Signed-off-by: Alex Elder <f429030cf5c0faf36fac3d102073b6e63a647baa@linaro.org>
Tested-by: Rui Miguel Silva <f529045c86d2c13bbdfc6f0cc7c0e057c243b006@linaro.org>
Reviewed-by: Rui Miguel Silva <f529045c86d2c13bbdfc6f0cc7c0e057c243b006@linaro.org>
Signed-off-by: Greg Kroah-Hartman <4645f7897fd33786a2ee1264d590b3c400559d85@google.com>

projectara/gbsim,gregkh/gbsim,gregkh/gbsim,projectara/gbsim