* [PATCH net-next] net: wwan: t7xx: Fix return type of t7xx_dl_add_timedout()
@ 2022-05-11 7:19 YueHaibing
2022-05-12 0:35 ` Martinez, Ricardo
0 siblings, 1 reply; 3+ messages in thread
From: YueHaibing @ 2022-05-11 7:19 UTC (permalink / raw)
To: chandrashekar.devegowda, linuxwwan, chiranjeevi.rapolu,
haijun.liu, m.chetan.kumar, ricardo.martinez, loic.poulain,
ryazanov.s.a, johannes, davem, edumazet, kuba, pabeni,
yuehaibing
Cc: netdev, linux-kernel
t7xx_dl_add_timedout() now return int 'ret', but the return type
is bool. Change the return type to int for furthor errcode upstream.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/net/wwan/t7xx/t7xx_dpmaif.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/wwan/t7xx/t7xx_dpmaif.c b/drivers/net/wwan/t7xx/t7xx_dpmaif.c
index c8bf6929af51..8ee15af1a1ce 100644
--- a/drivers/net/wwan/t7xx/t7xx_dpmaif.c
+++ b/drivers/net/wwan/t7xx/t7xx_dpmaif.c
@@ -1043,7 +1043,7 @@ unsigned int t7xx_dpmaif_dl_dlq_pit_get_wr_idx(struct dpmaif_hw_info *hw_info,
return value & DPMAIF_DL_RD_WR_IDX_MSK;
}
-static bool t7xx_dl_add_timedout(struct dpmaif_hw_info *hw_info)
+static int t7xx_dl_add_timedout(struct dpmaif_hw_info *hw_info)
{
u32 value;
int ret;
--
2.17.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: wwan: t7xx: Fix return type of t7xx_dl_add_timedout()
2022-05-11 7:19 [PATCH net-next] net: wwan: t7xx: Fix return type of t7xx_dl_add_timedout() YueHaibing
@ 2022-05-12 0:35 ` Martinez, Ricardo
2022-05-12 8:27 ` Paolo Abeni
0 siblings, 1 reply; 3+ messages in thread
From: Martinez, Ricardo @ 2022-05-12 0:35 UTC (permalink / raw)
To: YueHaibing, chandrashekar.devegowda, linuxwwan,
chiranjeevi.rapolu, haijun.liu, m.chetan.kumar, loic.poulain,
ryazanov.s.a, johannes, davem, edumazet, kuba, pabeni
Cc: netdev, linux-kernel
On 5/11/2022 12:19 AM, YueHaibing wrote:
> t7xx_dl_add_timedout() now return int 'ret', but the return type
> is bool. Change the return type to int for furthor errcode upstream.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/net/wwan/t7xx/t7xx_dpmaif.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/wwan/t7xx/t7xx_dpmaif.c b/drivers/net/wwan/t7xx/t7xx_dpmaif.c
> index c8bf6929af51..8ee15af1a1ce 100644
> --- a/drivers/net/wwan/t7xx/t7xx_dpmaif.c
> +++ b/drivers/net/wwan/t7xx/t7xx_dpmaif.c
> @@ -1043,7 +1043,7 @@ unsigned int t7xx_dpmaif_dl_dlq_pit_get_wr_idx(struct dpmaif_hw_info *hw_info,
> return value & DPMAIF_DL_RD_WR_IDX_MSK;
> }
>
> -static bool t7xx_dl_add_timedout(struct dpmaif_hw_info *hw_info)
> +static int t7xx_dl_add_timedout(struct dpmaif_hw_info *hw_info)
yes, int is the right return type, thanks!
> {
> u32 value;
> int ret;
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH net-next] net: wwan: t7xx: Fix return type of t7xx_dl_add_timedout()
2022-05-12 0:35 ` Martinez, Ricardo
@ 2022-05-12 8:27 ` Paolo Abeni
0 siblings, 0 replies; 3+ messages in thread
From: Paolo Abeni @ 2022-05-12 8:27 UTC (permalink / raw)
To: Martinez, Ricardo, YueHaibing, chandrashekar.devegowda,
linuxwwan, chiranjeevi.rapolu, haijun.liu, m.chetan.kumar,
loic.poulain, ryazanov.s.a, johannes, davem, edumazet, kuba
Cc: netdev, linux-kernel
On Wed, 2022-05-11 at 17:35 -0700, Martinez, Ricardo wrote:
> On 5/11/2022 12:19 AM, YueHaibing wrote:
> > t7xx_dl_add_timedout() now return int 'ret', but the return type
> > is bool. Change the return type to int for furthor errcode upstream.
> >
> > Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> > ---
> > drivers/net/wwan/t7xx/t7xx_dpmaif.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/net/wwan/t7xx/t7xx_dpmaif.c b/drivers/net/wwan/t7xx/t7xx_dpmaif.c
> > index c8bf6929af51..8ee15af1a1ce 100644
> > --- a/drivers/net/wwan/t7xx/t7xx_dpmaif.c
> > +++ b/drivers/net/wwan/t7xx/t7xx_dpmaif.c
> > @@ -1043,7 +1043,7 @@ unsigned int t7xx_dpmaif_dl_dlq_pit_get_wr_idx(struct dpmaif_hw_info *hw_info,
> > return value & DPMAIF_DL_RD_WR_IDX_MSK;
> > }
> >
> > -static bool t7xx_dl_add_timedout(struct dpmaif_hw_info *hw_info)
> > +static int t7xx_dl_add_timedout(struct dpmaif_hw_info *hw_info)
> yes, int is the right return type, thanks!
>
Changing the return type without using the different error code in the
caller is quite useless. Additionally t7xx_dl_add_timedout() (via
ioread32_poll_timeout_atomic()) can produce a single error value
(ETIMEOUT). IMHO this change is not needed.
You may want to remove the 'ret' local variable instead (in the same
function)
Cheers,
Paolo
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-12 8:27 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-11 7:19 [PATCH net-next] net: wwan: t7xx: Fix return type of t7xx_dl_add_timedout() YueHaibing
2022-05-12 0:35 ` Martinez, Ricardo
2022-05-12 8:27 ` Paolo Abeni
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).