Re: [RFCv2 06/14] android: Create HAL API header skeleton

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

 



Hi All,

On Thu, Oct 03, 2013 at 04:07:08PM +0200, Szymon Janc wrote:
> > +
> > +/* Core Service */
> > +
> > +struct hal_msg_rsp {
> > +	struct hal_msg_hdr hdr;
> > +	uint8_t status;
> > +} __packed;
> 
> Non-error response to request has no status field, just header.

I have removed the structure in the following patches but I still have
doubts that this is a good approach.

So in a case of error we get:

struct error_rsp {
	struct hal_msg_hdr hdr;
	uint8_t status;
}

and in a case of success we get:

struct rsp {
        struct hal_msg_hdr hdr;
}

Does it make sense to omit status? We could read error_rsp and check
status for error while in the current design we have to check for size
received. Are we gonna save uint8_t?

Best regards 
Andrei Emeltchenko 

--
To unsubscribe from this list: send the line "unsubscribe linux-bluetooth" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Bluez Devel]     [Linux Wireless Networking]     [Linux Wireless Personal Area Networking]     [Linux ATH6KL]     [Linux USB Devel]     [Linux Media Drivers]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Big List of Linux Books]

  Powered by Linux