public inbox for linux-omap@vger.kernel.org
 help / color / mirror / Atom feed
From: Ionut Nicu <ionut.nicu@mindbit.ro>
To: "Sapiens, Rene" <rene.sapiens@ti.com>
Cc: Ionut Nicu <ionut.nicu@gmail.com>,
	Greg Kroah-Hartman <greg@kroah.com>,
	Omar Ramirez Luna <omar.ramirez@ti.com>,
	Fernando Guzman Lugo <x0095840@ti.com>,
	Felipe Contreras <felipe.contreras@gmail.com>,
	Andy Shevchenko <andy.shevchenko@gmail.com>,
	linux-omap <linux-omap@vger.kernel.org>
Subject: Re: [PATCH v2 07/12] staging: tidspbridge: convert pmgr to list_head
Date: Sun, 07 Nov 2010 15:39:10 +0200	[thread overview]
Message-ID: <1289137150.9931.231.camel@atlantis.mindbit.ro> (raw)
In-Reply-To: <AANLkTin7qBbn4jZrKSivPUYUAkN2cS-3cyQOeFuowUp7@mail.gmail.com>

Hi Rene,

On Fri, 2010-11-05 at 16:41 -0600, Sapiens, Rene wrote:
> Hi Ionut,
> 
> On Fri, Nov 5, 2010 at 9:13 AM, Ionut Nicu <ionut.nicu@gmail.com> wrote:
> > Convert the pmgr module of the tidspbridge driver
> > to use struct list_head instead of struct lst_list.
> 
> <snip>
> 
> > + * Memory is coalesced back to the appropriate heap when a buffer is
> 
> What is being fixed here?
> 

It was a typo (s/coelesced/coalesced/).

