From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thierry Reding Subject: Re: [PATCH] drm/panel: type promotion bug in s6e8aa0_read_mtp_id() Date: Tue, 10 Jul 2018 13:12:48 +0200 Message-ID: <20180710111248.GA13242@ulmo> References: <20180704093807.s3lqsb2v6dg2k43d@kili.mountain> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="===============0860285167==" Return-path: Received: from mail-wm0-x244.google.com (mail-wm0-x244.google.com [IPv6:2a00:1450:400c:c09::244]) by gabe.freedesktop.org (Postfix) with ESMTPS id B287A6E92E for ; Tue, 10 Jul 2018 11:12:51 +0000 (UTC) Received: by mail-wm0-x244.google.com with SMTP id v25-v6so24276135wmc.0 for ; Tue, 10 Jul 2018 04:12:51 -0700 (PDT) In-Reply-To: <20180704093807.s3lqsb2v6dg2k43d@kili.mountain> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" To: Dan Carpenter Cc: David Airlie , kernel-janitors@vger.kernel.org, dri-devel@lists.freedesktop.org List-Id: dri-devel@lists.freedesktop.org --===============0860285167== Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="M9NhX3UHpAaciwkO" Content-Disposition: inline --M9NhX3UHpAaciwkO Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 04, 2018 at 12:38:09PM +0300, Dan Carpenter wrote: > The ARRAY_SIZE() macro is type size_t. If s6e8aa0_dcs_read() returns a > negative error code, then "ret < ARRAY_SIZE(id)" is false because the > negative error code is type promoted to a high positive value. >=20 > Fixes: 02051ca06371 ("drm/panel: add S6E8AA0 driver") > Signed-off-by: Dan Carpenter Applied, thanks. Thierry --M9NhX3UHpAaciwkO Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEiOrDCAFJzPfAjcif3SOs138+s6EFAltElLAACgkQ3SOs138+ s6ES+w//bJuN6bbtmCz1IjJZUrb42RFIFalSlYWsmTFpYRAgb778kV/CpiyhB+qf h8SxZ+WtvfbkoZc2XCJkcNchlNonnGja2d4vDRds1+wB4MWFxCWgqWv7A7aVwBQI O3SY5qO+XUFGoGYxE97ttVa3JGUZkbcCWjjlSdrPdAI2BmsoPVy5m7nkWNl6f+ci BMdQkC1ESTeI5E/SThpnBoVDv8HzwMA0OIKDhEy52OL5O7ynWQ4drAXeVewG3K7i YnJ3rfTKVn+53MRAyuuD9+PzO9rf/Gnp9IjqVDxOB5BNeq61KukPHNzzVmfpIep0 Cvgn9grLm7mRXI8zkgCGMYukc2kOWBD3pBl5oNc9hJUKLP6enXvI1PVt48F0wlF2 tkjzaNfdEpmBJqemgI59aYRu5/3NkDRv1xCNJsgGXWE47UDbZgCqHrcfitjYq1dW A722vHnK3RixUqNKXgy4yRh69EgY7A/Ku3gcbUJD+6oYHQIjGYgSgdUv3ynPDZYd USGe46ZGLl1ewnUMIs5YCBk4C3+BLLz9K4kB+ktj6caB7RoS30EnDYeW1zf19uTo aIIRX922Km3+GeywiF9navynJCcKVeoHdboMNDL5zp0XPTqi/olmrCkjhvAwFXoo hJWl3M/vtc7C+vipXrDFAeIBNAviiUEdVRZQo/lzSX8JEp0OJe0= =iCTp -----END PGP SIGNATURE----- --M9NhX3UHpAaciwkO-- --===============0860285167== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: base64 Content-Disposition: inline X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KZHJpLWRldmVs IG1haWxpbmcgbGlzdApkcmktZGV2ZWxAbGlzdHMuZnJlZWRlc2t0b3Aub3JnCmh0dHBzOi8vbGlz dHMuZnJlZWRlc2t0b3Aub3JnL21haWxtYW4vbGlzdGluZm8vZHJpLWRldmVsCg== --===============0860285167==--