mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Rushikesh S Kadam <rushikesh.s.kadam@intel.com>,
	Nick Crews <ncrews@chromium.org>
Cc: Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	benjamin.tissoires@redhat.com, jikos@kernel.org,
	jettrink@chromium.org, Gwendal Grignou <gwendal@google.com>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	linux-input@vger.kernel.org
Subject: Re: [PATCH v3] HID: intel-ish-hid: ISH firmware loader client driver
Date: Sat, 30 Mar 2019 09:27:32 -0700	[thread overview]
Message-ID: <e2d8ab93c97acf1254830e6f51edb8f19c8767d6.camel@perches.com> (raw)
In-Reply-To: <20190330102230.GB19202@intel.com>

On Sat, 2019-03-30 at 15:52 +0530, Rushikesh S Kadam wrote:
> On Fri, Mar 29, 2019 at 04:30:18PM -0700, Nick Crews wrote:
> > On Fri, Mar 29, 2019 at 1:03 PM Rushikesh S Kadam
> > <rushikesh.s.kadam@intel.com> wrote:
> > > +       ldr_xfer_ipc_frag = kzalloc(LOADER_SHIM_IPC_BUF_SIZE, GFP_KERNEL);
> > > +       if (!ldr_xfer_ipc_frag) {
> > Log error here.
> The error code is logged in calling function
> load_fw_from_host(). Is that good enough?
> 
> I believe the checkpatch script too, would
> recommend against adding debug print for ENOMEM
> error.

The generic kernel allocation functions already do
a dump_stack() on OOM conditions when called without
__GFP_NOWARN so any additional OOM message isn't
particularly useful.

> Again, I thought it was against practise to log
> "out of memory" debug prints in probe()

Or anywhere else given the generic OOM stack dump.

> But will add if you tell me this is the right way.
> 
> > > +               return -ENOMEM;
> > > +
> > > +       loader_ishtp_cl = ishtp_cl_allocate(cl_device);
> > > +       if (!loader_ishtp_cl)
> > 
> > log error here

The ishtp_cl_allocate function just calls kmalloc then
initializes the struct so an additional OOM message
isn't useful here either.



  reply	other threads:[~2019-03-30 16:27 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-29 20:03 Rushikesh S Kadam
2019-03-29 23:30 ` Nick Crews
2019-03-30 10:22   ` Rushikesh S Kadam
2019-03-30 16:27     ` Joe Perches [this message]
2019-04-01 21:17       ` Nick Crews
2019-04-02  4:22         ` Rushikesh S Kadam

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=e2d8ab93c97acf1254830e6f51edb8f19c8767d6.camel@perches.com \
    --to=joe@perches.com \
    --cc=benjamin.tissoires@redhat.com \
    --cc=gwendal@google.com \
    --cc=jettrink@chromium.org \
    --cc=jikos@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=ncrews@chromium.org \
    --cc=rushikesh.s.kadam@intel.com \
    --cc=srinivas.pandruvada@linux.intel.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

all inboxes | Powered by JetHome®