[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20120210071534.GE4204@mwanda>
Date: Fri, 10 Feb 2012 10:15:34 +0300
From: Dan Carpenter <dan.carpenter@...cle.com>
To: Rasesh Mody <rmody@...cade.com>
Cc: "netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"kernel-janitors@...r.kernel.org" <kernel-janitors@...r.kernel.org>,
Adapter Linux Open SRC Team
<adapter_linux_open_src_team@...cade.com>
Subject: Re: [patch] bna: fix error handling of
bnad_get_flash_partition_by_offset()
On Thu, Feb 09, 2012 at 05:53:20PM -0800, Rasesh Mody wrote:
> >From: Dan Carpenter [mailto:dan.carpenter@...cle.com]
> >Sent: Thursday, February 09, 2012 2:50 AM
> >
> >The current error handling doesn't work because we flash_part is a u32
> >so the checks for negative error codes don't work. I considered making
> >things signed but I don't know the hardware enough to say if that's a
> >problem. Really, we don't use the error codes so just returning zero
> >for all problems is fine.
>
> Hi Dan,
>
> We can't return 0 from the bnad_get_flash_partition_by_offset() on
> error as the flash partition 0 is a optrom partition. Also we got
> comments to return proper Linux error codes as ethtool application
> expects so.
It's already treated as an error. A return value of zero means the
user gets a return value of -EFAULT. I'm slightly confused by your
email.
My patch was already merged into git. Can you just send a patch
which does what you want? I don't know the subsystem well enough to
say how you want zero returns to be handled if the original code was
not correct.
regards,
dan carpenter
Download attachment "signature.asc" of type "application/pgp-signature" (837 bytes)
Powered by blists - more mailing lists