Re: [PATCH] drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking

2023-12-05 Thread Dan Carpenter
On Tue, Dec 05, 2023 at 03:04:49PM +0100, Robert Foss wrote: > On Tue, Dec 5, 2023, 15:01 Dan Carpenter wrote: > > > On Tue, Dec 05, 2023 at 02:48:26PM +0100, Robert Foss wrote: > > > On Mon, 4 Dec 2023 15:29:00 +0300, Dan Carpenter wrote: > > > > The i2c_master_send/recv() functions return negat

Re: [PATCH] drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking

2023-12-05 Thread Robert Foss
On Tue, Dec 5, 2023, 15:01 Dan Carpenter wrote: > On Tue, Dec 05, 2023 at 02:48:26PM +0100, Robert Foss wrote: > > On Mon, 4 Dec 2023 15:29:00 +0300, Dan Carpenter wrote: > > > The i2c_master_send/recv() functions return negative error codes or the > > > number of bytes that were able to be sent/

Re: [PATCH] drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking

2023-12-05 Thread Dan Carpenter
On Tue, Dec 05, 2023 at 02:48:26PM +0100, Robert Foss wrote: > On Mon, 4 Dec 2023 15:29:00 +0300, Dan Carpenter wrote: > > The i2c_master_send/recv() functions return negative error codes or the > > number of bytes that were able to be sent/received. This code has > > two problems. 1) Instead of

Re: [PATCH] drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking

2023-12-05 Thread Robert Foss
On Mon, 4 Dec 2023 15:29:00 +0300, Dan Carpenter wrote: > The i2c_master_send/recv() functions return negative error codes or the > number of bytes that were able to be sent/received. This code has > two problems. 1) Instead of checking if all the bytes were sent or > received, it checks that at

Re: [PATCH] drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking

2023-12-05 Thread Neil Armstrong
On 04/12/2023 17:59, Dan Carpenter wrote: On Mon, Dec 04, 2023 at 02:53:05PM +0100, Neil Armstrong wrote: On 04/12/2023 13:29, Dan Carpenter wrote: The i2c_master_send/recv() functions return negative error codes or the number of bytes that were able to be sent/received. This code has two prob

Re: [PATCH] drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking

2023-12-04 Thread Dan Carpenter
On Mon, Dec 04, 2023 at 02:53:05PM +0100, Neil Armstrong wrote: > On 04/12/2023 13:29, Dan Carpenter wrote: > > The i2c_master_send/recv() functions return negative error codes or the > > number of bytes that were able to be sent/received. This code has > > two problems. 1) Instead of checking i

Re: [PATCH] drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking

2023-12-04 Thread Neil Armstrong
On 04/12/2023 13:29, Dan Carpenter wrote: The i2c_master_send/recv() functions return negative error codes or the number of bytes that were able to be sent/received. This code has two problems. 1) Instead of checking if all the bytes were sent or received, it checks that at least one byte was

[PATCH] drm/bridge: nxp-ptn3460: fix i2c_master_send() error checking

2023-12-04 Thread Dan Carpenter
The i2c_master_send/recv() functions return negative error codes or the number of bytes that were able to be sent/received. This code has two problems. 1) Instead of checking if all the bytes were sent or received, it checks that at least one byte was sent or received. 2) If there was a partial