lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 23 Jul 2014 16:26:49 +0100
From:	Lee Jones <lee.jones@...aro.org>
To:	Jassi Brar <jaswinder.singh@...aro.org>
Cc:	Devicetree List <devicetree@...r.kernel.org>,
	lkml <linux-kernel@...r.kernel.org>,
	"ks.giri@...sung.com" <ks.giri@...sung.com>,
	Arnd Bergmann <arnd@...db.de>, ijc@...lion.org.uk,
	Mark Rutland <mark.rutland@....com>, robh@...nel.org,
	Pawel Moll <pawel.moll@....com>,
	Courtney Cavin <courtney.cavin@...ymobile.com>,
	Matt Porter <mporter@...aro.org>,
	Craig McGeachie <slapdau@...oo.com.au>,
	LeyFoon Tan <lftan.linux@...il.com>,
	Loic Pallardy <loic.pallardy@...com>,
	"Anna, Suman" <s-anna@...com>,
	Ashwin Chaugule <ashwin.chaugule@...aro.org>,
	Bjorn Andersson <bjorn@...o.se>,
	Patch Tracking <patches@...aro.org>,
	Tetsuya Takinishi <t.takinishi@...fujitsu.com>,
	Mark Brown <broonie@...aro.org>,
	Kevin Hilman <khilman@...aro.org>,
	Mollie Wu <mollie.wu@...aro.org>,
	Andy Green <andy.green@...aro.org>
Subject: Re: [PATCHv9 2/4] mailbox: Introduce framework for mailbox

On Wed, 23 Jul 2014, Jassi Brar wrote:
> On 23 July 2014 14:24, Lee Jones <lee.jones@...aro.org> wrote:
> > On Wed, 23 Jul 2014, Jassi Brar wrote:
> >> Introduce common framework for client/protocol drivers and
> >> controller drivers of Inter-Processor-Communication (IPC).
> >>
> >> Client driver developers should have a look at
> >>  include/linux/mailbox_client.h to understand the part of
> >> the API exposed to client drivers.
> >> Similarly controller driver developers should have a look
> >> at include/linux/mailbox_controller.h
> >>
> >> Signed-off-by: Jassi Brar <jaswinder.singh@...aro.org>
> >> ---
> >>  MAINTAINERS                        |   8 +
> >>  drivers/mailbox/Makefile           |   4 +
> >>  drivers/mailbox/mailbox.c          | 467 +++++++++++++++++++++++++++++++++++++
> >>  include/linux/mailbox_client.h     |  45 ++++
> >>  include/linux/mailbox_controller.h | 131 +++++++++++
> >>  5 files changed, 655 insertions(+)
> >>  create mode 100644 drivers/mailbox/mailbox.c
> >>  create mode 100644 include/linux/mailbox_client.h
> >>  create mode 100644 include/linux/mailbox_controller.h

[...]

> >> diff --git a/drivers/mailbox/mailbox.c b/drivers/mailbox/mailbox.c
> >> new file mode 100644
> >> index 0000000..99c0d23
> >> --- /dev/null
> >> +++ b/drivers/mailbox/mailbox.c
> >> @@ -0,0 +1,467 @@
> >> +/*
> >> + * Mailbox: Common code for Mailbox controllers and users
> >> + *
> >> + * Copyright (C) 2013-2014 Linaro Ltd.
> >> + * Author: Jassi Brar <jassisinghbrar@...il.com>
> >
> > (C) Linaro, but you've supplied your Gmail?
> >
> I don't understand how that's a problem. Is it?
> I always try to post from my Linaro id still.

I don't know to be honest.  I always use my Linaro address when using
Linaro's time (and sometimes when I'm using my own), and plan to
s/linaro.org/gmail.com when/if I move on.  Not sure if there's even a
policy on this, just thought I'd mention it.

[...]

> >> +     if (!dev || !dev->of_node) {
> >> +             pr_debug("%s: No owner device node\n", __func__);
> >
> > Are you sure you want all of this debug prints in the final version?
> >
> pr_debug is as good as absent unless DEBUG is defined

I'm more concerned with how the code looks than the system log, but if
think it will be useful to someone, by all means keep it in.

[...]

> >> +     if (chan->txdone_method == (TXDONE_BY_POLL | TXDONE_BY_ACK))
> >> +             chan->txdone_method = TXDONE_BY_POLL;
> >
> > Unless you're leaving it there for clarity, you can drop the
> > "TXDONE_BY_POLL |" from if().
> >
> We need to check for both.

What I'm trying to get at is; if it's already TXDONE_BY_POLL, there is no
need to set it to TXDONE_BY_POLL.

[...]

> >> +++ b/include/linux/mailbox_controller.h
> >> @@ -0,0 +1,131 @@
> >> +/*
> >> + * This program is free software; you can redistribute it and/or modify
> >> + * it under the terms of the GNU General Public License version 2 as
> >> + * published by the Free Software Foundation.
> >> + */
> >> +
> >> +#ifndef __MAILBOX_CONTROLLER_H
> >> +#define __MAILBOX_CONTROLLER_H
> >> +
> >> +#include <linux/of.h>
> >
> > completion.h
> > device.h
> > timer.h
> >
> > Etc.
> >
> And what else? :)

I'm not going to do all the work for you Jassi. ;)

(Actually, that's as far as I got.  It was more a hint for you to look
to see _if_ there are any others to add, not to say that there were.)

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