Re: [PATCH 1/4] drm/dsi: Make mipi_dsi_dcs_write() return ssize_t

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

 



On Tue, Jul 22, 2014 at 12:23:07PM +0200, Andrzej Hajda wrote:
> Hi Thierry,
> 
> YoungJun's comment refreshed my memory about mipi_dsi_dcs_write return
> value. It should be rather int than ssize_t. Why?
> .transfer() returns the number of read bytes or error, but in case
> of dcs write no bytes are read, so it in fact returns error or 0.
> This is why return value was implemented originally as int.
> So I do not think this patch is necessary.

I think it should return the number of bytes written or an error. That
way we give callers the maximum amount of information. They may still
choose to only handle < 0 for convenience, but at least the information
will be there should it become required at some point.

Thierry

Attachment: pgp2xS57lYzl0.pgp
Description: PGP signature

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/dri-devel

[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux