* [PATCH] omapdrm: hdmi4_cec: fix unsigned int comparison with less than zero
@ 2017-11-17 18:49 Colin King
2017-11-21 10:31 ` Tomi Valkeinen
0 siblings, 1 reply; 2+ messages in thread
From: Colin King @ 2017-11-17 18:49 UTC (permalink / raw)
To: Tomi Valkeinen, David Airlie, dri-devel; +Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The two comparisons of the unsigned int ret for -ve error returns is
always false because ret is unsigned. Fix this by making ret a signed
int.
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
index d86873f2abe6..e626eddf24d5 100644
--- a/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
+++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
@@ -352,7 +352,7 @@ int hdmi4_cec_init(struct platform_device *pdev, struct hdmi_core_data *core,
{
const u32 caps = CEC_CAP_TRANSMIT | CEC_CAP_LOG_ADDRS |
CEC_CAP_PASSTHROUGH | CEC_CAP_RC;
- unsigned int ret;
+ int ret;
core->adap = cec_allocate_adapter(&hdmi_cec_adap_ops, core,
"omap4", caps, CEC_MAX_LOG_ADDRS);
--
2.14.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] omapdrm: hdmi4_cec: fix unsigned int comparison with less than zero
2017-11-17 18:49 [PATCH] omapdrm: hdmi4_cec: fix unsigned int comparison with less than zero Colin King
@ 2017-11-21 10:31 ` Tomi Valkeinen
0 siblings, 0 replies; 2+ messages in thread
From: Tomi Valkeinen @ 2017-11-21 10:31 UTC (permalink / raw)
To: Colin King, David Airlie, dri-devel; +Cc: kernel-janitors, linux-kernel
Hi Colin,
On 17/11/17 20:49, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The two comparisons of the unsigned int ret for -ve error returns is
> always false because ret is unsigned. Fix this by making ret a signed
> int.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c b/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
> index d86873f2abe6..e626eddf24d5 100644
> --- a/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
> +++ b/drivers/gpu/drm/omapdrm/dss/hdmi4_cec.c
> @@ -352,7 +352,7 @@ int hdmi4_cec_init(struct platform_device *pdev, struct hdmi_core_data *core,
> {
> const u32 caps = CEC_CAP_TRANSMIT | CEC_CAP_LOG_ADDRS |
> CEC_CAP_PASSTHROUGH | CEC_CAP_RC;
> - unsigned int ret;
> + int ret;
>
> core->adap = cec_allocate_adapter(&hdmi_cec_adap_ops, core,
> "omap4", caps, CEC_MAX_LOG_ADDRS);
>
Thanks. There was an earlier patch from Dan Carpenter for this, which I
have applied.
Tomi
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2017-11-21 10:31 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-11-17 18:49 [PATCH] omapdrm: hdmi4_cec: fix unsigned int comparison with less than zero Colin King
2017-11-21 10:31 ` Tomi Valkeinen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).