> >  * freed.
> >  *
> >  * Notes:
> 
> <snip>
> 
> > @@ -833,67 +768,44 @@ static void add_to_free_list(struct cmm_allocator *allocator,
> >        DBC_REQUIRE(allocator != NULL);
> >        dw_this_pa = pnode->dw_pa;
> >        dw_next_pa = NEXT_PA(pnode);
> 
> i think it would be good to return with error if !allocator or !pnode
> and remove the	resulting duplicated DBC_REQUIRE.
> 

Yeah I think pnode should be checked for null. Can allocator ever be
null?

> > -       mnode_obj = (struct cmm_mnode *)lst_first(allocator->free_list_head);
> > -       while (mnode_obj) {
> > +       list_for_each_entry(mnode_obj, &allocator->free_list, link) {
> >                if (dw_this_pa == NEXT_PA(mnode_obj)) {
> 
> <snip>
> 
> > @@ -748,18 +736,16 @@ bool dev_init(void)
> >  */
> >  int dev_notify_clients(struct dev_object *hdev_obj, u32 ret)
> >  {
> > -       int status = 0;
> > -
> >        struct dev_object *dev_obj = hdev_obj;
> > -       void *proc_obj;
> > +       struct list_head *curr;
> 
> can we add a check for !dev_obj and !dev_obj->proc_list just to be
> sure that we get always the correct pointer?
> 

proc_list isn't a pointer. Can dev_obj ever be null?

> <snip>
> 
> > @@ -947,15 +933,17 @@ int dev_insert_proc_object(struct dev_object *hdev_obj,
> >        DBC_REQUIRE(refs > 0);
> >        DBC_REQUIRE(dev_obj);
> >        DBC_REQUIRE(proc_obj != 0);
> > -       DBC_REQUIRE(dev_obj->proc_list != NULL);
> >        DBC_REQUIRE(already_attached != NULL);
> 
> can we check for !hdev_obj, !already_attached even if we have the
> DBC_REQUIRE?, maybe we can actually remove the DBC_REQUIRE that could
> be redundant after applying this.
> 

Same question here.

> > -       if (!LST_IS_EMPTY(dev_obj->proc_list))
> > +       if (!list_empty(&dev_obj->proc_list))
> >                *already_attached = true;
> 
> <snip>
> 
> > @@ -986,15 +974,12 @@ int dev_remove_proc_object(struct dev_object *hdev_obj, u32 proc_obj)
> >
> >        DBC_REQUIRE(dev_obj);
> >        DBC_REQUIRE(proc_obj != 0);
> > -       DBC_REQUIRE(dev_obj->proc_list != NULL);
> > -       DBC_REQUIRE(!LST_IS_EMPTY(dev_obj->proc_list));
> > +       DBC_REQUIRE(!list_empty(&dev_obj->proc_list));
> >
> 
>  The same comment as above.
> 

Regards,
Ionut.


  reply	other threads:[~2010-11-07 13:39 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-05 15:13 [PATCH v2 00/12] staging: tidspbridge: various cleanups Ionut Nicu
2010-11-05 15:13 ` [PATCH v2 01/12] staging: tidspbridge: remove gs memory allocator Ionut Nicu
2010-11-05 15:13 ` [PATCH v2 02/12] staging: tidspbridge: remove utildefs Ionut Nicu
2010-11-05 15:13 ` [PATCH v2 03/12] staging: tidspbridge: switch to linux bitmap API Ionut Nicu
2010-11-05 15:13 ` [PATCH v2 04/12] staging: tidspbridge: remove gb bitmap implementation Ionut Nicu
2010-11-05 15:13 ` [PATCH v2 05/12] staging: tidspbridge: rmgr/node.c code cleanup Ionut Nicu
2010-11-05 15:13 ` [PATCH v2 06/12] staging: tidspbridge: convert core to list_head Ionut Nicu
2010-11-05 21:07   ` Sapiens, Rene
2010-11-06 17:21     ` Ionut Nicu
2010-11-08 19:15       ` Sapiens, Rene
2010-11-05 22:12   ` Sapiens, Rene
2010-11-06 17:31     ` Ionut Nicu
2010-11-08 19:16       ` Sapiens, Rene
2010-11-05 15:13 ` [PATCH v2 07/12] staging: tidspbridge: convert pmgr " Ionut Nicu
2010-11-05 22:41   ` Sapiens, Rene
2010-11-07 13:39     ` Ionut Nicu [this message]
2010-11-08 19:17       ` Sapiens, Rene
2010-11-05 15:13 ` [PATCH v2 08/12] staging: tidspbridge: convert rmgr " Ionut Nicu
2010-11-06  0:07   ` Sapiens, Rene
2010-11-06 18:18     ` Ionut Nicu
2010-11-06 18:26       ` Greg KH
2010-11-07 12:11         ` Ionut Nicu
2010-11-07 14:24           ` Nishanth Menon
2010-11-07 15:59           ` Greg KH
2010-11-08 19:18       ` Sapiens, Rene
2010-11-05 15:13 ` [PATCH v2 09/12] staging: tidspbridge: remove custom linked list Ionut Nicu
2010-11-05 15:13 ` [PATCH v2 10/12] staging: tidspbridge: core code cleanup Ionut Nicu
2010-11-05 15:13 ` [PATCH v2 11/12] staging: tidspbridge: pmgr " Ionut Nicu
2010-11-05 15:13 ` [PATCH v2 12/12] staging: tidspbridge: rmgr " Ionut Nicu
2010-11-05 15:43 ` [PATCH v2 00/12] staging: tidspbridge: various cleanups Greg KH
2010-11-05 16:02   ` Ionut Nicu

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=1289137150.9931.231.camel@atlantis.mindbit.ro \
    --to=ionut.nicu@mindbit.ro \
    --cc=andy.shevchenko@gmail.com \
    --cc=felipe.contreras@gmail.com \
    --cc=greg@kroah.com \
    --cc=ionut.nicu@gmail.com \
    --cc=linux-omap@vger.kernel.org \
    --cc=omar.ramirez@ti.com \
    --cc=rene.sapiens@ti.com \
    --cc=x0095840@ti.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