All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Rasesh Mody <rmody@brocade.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>,
	Adapter Linux Open SRC Team
	<adapter_linux_open_src_team@brocade.com>
Subject: Re: [patch] bna: fix error handling of bnad_get_flash_partition_by_offset()
Date: Fri, 10 Feb 2012 07:15:34 +0000	[thread overview]
Message-ID: <20120210071534.GE4204@mwanda> (raw)
In-Reply-To: <E5313AF6F2BFD14293E5FD0F94750F86B1FB8B0A20@HQ1-EXCH01.corp.brocade.com>

[-- Attachment #1: Type: text/plain, Size: 1142 bytes --]

On Thu, Feb 09, 2012 at 05:53:20PM -0800, Rasesh Mody wrote:
> >From: Dan Carpenter [mailto:dan.carpenter@oracle.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


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Rasesh Mody <rmody@brocade.com>
Cc: "netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"kernel-janitors@vger.kernel.org"
	<kernel-janitors@vger.kernel.org>,
	Adapter Linux Open SRC Team
	<adapter_linux_open_src_team@brocade.com>
Subject: Re: [patch] bna: fix error handling of bnad_get_flash_partition_by_offset()
Date: Fri, 10 Feb 2012 10:15:34 +0300	[thread overview]
Message-ID: <20120210071534.GE4204@mwanda> (raw)
In-Reply-To: <E5313AF6F2BFD14293E5FD0F94750F86B1FB8B0A20@HQ1-EXCH01.corp.brocade.com>

[-- Attachment #1: Type: text/plain, Size: 1142 bytes --]

On Thu, Feb 09, 2012 at 05:53:20PM -0800, Rasesh Mody wrote:
> >From: Dan Carpenter [mailto:dan.carpenter@oracle.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


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 836 bytes --]

  reply	other threads:[~2012-02-10  7:15 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-02-09 10:49 [patch] bna: fix error handling of bnad_get_flash_partition_by_offset() Dan Carpenter
2012-02-09 10:49 ` Dan Carpenter
2012-02-09 20:43 ` David Miller
2012-02-09 20:43   ` David Miller
2012-02-10  1:53 ` Rasesh Mody
2012-02-10  1:53   ` Rasesh Mody
2012-02-10  7:15   ` Dan Carpenter [this message]
2012-02-10  7:15     ` Dan Carpenter
2012-02-10 22:38     ` Rasesh Mody
2012-02-10 22:38       ` Rasesh Mody

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=20120210071534.GE4204@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=adapter_linux_open_src_team@brocade.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=rmody@brocade.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.