All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Mayer <markus.mayer@linaro.org>
To: Jassi Brar <jassisinghbrar@gmail.com>
Cc: Linux Kernel Mailing list <linux-kernel@vger.kernel.org>,
	Greg KH <gregkh@linuxfoundation.org>, Suman Anna <s-anna@ti.com>,
	Tony Lindgren <tony@atomide.com>,
	"Omar Ramirez Luna (omar.ramirez@copitl.com)" 
	<omar.ramirez@copitl.com>, Loic Pallardy <loic.pallardy@st.com>,
	LeyFoon Tan <lftan.linux@gmail.com>,
	Craig McGeachie <slapdau@yahoo.com.au>,
	Courtney Cavin <courtney.cavin@sonymobile.com>,
	"Rafael J. Wysocki" <rafael.j.wysocki@intel.com>,
	Rob Herring <robherring2@gmail.com>,
	Arnd Bergmann <arnd@arndb.de>,
	Josh Cartwright <joshc@codeaurora.org>,
	Linus Walleij <linus.walleij@linaro.org>,
	Kumar Gala <galak@codeaurora.org>,
	Girish K S <ks.giri@samsung.com>
Subject: Re: [PATCHv4,2/5] mailbox: Introduce framework for mailbox
Date: Mon, 31 Mar 2014 15:05:05 -0700	[thread overview]
Message-ID: <CAPdLdqkDCYS7WsgkofJt78ztGTixQ9P+gVhkJZxteQL-YvwbKQ@mail.gmail.com> (raw)
In-Reply-To: <CABb+yY3N0e3yTf=+2aqM0gWM8xcnybBWNSJxGezUC5uckAQBGg@mail.gmail.com>

On 28 March 2014 20:54, Jassi Brar <jassisinghbrar@gmail.com> wrote:
> On Sat, Mar 29, 2014 at 3:38 AM, Markus Mayer <markus.mayer@linaro.org> wrote:
>
> .....
>
>>> +int mbox_send_message(struct mbox_chan *chan, void *mssg)
>>> +{
>>> +     int t;
>>> +
>>> +     if (!chan || !chan->cl)
>>> +             return -EINVAL;
>>> +
>>> +     t = _add_to_rbuf(chan, mssg);
>>> +     if (t < 0) {
>>> +             pr_err("Try increasing MBOX_TX_QUEUE_LEN\n");
>>> +             return t;
>>> +     }
>>> +
>>> +     _msg_submit(chan);
>>> +
>>> +     if (chan->txdone_method == TXDONE_BY_POLL)
>>> +             poll_txdone((unsigned long)chan->con);
>>
>> Wouldn't it be cleaner to use
>>                 poll_txdone((unsigned long)&chan->con);
>> ?
>>
> Here's how we use it ...
>
> static void poll_txdone(unsigned long data)
> {
>      struct mbox_con *con = (struct mbox_con *)data;
>      .....
> }
>
> To me, unnecessarily passing a pointer to a pointer seems unclean.

You are right. I didn't look closely enough.

Regards,
-Markus

  reply	other threads:[~2014-03-31 22:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-03-18 18:42 [PATCHv4 0/5] Common Mailbox Framework Jassi Brar
2014-03-18 18:44 ` [PATCHv4 1/5] mailbox: rename pl320-ipc specific mailbox.h Jassi Brar
2014-03-18 18:45 ` [PATCHv4 2/5] mailbox: Introduce framework for mailbox Jassi Brar
2014-03-19  4:00   ` Girish KS
2014-03-19  5:20     ` Jassi Brar
2014-03-19  6:02       ` Girish KS
2014-03-28 22:08   ` [PATCHv4,2/5] " Markus Mayer
2014-03-29  3:54     ` Jassi Brar
2014-03-31 22:05       ` Markus Mayer [this message]
2014-03-18 18:45 ` [PATCHv4 3/5] mailbox: pl320: Introduce common API driver Jassi Brar
2014-03-18 19:10   ` Rob Herring
2014-03-19  5:40     ` Jassi Brar
2014-03-18 18:46 ` [PATCHv4 4/5] mailbox: Fix TX completion init Jassi Brar
2014-03-18 18:46 ` [PATCHv4 5/5] mailbox: Fix deleteing poll timer Jassi Brar
2014-03-27 22:51 ` [PATCHv4 1/5] mailbox: rename pl320-ipc specific mailbox.h Markus Mayer
2014-03-29  3:55   ` Jassi Brar

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=CAPdLdqkDCYS7WsgkofJt78ztGTixQ9P+gVhkJZxteQL-YvwbKQ@mail.gmail.com \
    --to=markus.mayer@linaro.org \
    --cc=arnd@arndb.de \
    --cc=courtney.cavin@sonymobile.com \
    --cc=galak@codeaurora.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=jassisinghbrar@gmail.com \
    --cc=joshc@codeaurora.org \
    --cc=ks.giri@samsung.com \
    --cc=lftan.linux@gmail.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=loic.pallardy@st.com \
    --cc=omar.ramirez@copitl.com \
    --cc=rafael.j.wysocki@intel.com \
    --cc=robherring2@gmail.com \
    --cc=s-anna@ti.com \
    --cc=slapdau@yahoo.com.au \
    --cc=tony@atomide.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.