Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1291028 > unrolled thread
| Started by | Andrzej Hajda <a.hajda@samsung.com> |
|---|---|
| First post | 2015-12-14 11:10 +0100 |
| Last post | 2015-12-15 18:00 +0100 |
| Articles | 18 — 7 participants |
Back to article view | Back to linux.kernel
[PATCH] net/mlx4_core: fix handling return value of mlx4_slave_convert_port Andrzej Hajda <a.hajda@samsung.com> - 2015-12-14 11:10 +0100
[PATCH] extcon: max14577: fix handling return value of regmap_irq_get_virq Andrzej Hajda <a.hajda@samsung.com> - 2015-12-14 11:10 +0100
Re: [PATCH] extcon: max14577: fix handling return value of regmap_irq_get_virq Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-12-14 11:40 +0100
[PATCH] extcon: max77693: fix handling return value of regmap_irq_get_virq Andrzej Hajda <a.hajda@samsung.com> - 2015-12-14 12:20 +0100
Re: [PATCH] extcon: max77693: fix handling return value of regmap_irq_get_virq Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-12-15 01:30 +0100
Re: [PATCH] extcon: max77693: fix handling return value of regmap_irq_get_virq Chanwoo Choi <cw00.choi@samsung.com> - 2015-12-15 02:10 +0100
Re: [PATCH] extcon: max14577: fix handling return value of regmap_irq_get_virq Chanwoo Choi <cw00.choi@samsung.com> - 2015-12-15 02:10 +0100
[PATCH] clk: sunxi: fix handling return value of of_property_match_string Andrzej Hajda <a.hajda@samsung.com> - 2015-12-14 11:10 +0100
Re: [PATCH] clk: sunxi: fix handling return value of of_property_match_string Maxime Ripard <maxime.ripard@free-electrons.com> - 2015-12-14 14:10 +0100
[PATCH] doc: mei: fix handling return value of mei_recv_msg Andrzej Hajda <a.hajda@samsung.com> - 2015-12-14 11:10 +0100
RE: [PATCH] doc: mei: fix handling return value of mei_recv_msg "Winkler, Tomas" <tomas.winkler@intel.com> - 2015-12-14 13:10 +0100
[PATCH] ath9k_htc: fix handling return value of ath9k_hw_calibrate Andrzej Hajda <a.hajda@samsung.com> - 2015-12-14 11:10 +0100
Re: [PATCH] ath9k_htc: fix handling return value of ath9k_hw_calibrate Kalle Valo <kvalo@codeaurora.org> - 2015-12-31 14:20 +0100
[PATCH] be2iscsi: fix handling return value of mgmt_open_connection Andrzej Hajda <a.hajda@samsung.com> - 2015-12-14 11:10 +0100
[PATCH] extcon: max77843: fix handling return value of regmap_irq_get_virq Andrzej Hajda <a.hajda@samsung.com> - 2015-12-14 11:10 +0100
Re: [PATCH] extcon: max77843: fix handling return value of regmap_irq_get_virq Krzysztof Kozlowski <k.kozlowski@samsung.com> - 2015-12-14 11:40 +0100
Re: [PATCH] extcon: max77843: fix handling return value of regmap_irq_get_virq Chanwoo Choi <cw00.choi@samsung.com> - 2015-12-15 02:10 +0100
Re: [PATCH] net/mlx4_core: fix handling return value of mlx4_slave_convert_port David Miller <davem@davemloft.net> - 2015-12-15 18:00 +0100
| From | Andrzej Hajda <a.hajda@samsung.com> |
|---|---|
| Date | 2015-12-14 11:10 +0100 |
| Subject | [PATCH] net/mlx4_core: fix handling return value of mlx4_slave_convert_port |
| Message-ID | <qFyeT-4Fp-11@gated-at.bofh.it> |
The function can return negative values, so its result should
be assigned to signed variable.
The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1].
[1]: http://permalink.gmane.org/gmane.linux.kernel/2046107
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
drivers/net/ethernet/mellanox/mlx4/resource_tracker.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
index da7f578..b46dbe2 100644
--- a/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
+++ b/drivers/net/ethernet/mellanox/mlx4/resource_tracker.c
@@ -4331,9 +4331,10 @@ int mlx4_QP_FLOW_STEERING_ATTACH_wrapper(struct mlx4_dev *dev, int slave,
return -EOPNOTSUPP;
ctrl = (struct mlx4_net_trans_rule_hw_ctrl *)inbox->buf;
- ctrl->port = mlx4_slave_convert_port(dev, slave, ctrl->port);
- if (ctrl->port <= 0)
+ err = mlx4_slave_convert_port(dev, slave, ctrl->port);
+ if (err <= 0)
return -EINVAL;
+ ctrl->port = err;
qpn = be32_to_cpu(ctrl->qpn) & 0xffffff;
err = get_res(dev, slave, qpn, RES_QP, &rqp);
if (err) {
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Andrzej Hajda <a.hajda@samsung.com> |
|---|---|
| Date | 2015-12-14 11:10 +0100 |
| Subject | [PATCH] extcon: max14577: fix handling return value of regmap_irq_get_virq |
| Message-ID | <qFyeT-4Fp-13@gated-at.bofh.it> |
| In reply to | #1291028 |
The function can return negative values, so its result should
be assigned to signed variable.
The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1].
[1]: http://permalink.gmane.org/gmane.linux.kernel/2046107
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
drivers/extcon/extcon-max14577.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/extcon/extcon-max14577.c b/drivers/extcon/extcon-max14577.c
index 601dbd9..b30ab97 100644
--- a/drivers/extcon/extcon-max14577.c
+++ b/drivers/extcon/extcon-max14577.c
@@ -692,7 +692,7 @@ static int max14577_muic_probe(struct platform_device *pdev)
/* Support irq domain for max14577 MUIC device */
for (i = 0; i < info->muic_irqs_num; i++) {
struct max14577_muic_irq *muic_irq = &info->muic_irqs[i];
- unsigned int virq = 0;
+ int virq = 0;
virq = regmap_irq_get_virq(max14577->irq_data, muic_irq->irq);
if (virq <= 0)
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Date | 2015-12-14 11:40 +0100 |
| Subject | Re: [PATCH] extcon: max14577: fix handling return value of regmap_irq_get_virq |
| Message-ID | <qFyHV-4U5-57@gated-at.bofh.it> |
| In reply to | #1291030 |
2015-12-14 19:06 GMT+09:00 Andrzej Hajda <a.hajda@samsung.com>: > The function can return negative values, so its result should > be assigned to signed variable. > > The problem has been detected using proposed semantic patch > scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1]. > > [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 > > Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> > --- > drivers/extcon/extcon-max14577.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Do you plan to fix also max77693? Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Andrzej Hajda <a.hajda@samsung.com> |
|---|---|
| Date | 2015-12-14 12:20 +0100 |
| Subject | [PATCH] extcon: max77693: fix handling return value of regmap_irq_get_virq |
| Message-ID | <qFzkC-5qv-5@gated-at.bofh.it> |
| In reply to | #1291086 |
The function can return negative values, so its result should
be assigned to signed variable.
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
Suggested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
---
drivers/extcon/extcon-max77693.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
index 44c499e..fdf8f5d 100644
--- a/drivers/extcon/extcon-max77693.c
+++ b/drivers/extcon/extcon-max77693.c
@@ -1127,11 +1127,11 @@ static int max77693_muic_probe(struct platform_device *pdev)
/* Support irq domain for MAX77693 MUIC device */
for (i = 0; i < ARRAY_SIZE(muic_irqs); i++) {
struct max77693_muic_irq *muic_irq = &muic_irqs[i];
- unsigned int virq = 0;
+ int virq;
virq = regmap_irq_get_virq(max77693->irq_data_muic,
muic_irq->irq);
- if (!virq)
+ if (virq <= 0)
return -EINVAL;
muic_irq->virq = virq;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Date | 2015-12-15 01:30 +0100 |
| Subject | Re: [PATCH] extcon: max77693: fix handling return value of regmap_irq_get_virq |
| Message-ID | <qFLF8-522-25@gated-at.bofh.it> |
| In reply to | #1291116 |
On 14.12.2015 20:12, Andrzej Hajda wrote: > The function can return negative values, so its result should > be assigned to signed variable. > > Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> > Suggested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> > --- > drivers/extcon/extcon-max77693.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Chanwoo Choi <cw00.choi@samsung.com> |
|---|---|
| Date | 2015-12-15 02:10 +0100 |
| Subject | Re: [PATCH] extcon: max77693: fix handling return value of regmap_irq_get_virq |
| Message-ID | <qFMhP-5wn-11@gated-at.bofh.it> |
| In reply to | #1291116 |
On 2015년 12월 14일 20:12, Andrzej Hajda wrote:
> The function can return negative values, so its result should
> be assigned to signed variable.
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> Suggested-by: Krzysztof Kozlowski <k.kozlowski@samsung.com>
> ---
> drivers/extcon/extcon-max77693.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/extcon/extcon-max77693.c b/drivers/extcon/extcon-max77693.c
> index 44c499e..fdf8f5d 100644
> --- a/drivers/extcon/extcon-max77693.c
> +++ b/drivers/extcon/extcon-max77693.c
> @@ -1127,11 +1127,11 @@ static int max77693_muic_probe(struct platform_device *pdev)
> /* Support irq domain for MAX77693 MUIC device */
> for (i = 0; i < ARRAY_SIZE(muic_irqs); i++) {
> struct max77693_muic_irq *muic_irq = &muic_irqs[i];
> - unsigned int virq = 0;
> + int virq;
>
> virq = regmap_irq_get_virq(max77693->irq_data_muic,
> muic_irq->irq);
> - if (!virq)
> + if (virq <= 0)
> return -EINVAL;
> muic_irq->virq = virq;
>
>
Applied it.
Thanks,
Chanwoo Choi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Chanwoo Choi <cw00.choi@samsung.com> |
|---|---|
| Date | 2015-12-15 02:10 +0100 |
| Subject | Re: [PATCH] extcon: max14577: fix handling return value of regmap_irq_get_virq |
| Message-ID | <qFMhQ-5wn-21@gated-at.bofh.it> |
| In reply to | #1291030 |
On 2015년 12월 14일 19:06, Andrzej Hajda wrote:
> The function can return negative values, so its result should
> be assigned to signed variable.
>
> The problem has been detected using proposed semantic patch
> scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1].
>
> [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> ---
> drivers/extcon/extcon-max14577.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/extcon/extcon-max14577.c b/drivers/extcon/extcon-max14577.c
> index 601dbd9..b30ab97 100644
> --- a/drivers/extcon/extcon-max14577.c
> +++ b/drivers/extcon/extcon-max14577.c
> @@ -692,7 +692,7 @@ static int max14577_muic_probe(struct platform_device *pdev)
> /* Support irq domain for max14577 MUIC device */
> for (i = 0; i < info->muic_irqs_num; i++) {
> struct max14577_muic_irq *muic_irq = &info->muic_irqs[i];
> - unsigned int virq = 0;
> + int virq = 0;
>
> virq = regmap_irq_get_virq(max14577->irq_data, muic_irq->irq);
> if (virq <= 0)
>
Applied it.
Thanks,
Chanwoo Choi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Andrzej Hajda <a.hajda@samsung.com> |
|---|---|
| Date | 2015-12-14 11:10 +0100 |
| Subject | [PATCH] clk: sunxi: fix handling return value of of_property_match_string |
| Message-ID | <qFyeU-4Fp-21@gated-at.bofh.it> |
| In reply to | #1291028 |
The function can return negative values, so its result should
be assigned to signed variable.
The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1].
[1]: http://permalink.gmane.org/gmane.linux.kernel/2046107
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
drivers/clk/sunxi/clk-sun8i-bus-gates.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/clk/sunxi/clk-sun8i-bus-gates.c b/drivers/clk/sunxi/clk-sun8i-bus-gates.c
index 7ab60c5..ecadd97 100644
--- a/drivers/clk/sunxi/clk-sun8i-bus-gates.c
+++ b/drivers/clk/sunxi/clk-sun8i-bus-gates.c
@@ -47,12 +47,12 @@ static void __init sun8i_h3_bus_gates_init(struct device_node *node)
return;
for (i = 0; i < ARRAY_SIZE(names); i++) {
- index = of_property_match_string(node, "clock-names",
- names[i]);
- if (index < 0)
+ int idx = of_property_match_string(node, "clock-names",
+ names[i]);
+ if (idx < 0)
return;
- parents[i] = of_clk_get_parent_name(node, index);
+ parents[i] = of_clk_get_parent_name(node, idx);
}
clk_data = kmalloc(sizeof(struct clk_onecell_data), GFP_KERNEL);
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Maxime Ripard <maxime.ripard@free-electrons.com> |
|---|---|
| Date | 2015-12-14 14:10 +0100 |
| Subject | Re: [PATCH] clk: sunxi: fix handling return value of of_property_match_string |
| Message-ID | <qFB34-6yU-1@gated-at.bofh.it> |
| In reply to | #1291034 |
[Multipart message — attachments visible in raw view] — view raw
Hi, On Mon, Dec 14, 2015 at 11:06:00AM +0100, Andrzej Hajda wrote: > The function can return negative values, so its result should > be assigned to signed variable. > > The problem has been detected using proposed semantic patch > scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1]. > > [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 > > Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Applied, thanks! Maxime -- Maxime Ripard, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
[toc] | [prev] | [next] | [standalone]
| From | Andrzej Hajda <a.hajda@samsung.com> |
|---|---|
| Date | 2015-12-14 11:10 +0100 |
| Subject | [PATCH] doc: mei: fix handling return value of mei_recv_msg |
| Message-ID | <qFyeU-4Fp-19@gated-at.bofh.it> |
| In reply to | #1291028 |
The function can return negative values, so its result should
be assigned to signed variable.
The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1].
[1]: http://permalink.gmane.org/gmane.linux.kernel/2046107
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
Documentation/misc-devices/mei/mei-amt-version.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/misc-devices/mei/mei-amt-version.c b/Documentation/misc-devices/mei/mei-amt-version.c
index 57d0d87..33e67bd 100644
--- a/Documentation/misc-devices/mei/mei-amt-version.c
+++ b/Documentation/misc-devices/mei/mei-amt-version.c
@@ -370,7 +370,7 @@ static uint32_t amt_host_if_call(struct amt_host_if *acmd,
unsigned int expected_sz)
{
uint32_t in_buf_sz;
- uint32_t out_buf_sz;
+ ssize_t out_buf_sz;
ssize_t written;
uint32_t status;
struct amt_host_if_resp_header *msg_hdr;
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | "Winkler, Tomas" <tomas.winkler@intel.com> |
|---|---|
| Date | 2015-12-14 13:10 +0100 |
| Subject | RE: [PATCH] doc: mei: fix handling return value of mei_recv_msg |
| Message-ID | <qFA70-5XO-17@gated-at.bofh.it> |
| In reply to | #1291035 |
> The function can return negative values, so its result should
> be assigned to signed variable.
>
> The problem has been detected using proposed semantic patch
> scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1].
>
> [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> ---
> Documentation/misc-devices/mei/mei-amt-version.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Documentation/misc-devices/mei/mei-amt-version.c
> b/Documentation/misc-devices/mei/mei-amt-version.c
> index 57d0d87..33e67bd 100644
> --- a/Documentation/misc-devices/mei/mei-amt-version.c
> +++ b/Documentation/misc-devices/mei/mei-amt-version.c
> @@ -370,7 +370,7 @@ static uint32_t amt_host_if_call(struct amt_host_if
> *acmd,
> unsigned int expected_sz)
> {
> uint32_t in_buf_sz;
If are you at that then it will be desired to change the type to ssize_t also for in_buf_sz as mei_recv_msg takes ssize_t argument.
> - uint32_t out_buf_sz;
> + ssize_t out_buf_sz;
> ssize_t written;
> uint32_t status;
> struct amt_host_if_resp_header *msg_hdr;
Thanks
Tomas
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Andrzej Hajda <a.hajda@samsung.com> |
|---|---|
| Date | 2015-12-14 11:10 +0100 |
| Subject | [PATCH] ath9k_htc: fix handling return value of ath9k_hw_calibrate |
| Message-ID | <qFyeU-4Fp-31@gated-at.bofh.it> |
| In reply to | #1291028 |
The function can return negative values in case of error. Its result should be then tested for such case. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> --- drivers/net/wireless/ath/ath9k/htc_drv_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/wireless/ath/ath9k/htc_drv_main.c b/drivers/net/wireless/ath/ath9k/htc_drv_main.c index a680a97..fe1fd1a 100644 --- a/drivers/net/wireless/ath/ath9k/htc_drv_main.c +++ b/drivers/net/wireless/ath/ath9k/htc_drv_main.c @@ -834,7 +834,7 @@ void ath9k_htc_ani_work(struct work_struct *work) if (longcal || shortcal) common->ani.caldone = ath9k_hw_calibrate(ah, ah->curchan, - ah->rxchainmask, longcal); + ah->rxchainmask, longcal) > 0; ath9k_htc_ps_restore(priv); } -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Kalle Valo <kvalo@codeaurora.org> |
|---|---|
| Date | 2015-12-31 14:20 +0100 |
| Subject | Re: [PATCH] ath9k_htc: fix handling return value of ath9k_hw_calibrate |
| Message-ID | <qLLj3-4Sl-3@gated-at.bofh.it> |
| In reply to | #1291038 |
Andrzej Hajda <a.hajda@samsung.com> writes: > The function can return negative values in case of error. > Its result should be then tested for such case. > > The problem has been detected using proposed semantic patch > scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1]. > > [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 > > Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> Applied to ath.git, thanks. -- Kalle Valo -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Andrzej Hajda <a.hajda@samsung.com> |
|---|---|
| Date | 2015-12-14 11:10 +0100 |
| Subject | [PATCH] be2iscsi: fix handling return value of mgmt_open_connection |
| Message-ID | <qFyeU-4Fp-35@gated-at.bofh.it> |
| In reply to | #1291028 |
The function can return negative values, so its result should be assigned to signed variable. The problem has been detected using proposed semantic patch scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1]. [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> --- drivers/scsi/be2iscsi/be_iscsi.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/scsi/be2iscsi/be_iscsi.c b/drivers/scsi/be2iscsi/be_iscsi.c index b7087ba..ce9f192 100644 --- a/drivers/scsi/be2iscsi/be_iscsi.c +++ b/drivers/scsi/be2iscsi/be_iscsi.c @@ -1106,8 +1106,8 @@ static int beiscsi_open_conn(struct iscsi_endpoint *ep, struct beiscsi_hba *phba = beiscsi_ep->phba; struct tcp_connect_and_offload_out *ptcpcnct_out; struct be_dma_mem nonemb_cmd; - unsigned int tag, req_memsize; - int ret = -ENOMEM; + unsigned int req_memsize; + int tag, ret = -ENOMEM; beiscsi_log(phba, KERN_INFO, BEISCSI_LOG_CONFIG, "BS_%d : In beiscsi_open_conn\n"); -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Andrzej Hajda <a.hajda@samsung.com> |
|---|---|
| Date | 2015-12-14 11:10 +0100 |
| Subject | [PATCH] extcon: max77843: fix handling return value of regmap_irq_get_virq |
| Message-ID | <qFyeU-4Fp-37@gated-at.bofh.it> |
| In reply to | #1291028 |
The function can return negative values, so its result should
be assigned to signed variable.
The problem has been detected using proposed semantic patch
scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1].
[1]: http://permalink.gmane.org/gmane.linux.kernel/2046107
Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
---
drivers/extcon/extcon-max77843.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/extcon/extcon-max77843.c b/drivers/extcon/extcon-max77843.c
index 9f9ea33..74dfb7f 100644
--- a/drivers/extcon/extcon-max77843.c
+++ b/drivers/extcon/extcon-max77843.c
@@ -811,7 +811,7 @@ static int max77843_muic_probe(struct platform_device *pdev)
for (i = 0; i < ARRAY_SIZE(max77843_muic_irqs); i++) {
struct max77843_muic_irq *muic_irq = &max77843_muic_irqs[i];
- unsigned int virq = 0;
+ int virq = 0;
virq = regmap_irq_get_virq(max77843->irq_data_muic,
muic_irq->irq);
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Krzysztof Kozlowski <k.kozlowski@samsung.com> |
|---|---|
| Date | 2015-12-14 11:40 +0100 |
| Subject | Re: [PATCH] extcon: max77843: fix handling return value of regmap_irq_get_virq |
| Message-ID | <qFyHV-4U5-47@gated-at.bofh.it> |
| In reply to | #1291040 |
2015-12-14 19:06 GMT+09:00 Andrzej Hajda <a.hajda@samsung.com>: > The function can return negative values, so its result should > be assigned to signed variable. > > The problem has been detected using proposed semantic patch > scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1]. > > [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107 > > Signed-off-by: Andrzej Hajda <a.hajda@samsung.com> > --- > drivers/extcon/extcon-max77843.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > Reviewed-by: Krzysztof Kozlowski <k.kozlowski@samsung.com> Best regards, Krzysztof -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Chanwoo Choi <cw00.choi@samsung.com> |
|---|---|
| Date | 2015-12-15 02:10 +0100 |
| Subject | Re: [PATCH] extcon: max77843: fix handling return value of regmap_irq_get_virq |
| Message-ID | <qFMhP-5wn-15@gated-at.bofh.it> |
| In reply to | #1291040 |
On 2015년 12월 14일 19:06, Andrzej Hajda wrote:
> The function can return negative values, so its result should
> be assigned to signed variable.
>
> The problem has been detected using proposed semantic patch
> scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1].
>
> [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107
>
> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
> ---
> drivers/extcon/extcon-max77843.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/extcon/extcon-max77843.c b/drivers/extcon/extcon-max77843.c
> index 9f9ea33..74dfb7f 100644
> --- a/drivers/extcon/extcon-max77843.c
> +++ b/drivers/extcon/extcon-max77843.c
> @@ -811,7 +811,7 @@ static int max77843_muic_probe(struct platform_device *pdev)
>
> for (i = 0; i < ARRAY_SIZE(max77843_muic_irqs); i++) {
> struct max77843_muic_irq *muic_irq = &max77843_muic_irqs[i];
> - unsigned int virq = 0;
> + int virq = 0;
>
> virq = regmap_irq_get_virq(max77843->irq_data_muic,
> muic_irq->irq);
>
Applied it.
Thanks,
Chanwoo Choi
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2015-12-15 18:00 +0100 |
| Message-ID | <qG17c-6Oe-9@gated-at.bofh.it> |
| In reply to | #1291028 |
From: Or Gerlitz <ogerlitz@mellanox.com>
Date: Tue, 15 Dec 2015 11:09:40 +0200
> On 12/14/2015 12:05 PM, Andrzej Hajda wrote:
>> The function can return negative values, so its result should
>> be assigned to signed variable.
>>
>> The problem has been detected using proposed semantic patch
>> scripts/coccinelle/tests/assign_signed_to_unsigned.cocci [1].
>>
>> [1]: http://permalink.gmane.org/gmane.linux.kernel/2046107
>>
>
> Please add here
>
> Fixes: fc48866f7 ('net/mlx4: Adapt code for N-Port VF')
>
>> Signed-off-by: Andrzej Hajda <a.hajda@samsung.com>
>
> otherwise, Looks good
>
> Acked-by: Or Gerlitz <ogerlitz@mellanox.com>
Applied with Fixes tag added.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web