netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paolo Abeni <pabeni@redhat.com>
To: "Martinez, Ricardo" <ricardo.martinez@linux.intel.com>,
	YueHaibing <yuehaibing@huawei.com>,
	chandrashekar.devegowda@intel.com, linuxwwan@intel.com,
	chiranjeevi.rapolu@linux.intel.com, haijun.liu@mediatek.com,
	m.chetan.kumar@linux.intel.com, loic.poulain@linaro.org,
	ryazanov.s.a@gmail.com, johannes@sipsolutions.net,
	davem@davemloft.net, edumazet@google.com, kuba@kernel.org
Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next] net: wwan: t7xx: Fix return type of t7xx_dl_add_timedout()
Date: Thu, 12 May 2022 10:27:17 +0200	[thread overview]
Message-ID: <4f7e80c47826315e498edf45e7c1442cd54e95c7.camel@redhat.com> (raw)
In-Reply-To: <add45b0e-3081-3ca0-d03c-fe306526cc01@linux.intel.com>

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


      reply	other threads:[~2022-05-12  8:27 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4f7e80c47826315e498edf45e7c1442cd54e95c7.camel@redhat.com \
    --to=pabeni@redhat.com \
    --cc=chandrashekar.devegowda@intel.com \
    --cc=chiranjeevi.rapolu@linux.intel.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=haijun.liu@mediatek.com \
    --cc=johannes@sipsolutions.net \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxwwan@intel.com \
    --cc=loic.poulain@linaro.org \
    --cc=m.chetan.kumar@linux.intel.com \
    --cc=netdev@vger.kernel.org \
    --cc=ricardo.martinez@linux.intel.com \
    --cc=ryazanov.s.a@gmail.com \
    --cc=yuehaibing@huawei.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).