[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <590a7d8c-6bfb-45f1-bc26-d99837cff2a2@moroto.mountain>
Date: Fri, 14 Jun 2024 08:05:00 +0300
From: Dan Carpenter <dan.carpenter@...aro.org>
To: Ben Walsh <ben@...nut.com>
Cc: Benson Leung <bleung@...omium.org>, Tzung-Bi Shih <tzungbi@...nel.org>,
Guenter Roeck <groeck@...omium.org>,
chrome-platform@...ts.linux.dev, linux-kernel@...r.kernel.org,
kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] platform/chrome: cros_ec_lpc: Handle zero length
read/write
On Thu, Jun 13, 2024 at 10:25:42PM +0100, Ben Walsh wrote:
> cros_ec_lpc_mec_read_bytes and cros_ec_lpc_mec_write_bytes call
> cros_ec_lpc_mec_in_range, which checks if addresses are in the MEC
> address range, and returns -EINVAL if the range given is not sensible.
>
> However cros_ec_lpc_mec_in_range was also returning -EINVAL for a zero
> length range.
>
> A zero length range should not be an error condition.
> cros_ec_lpc_mec_in_range now returns 1 in this case.
> cros_ec_lpc_io_bytes_mec checks for zero length, and returns
> immediately without beginning a transfer.
>
> Signed-off-by: Ben Walsh <ben@...nut.com>
Ideally this would have a Fixes tag that points to my commit.
regards,
dan carpenter
Powered by blists - more mailing lists