* [PATCH][next] drm/bridge: sii902x: fix comparision of u32 with less than zero
@ 2019-06-03 14:21 ` Colin King
0 siblings, 0 replies; 11+ messages in thread
From: Colin King @ 2019-06-03 14:21 UTC (permalink / raw)
To: Jyri Sarha, Andrzej Hajda, Laurent Pinchart, David Airlie,
Daniel Vetter, dri-devel
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The less than check for the variable num_lanes is always going to be
false because the variable is a u32. Fix this by making num_lanes an
int and also make loop index i an int too.
Addresses-Coverity: ("Unsigned compared against 0")
Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/gpu/drm/bridge/sii902x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
index d6f98d388ac2..21a947603c88 100644
--- a/drivers/gpu/drm/bridge/sii902x.c
+++ b/drivers/gpu/drm/bridge/sii902x.c
@@ -719,7 +719,7 @@ static int sii902x_audio_codec_init(struct sii902x *sii902x,
.max_i2s_channels = 0,
};
u8 lanes[4];
- u32 num_lanes, i;
+ int num_lanes, i;
if (!of_property_read_bool(dev->of_node, "#sound-dai-cells")) {
dev_dbg(dev, "%s: No \"#sound-dai-cells\", no audio\n",
--
2.20.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH][next] drm/bridge: sii902x: fix comparision of u32 with less than zero
@ 2019-06-03 14:21 ` Colin King
0 siblings, 0 replies; 11+ messages in thread
From: Colin King @ 2019-06-03 14:21 UTC (permalink / raw)
To: Jyri Sarha, Andrzej Hajda, Laurent Pinchart, David Airlie,
Daniel Vetter, dri-devel
Cc: kernel-janitors, linux-kernel
From: Colin Ian King <colin.king@canonical.com>
The less than check for the variable num_lanes is always going to be
false because the variable is a u32. Fix this by making num_lanes an
int and also make loop index i an int too.
Addresses-Coverity: ("Unsigned compared against 0")
Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support")
Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
drivers/gpu/drm/bridge/sii902x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
index d6f98d388ac2..21a947603c88 100644
--- a/drivers/gpu/drm/bridge/sii902x.c
+++ b/drivers/gpu/drm/bridge/sii902x.c
@@ -719,7 +719,7 @@ static int sii902x_audio_codec_init(struct sii902x *sii902x,
.max_i2s_channels = 0,
};
u8 lanes[4];
- u32 num_lanes, i;
+ int num_lanes, i;
if (!of_property_read_bool(dev->of_node, "#sound-dai-cells")) {
dev_dbg(dev, "%s: No \"#sound-dai-cells\", no audio\n",
--
2.20.1
^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH][next] drm/bridge: sii902x: fix comparision of u32 with less than zero
2019-06-03 14:21 ` Colin King
(?)
@ 2019-06-03 16:00 ` Jyri Sarha
-1 siblings, 0 replies; 11+ messages in thread
From: Jyri Sarha @ 2019-06-03 16:00 UTC (permalink / raw)
To: Colin King, Andrzej Hajda, Laurent Pinchart, David Airlie,
Daniel Vetter, dri-devel
Cc: kernel-janitors, linux-kernel
On 03/06/2019 17:21, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The less than check for the variable num_lanes is always going to be
> false because the variable is a u32. Fix this by making num_lanes an
> int and also make loop index i an int too.
>
> Addresses-Coverity: ("Unsigned compared against 0")
> Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Oh, one of these slipped trough after all.
Acked-by: Jyri Sarha <jsarha@ti.com>
> ---
> drivers/gpu/drm/bridge/sii902x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
> index d6f98d388ac2..21a947603c88 100644
> --- a/drivers/gpu/drm/bridge/sii902x.c
> +++ b/drivers/gpu/drm/bridge/sii902x.c
> @@ -719,7 +719,7 @@ static int sii902x_audio_codec_init(struct sii902x *sii902x,
> .max_i2s_channels = 0,
> };
> u8 lanes[4];
> - u32 num_lanes, i;
> + int num_lanes, i;
>
> if (!of_property_read_bool(dev->of_node, "#sound-dai-cells")) {
> dev_dbg(dev, "%s: No \"#sound-dai-cells\", no audio\n",
>
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][next] drm/bridge: sii902x: fix comparision of u32 with less than zero
@ 2019-06-03 16:00 ` Jyri Sarha
0 siblings, 0 replies; 11+ messages in thread
From: Jyri Sarha @ 2019-06-03 16:00 UTC (permalink / raw)
To: Colin King, Andrzej Hajda, Laurent Pinchart, David Airlie,
Daniel Vetter, dri-devel
Cc: kernel-janitors, linux-kernel
On 03/06/2019 17:21, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The less than check for the variable num_lanes is always going to be
> false because the variable is a u32. Fix this by making num_lanes an
> int and also make loop index i an int too.
>
> Addresses-Coverity: ("Unsigned compared against 0")
> Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Oh, one of these slipped trough after all.
Acked-by: Jyri Sarha <jsarha@ti.com>
> ---
> drivers/gpu/drm/bridge/sii902x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
> index d6f98d388ac2..21a947603c88 100644
> --- a/drivers/gpu/drm/bridge/sii902x.c
> +++ b/drivers/gpu/drm/bridge/sii902x.c
> @@ -719,7 +719,7 @@ static int sii902x_audio_codec_init(struct sii902x *sii902x,
> .max_i2s_channels = 0,
> };
> u8 lanes[4];
> - u32 num_lanes, i;
> + int num_lanes, i;
>
> if (!of_property_read_bool(dev->of_node, "#sound-dai-cells")) {
> dev_dbg(dev, "%s: No \"#sound-dai-cells\", no audio\n",
>
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][next] drm/bridge: sii902x: fix comparision of u32 with less than zero
@ 2019-06-03 16:00 ` Jyri Sarha
0 siblings, 0 replies; 11+ messages in thread
From: Jyri Sarha @ 2019-06-03 16:00 UTC (permalink / raw)
To: Colin King, Andrzej Hajda, Laurent Pinchart, David Airlie,
Daniel Vetter, dri-devel
Cc: kernel-janitors, linux-kernel
On 03/06/2019 17:21, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The less than check for the variable num_lanes is always going to be
> false because the variable is a u32. Fix this by making num_lanes an
> int and also make loop index i an int too.
>
> Addresses-Coverity: ("Unsigned compared against 0")
> Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
Oh, one of these slipped trough after all.
Acked-by: Jyri Sarha <jsarha@ti.com>
> ---
> drivers/gpu/drm/bridge/sii902x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
> index d6f98d388ac2..21a947603c88 100644
> --- a/drivers/gpu/drm/bridge/sii902x.c
> +++ b/drivers/gpu/drm/bridge/sii902x.c
> @@ -719,7 +719,7 @@ static int sii902x_audio_codec_init(struct sii902x *sii902x,
> .max_i2s_channels = 0,
> };
> u8 lanes[4];
> - u32 num_lanes, i;
> + int num_lanes, i;
>
> if (!of_property_read_bool(dev->of_node, "#sound-dai-cells")) {
> dev_dbg(dev, "%s: No \"#sound-dai-cells\", no audio\n",
>
--
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki.
Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][next] drm/bridge: sii902x: fix comparision of u32 with less than zero
2019-06-03 14:21 ` Colin King
@ 2019-06-07 9:41 ` Andrzej Hajda
-1 siblings, 0 replies; 11+ messages in thread
From: Andrzej Hajda @ 2019-06-07 9:41 UTC (permalink / raw)
To: Colin King, Jyri Sarha, Laurent Pinchart, David Airlie,
Daniel Vetter, dri-devel
Cc: kernel-janitors, linux-kernel
On 03.06.2019 16:21, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The less than check for the variable num_lanes is always going to be
> false because the variable is a u32. Fix this by making num_lanes an
> int and also make loop index i an int too.
>
> Addresses-Coverity: ("Unsigned compared against 0")
Is there a rule in Kernel of adding such tags?
I have spotted only: Addresses-Coverity-ID?
Beside this:
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
--
Regards
Andrzej
> Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/gpu/drm/bridge/sii902x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
> index d6f98d388ac2..21a947603c88 100644
> --- a/drivers/gpu/drm/bridge/sii902x.c
> +++ b/drivers/gpu/drm/bridge/sii902x.c
> @@ -719,7 +719,7 @@ static int sii902x_audio_codec_init(struct sii902x *sii902x,
> .max_i2s_channels = 0,
> };
> u8 lanes[4];
> - u32 num_lanes, i;
> + int num_lanes, i;
>
> if (!of_property_read_bool(dev->of_node, "#sound-dai-cells")) {
> dev_dbg(dev, "%s: No \"#sound-dai-cells\", no audio\n",
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][next] drm/bridge: sii902x: fix comparision of u32 with less than zero
@ 2019-06-07 9:41 ` Andrzej Hajda
0 siblings, 0 replies; 11+ messages in thread
From: Andrzej Hajda @ 2019-06-07 9:41 UTC (permalink / raw)
To: Colin King, Jyri Sarha, Laurent Pinchart, David Airlie,
Daniel Vetter, dri-devel
Cc: kernel-janitors, linux-kernel
On 03.06.2019 16:21, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The less than check for the variable num_lanes is always going to be
> false because the variable is a u32. Fix this by making num_lanes an
> int and also make loop index i an int too.
>
> Addresses-Coverity: ("Unsigned compared against 0")
Is there a rule in Kernel of adding such tags?
I have spotted only: Addresses-Coverity-ID?
Beside this:
Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
 --
Regards
Andrzej
> Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/gpu/drm/bridge/sii902x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
> index d6f98d388ac2..21a947603c88 100644
> --- a/drivers/gpu/drm/bridge/sii902x.c
> +++ b/drivers/gpu/drm/bridge/sii902x.c
> @@ -719,7 +719,7 @@ static int sii902x_audio_codec_init(struct sii902x *sii902x,
> .max_i2s_channels = 0,
> };
> u8 lanes[4];
> - u32 num_lanes, i;
> + int num_lanes, i;
>
> if (!of_property_read_bool(dev->of_node, "#sound-dai-cells")) {
> dev_dbg(dev, "%s: No \"#sound-dai-cells\", no audio\n",
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][next] drm/bridge: sii902x: fix comparision of u32 with less than zero
2019-06-07 9:41 ` Andrzej Hajda
@ 2019-06-07 9:44 ` Colin Ian King
-1 siblings, 0 replies; 11+ messages in thread
From: Colin Ian King @ 2019-06-07 9:44 UTC (permalink / raw)
To: Andrzej Hajda, Jyri Sarha, Laurent Pinchart, David Airlie,
Daniel Vetter, dri-devel
Cc: kernel-janitors, linux-kernel
On 07/06/2019 10:41, Andrzej Hajda wrote:
> On 03.06.2019 16:21, Colin King wrote:
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> The less than check for the variable num_lanes is always going to be
>> false because the variable is a u32. Fix this by making num_lanes an
>> int and also make loop index i an int too.
>>
>> Addresses-Coverity: ("Unsigned compared against 0")
>
>
> Is there a rule in Kernel of adding such tags?
>
> I have spotted only: Addresses-Coverity-ID?
>
Unfortunately I'm running a Coverity in-house and so the Coverity ID is
not public, so it does not make sense for me to report the ID.
Colin
>
> Beside this:
>
> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
>
> --
> Regards
> Andrzej
>
>
>> Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support")
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>> ---
>> drivers/gpu/drm/bridge/sii902x.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
>> index d6f98d388ac2..21a947603c88 100644
>> --- a/drivers/gpu/drm/bridge/sii902x.c
>> +++ b/drivers/gpu/drm/bridge/sii902x.c
>> @@ -719,7 +719,7 @@ static int sii902x_audio_codec_init(struct sii902x *sii902x,
>> .max_i2s_channels = 0,
>> };
>> u8 lanes[4];
>> - u32 num_lanes, i;
>> + int num_lanes, i;
>>
>> if (!of_property_read_bool(dev->of_node, "#sound-dai-cells")) {
>> dev_dbg(dev, "%s: No \"#sound-dai-cells\", no audio\n",
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][next] drm/bridge: sii902x: fix comparision of u32 with less than zero
@ 2019-06-07 9:44 ` Colin Ian King
0 siblings, 0 replies; 11+ messages in thread
From: Colin Ian King @ 2019-06-07 9:44 UTC (permalink / raw)
To: Andrzej Hajda, Jyri Sarha, Laurent Pinchart, David Airlie,
Daniel Vetter, dri-devel
Cc: kernel-janitors, linux-kernel
On 07/06/2019 10:41, Andrzej Hajda wrote:
> On 03.06.2019 16:21, Colin King wrote:
>> From: Colin Ian King <colin.king@canonical.com>
>>
>> The less than check for the variable num_lanes is always going to be
>> false because the variable is a u32. Fix this by making num_lanes an
>> int and also make loop index i an int too.
>>
>> Addresses-Coverity: ("Unsigned compared against 0")
>
>
> Is there a rule in Kernel of adding such tags?
>
> I have spotted only: Addresses-Coverity-ID?
>
Unfortunately I'm running a Coverity in-house and so the Coverity ID is
not public, so it does not make sense for me to report the ID.
Colin
>
> Beside this:
>
> Reviewed-by: Andrzej Hajda <a.hajda@samsung.com>
>
> Â --
> Regards
> Andrzej
>
>
>> Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support")
>> Signed-off-by: Colin Ian King <colin.king@canonical.com>
>> ---
>> drivers/gpu/drm/bridge/sii902x.c | 2 +-
>> 1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
>> index d6f98d388ac2..21a947603c88 100644
>> --- a/drivers/gpu/drm/bridge/sii902x.c
>> +++ b/drivers/gpu/drm/bridge/sii902x.c
>> @@ -719,7 +719,7 @@ static int sii902x_audio_codec_init(struct sii902x *sii902x,
>> .max_i2s_channels = 0,
>> };
>> u8 lanes[4];
>> - u32 num_lanes, i;
>> + int num_lanes, i;
>>
>> if (!of_property_read_bool(dev->of_node, "#sound-dai-cells")) {
>> dev_dbg(dev, "%s: No \"#sound-dai-cells\", no audio\n",
>
>
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][next] drm/bridge: sii902x: fix comparision of u32 with less than zero
2019-06-03 14:21 ` Colin King
@ 2019-06-07 13:15 ` Andrzej Hajda
-1 siblings, 0 replies; 11+ messages in thread
From: Andrzej Hajda @ 2019-06-07 13:15 UTC (permalink / raw)
To: Colin King, Jyri Sarha, Laurent Pinchart, David Airlie,
Daniel Vetter, dri-devel
Cc: kernel-janitors, linux-kernel
On 03.06.2019 16:21, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The less than check for the variable num_lanes is always going to be
> false because the variable is a u32. Fix this by making num_lanes an
> int and also make loop index i an int too.
>
> Addresses-Coverity: ("Unsigned compared against 0")
> Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/gpu/drm/bridge/sii902x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
> index d6f98d388ac2..21a947603c88 100644
> --- a/drivers/gpu/drm/bridge/sii902x.c
> +++ b/drivers/gpu/drm/bridge/sii902x.c
> @@ -719,7 +719,7 @@ static int sii902x_audio_codec_init(struct sii902x *sii902x,
> .max_i2s_channels = 0,
> };
> u8 lanes[4];
> - u32 num_lanes, i;
> + int num_lanes, i;
>
> if (!of_property_read_bool(dev->of_node, "#sound-dai-cells")) {
> dev_dbg(dev, "%s: No \"#sound-dai-cells\", no audio\n",
Queued to drm-misc-next.
--
Regards
Andrzej
^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH][next] drm/bridge: sii902x: fix comparision of u32 with less than zero
@ 2019-06-07 13:15 ` Andrzej Hajda
0 siblings, 0 replies; 11+ messages in thread
From: Andrzej Hajda @ 2019-06-07 13:15 UTC (permalink / raw)
To: Colin King, Jyri Sarha, Laurent Pinchart, David Airlie,
Daniel Vetter, dri-devel
Cc: kernel-janitors, linux-kernel
On 03.06.2019 16:21, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> The less than check for the variable num_lanes is always going to be
> false because the variable is a u32. Fix this by making num_lanes an
> int and also make loop index i an int too.
>
> Addresses-Coverity: ("Unsigned compared against 0")
> Fixes: ff5781634c41 ("drm/bridge: sii902x: Implement HDMI audio support")
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
> drivers/gpu/drm/bridge/sii902x.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/gpu/drm/bridge/sii902x.c b/drivers/gpu/drm/bridge/sii902x.c
> index d6f98d388ac2..21a947603c88 100644
> --- a/drivers/gpu/drm/bridge/sii902x.c
> +++ b/drivers/gpu/drm/bridge/sii902x.c
> @@ -719,7 +719,7 @@ static int sii902x_audio_codec_init(struct sii902x *sii902x,
> .max_i2s_channels = 0,
> };
> u8 lanes[4];
> - u32 num_lanes, i;
> + int num_lanes, i;
>
> if (!of_property_read_bool(dev->of_node, "#sound-dai-cells")) {
> dev_dbg(dev, "%s: No \"#sound-dai-cells\", no audio\n",
Queued to drm-misc-next.
--
Regards
Andrzej
^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2019-06-07 13:15 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <CGME20190603142108epcas2p4625777c1aaea18257804ca86bcb64454@epcas2p4.samsung.com>
2019-06-03 14:21 ` [PATCH][next] drm/bridge: sii902x: fix comparision of u32 with less than zero Colin King
2019-06-03 14:21 ` Colin King
2019-06-03 16:00 ` Jyri Sarha
2019-06-03 16:00 ` Jyri Sarha
2019-06-03 16:00 ` Jyri Sarha
2019-06-07 9:41 ` Andrzej Hajda
2019-06-07 9:41 ` Andrzej Hajda
2019-06-07 9:44 ` Colin Ian King
2019-06-07 9:44 ` Colin Ian King
2019-06-07 13:15 ` Andrzej Hajda
2019-06-07 13:15 ` Andrzej Hajda
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.