From: Tejun Heo <tj@kernel.org>
To: Arjun Sreedharan <arjun024@gmail.com>
Cc: linux-ide@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] ata: propagate return value of scc_wait_after_reset
Date: Sat, 16 Aug 2014 07:37:18 -0400 [thread overview]
Message-ID: <20140816113718.GA9305@htj.dyndns.org> (raw)
In-Reply-To: <1408184238-1733-1-git-send-email-arjun024@gmail.com>
Hello,
On Sat, Aug 16, 2014 at 03:47:17PM +0530, Arjun Sreedharan wrote:
> scc_bus_softreset not necessarily should return zero.
> Propagate the error code.
> Signed-off-by: Arjun Sreedharan <arjun024@gmail.com>
> ---
> drivers/ata/pata_scc.c | 9 ++++-----
> 1 file changed, 4 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/ata/pata_scc.c b/drivers/ata/pata_scc.c
> index 4e006d7..5618c4518 100644
> --- a/drivers/ata/pata_scc.c
> +++ b/drivers/ata/pata_scc.c
> @@ -585,7 +585,7 @@ static int scc_wait_after_reset(struct ata_link *link, unsigned int devmask,
> * Note: Original code is ata_bus_softreset().
> */
>
> -static unsigned int scc_bus_softreset(struct ata_port *ap, unsigned int devmask,
> +static int scc_bus_softreset(struct ata_port *ap, unsigned int devmask,
> unsigned long deadline)
> {
> struct ata_ioports *ioaddr = &ap->ioaddr;
> @@ -599,9 +599,7 @@ static unsigned int scc_bus_softreset(struct ata_port *ap, unsigned int devmask,
scc_bus_softreset() should return int too, right?
> udelay(20);
> out_be32(ioaddr->ctl_addr, ap->ctl);
>
> - scc_wait_after_reset(&ap->link, devmask, deadline);
> -
> - return 0;
> + return scc_wait_after_reset(&ap->link, devmask, deadline);
> }
>
> /**
> @@ -618,7 +616,8 @@ static int scc_softreset(struct ata_link *link, unsigned int *classes,
> {
> struct ata_port *ap = link->ap;
> unsigned int slave_possible = ap->flags & ATA_FLAG_SLAVE_POSS;
> - unsigned int devmask = 0, err_mask;
> + unsigned int devmask = 0;
> + int err_mask;
@rc or @ret would be a better name for it.
Thanks.
--
tejun
next prev parent reply other threads:[~2014-08-16 11:37 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-16 10:17 [PATCH] ata: propagate return value of scc_wait_after_reset Arjun Sreedharan
2014-08-16 11:37 ` Tejun Heo [this message]
2014-08-16 12:04 ` Arjun Sreedharan
2014-08-16 12:21 ` Tejun Heo
2014-08-16 12:25 ` Arjun Sreedharan
2014-08-16 12:50 ` Arjun Sreedharan
2014-08-16 12:55 ` Tejun Heo
[not found] <53ef6157.qX8Csumbm2zNx/EI%fengguang.wu@intel.com>
2014-08-16 14:18 ` Arjun Sreedharan
2014-08-17 11:10 ` Tejun Heo
2014-08-17 11:27 ` Tejun Heo
2014-08-17 12:01 ` Arjun Sreedharan
2014-08-17 13:07 ` Tejun Heo
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=20140816113718.GA9305@htj.dyndns.org \
--to=tj@kernel.org \
--cc=arjun024@gmail.com \
--cc=linux-ide@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/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).