From: Dave Goodell <dgoodell@cisco.com>
To: Insu Yun <wuninsu@gmail.com>
Cc: "umalhi@cisco.com" <umalhi@cisco.com>,
"dledford@redhat.com" <dledford@redhat.com>,
"sean.hefty@intel.com" <sean.hefty@intel.com>,
"hal.rosenstock@gmail.com" <hal.rosenstock@gmail.com>,
"linux-rdma@vger.kernel.org" <linux-rdma@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"taesoo@gatech.edu" <taesoo@gatech.edu>,
"yeongjin.jang@gatech.edu" <yeongjin.jang@gatech.edu>,
"insu@gatech.edu" <insu@gatech.edu>
Subject: Re: [PATCH] usnic: corretly check failed allocation
Date: Thu, 15 Oct 2015 15:52:32 -0500 [thread overview]
Message-ID: <20151015205232.GA70439@DGOODELL-M-F02A.cisco.com> (raw)
In-Reply-To: <CAGoFzNdD+b1co+6zsEo94KP3APLk353fwOQkgdMjh01UOG-9Ng@mail.gmail.com>
On Thu, Oct 15, 2015 at 01:41:06PM -0400, Insu Yun wrote:
> On Thu, Oct 15, 2015 at 1:17 PM, Dave Goodell (dgoodell) <dgoodell@cisco.com
> > wrote:
>
> > On Oct 15, 2015, at 11:27 AM, Insu Yun <wuninsu@gmail.com> wrote:
> > >
> > > us_ibdev->ufdev = usnic_fwd_dev_alloc(dev);
> > > - if (IS_ERR_OR_NULL(us_ibdev->ufdev)) {
> > > + if (!us_ibdev->ufdev) {
> > > usnic_err("Failed to alloc ufdev for %s with err %ld\n",
> > > pci_name(dev), PTR_ERR(us_ibdev->ufdev));
> >
> > This PTR_ERR and message make less sense now.
> >
>
> Do you think what is better? removing error code? or change
> PTR_ERR(us_ibdev->ufdev)
> to -EFAULT
I would write it as:
usnic_err("Failed to alloc ufdev for %s\n", pci_name(dev));
-Dave
prev parent reply other threads:[~2015-10-15 20:53 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-10-15 16:27 Insu Yun
2015-10-15 17:17 ` Dave Goodell (dgoodell)
[not found] ` <CAGoFzNdD+b1co+6zsEo94KP3APLk353fwOQkgdMjh01UOG-9Ng@mail.gmail.com>
2015-10-15 20:52 ` Dave Goodell [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=20151015205232.GA70439@DGOODELL-M-F02A.cisco.com \
--to=dgoodell@cisco.com \
--cc=dledford@redhat.com \
--cc=hal.rosenstock@gmail.com \
--cc=insu@gatech.edu \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rdma@vger.kernel.org \
--cc=sean.hefty@intel.com \
--cc=taesoo@gatech.edu \
--cc=umalhi@cisco.com \
--cc=wuninsu@gmail.com \
--cc=yeongjin.jang@gatech.edu \
/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
all inboxes | Powered by JetHome®