linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Himangi Saraogi <himangi774@gmail.com>
Cc: linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	julia.lawall@lip6.fr
Subject: Re: [PATCH] Input: Introduce the use of the managed version of kzalloc
Date: Thu, 8 May 2014 09:04:19 -0700	[thread overview]
Message-ID: <20140508160419.GB11672@core.coreip.homeip.net> (raw)
In-Reply-To: <20140507044638.GA3447@himangi-Dell>

Hi Himangi,

On Wed, May 07, 2014 at 10:16:38AM +0530, Himangi Saraogi wrote:
> This patch moves data allocated using kzalloc to managed data allocated
> using devm_kzalloc and cleans now unnecessary kfrees in probe and remove
> functions.

I prefer not to mix managed and unmanaged resources in one driver. I.e.
either all (or most) resources are managed or they are all unmanaged,
otherwise it is really hard to track which one should be freed and
which will be freed automatically.

In this very simple driver I do not see converting only memory
allocation to devm as bringing clear benefit,

Thanks.

-- 
Dmitry

  reply	other threads:[~2014-05-08 16:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-07  4:46 [PATCH] Input: Introduce the use of the managed version of kzalloc Himangi Saraogi
2014-05-08 16:04 ` Dmitry Torokhov [this message]
  -- strict thread matches above, loose matches on Subject: below --
2014-05-16 19:28 Himangi Saraogi

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=20140508160419.GB11672@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=himangi774@gmail.com \
    --cc=julia.lawall@lip6.fr \
    --cc=linux-input@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).