linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Leo Yan <leo.yan@linaro.org>
To: Paul Bolle <pebolle@tiscali.nl>
Cc: Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will.deacon@arm.com>,
	Jassi Brar <jassisinghbrar@gmail.com>,
	Wei Xu <xuwei5@hisilicon.com>,
	Bintian Wang <bintian.wang@huawei.com>,
	Haojian Zhuang <haojian.zhuang@linaro.org>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Guodong Xu <guodong.xu@linaro.org>,
	Jian Zhang <zhangjian001@hisilicon.com>,
	Zhenwei Wang <Zhenwei.wang@hisilicon.com>,
	Haoju Mo <mohaoju@hisilicon.com>,
	Dan Zhao <dan.zhao@hisilicon.com>,
	kongfei@hisilicon.com, Guangyue Zeng <zengguangyue@hisilicon.com>
Subject: Re: [RFC PATCH 2/3] mailbox: Hisilicon: add mailbox driver
Date: Tue, 4 Aug 2015 16:49:30 +0800	[thread overview]
Message-ID: <20150804084930.GA27609@leoy-linaro> (raw)
In-Reply-To: <1438677024.8734.24.camel@tiscali.nl>

Hi Paul,

On Tue, Aug 04, 2015 at 10:30:24AM +0200, Paul Bolle wrote:
> (This RFC was part of this mornings catch of my crude mail filter. So,
> for what it's worth, what follows are a few random comments for the few
> things I'm able to spot.)
> 
> On ma, 2015-08-03 at 09:13 +0800, Leo Yan wrote:
> > --- /dev/null
> > +++ b/drivers/mailbox/hisilicon/Kconfig
> 
> > +config HISI_MBOX
> > +	bool "Hisilicon's Mailbox"
> > +	depends on ARCH_HISI || OF
> 
> ARCH_HISI is available on either ARM64 or ARM. ARM64 selects OF. On ARM
> ARCH_HISI depends on ARCH_MULTIV7 which depends on ARCH_MULTIPLATFORM.
> That selects USE_OF which on its turn selects OF.
> 
> So, HISI_MBOX implies OF, correct?

Exactly, will simply use "depends on ARCH_HISI".

> > +	help
> > +	  Support for mailbox drivers on Hisilicon series of SoCs.
> > +
> > +config HI6220_MBOX
> > +	tristate "Hi6220 Mailbox Controller"
> > +	depends on HISI_MBOX
> > +	help
> > +	  An implementation of the hi6220 mailbox. It is used to send message
> > +	  between application processors and MCU. Say Y here if you want to build
> > +	  the Hi6220 mailbox controller driver.
> 
> > --- /dev/null
> > +++ b/drivers/mailbox/hisilicon/common.c
> 
> > +int hisi_mbox_register(struct hisi_mbox_hw *mbox_hw)
> > +{
> > +	[...]
> > +
> > +	mbox->chan = devm_kzalloc(dev,
> > +		mbox_hw->chan_num * sizeof(struct mbox_chan), GFP_KERNEL);
> > +	if (!mbox)
> 
> 	if (!mbox->chan)

Will fix.

> > +		return -ENOMEM;
> > +
> > +	[...]
> > +}
> 
> > --- /dev/null
> > +++ b/drivers/mailbox/hisilicon/hi6220-mailbox.c
> 
> > +static struct platform_driver hi6220_mbox_driver = {
> > +	.driver = {
> > +		[...]
> > +		.of_match_table = of_match_ptr(hi6220_mbox_of_match),
> 
> of_match_ptr(x) becomes NULL when CONFIG_OF is not defined. But I think
> CONFIG_OF will always be defined, see above. So of_match_ptr() isn't per
> se needed.

Will fix.

> > +	},
> > +	[...]
> > +};
> 
> > +static int __init hi6220_mbox_init(void)
> > +{
> > +	return platform_driver_register(&hi6220_mbox_driver);
> > +}
> > +module_init(hi6220_mbox_init);
> > +
> > +static void __exit hi6220_mbox_exit(void)
> > +{
> > +	platform_driver_unregister(&hi6220_mbox_driver);
> > +}
> > +module_exit(hi6220_mbox_exit);
> 
> This could be flattened into one line:
>     module_platform_driver(hi6220_mbox_driver);

Will refine. And thanks a lot for your review.

Thanks,
Leo Yan

  reply	other threads:[~2015-08-04  8:49 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-03  1:13 [RFC PATCH 0/3] mailbox: hisilicon: add mailbox driver Leo Yan
2015-08-03  1:13 ` [RFC PATCH 1/3] dt-bindings: mailbox: Document Hisilicon " Leo Yan
2015-08-03  1:13 ` [RFC PATCH 2/3] mailbox: Hisilicon: add " Leo Yan
2015-08-04  8:30   ` Paul Bolle
2015-08-04  8:49     ` Leo Yan [this message]
2015-08-04  9:00       ` Leo Yan
2015-08-04  9:17       ` Paul Bolle
2015-08-04  9:56         ` Leo Yan
2015-08-03  1:13 ` [RFC PATCH 3/3] arm64: dts: add Hi6220 mailbox node Leo Yan
2015-08-05 10:52 ` [RFC PATCH 0/3] mailbox: hisilicon: add mailbox driver Jassi Brar
2015-08-05 23:17   ` Leo Yan
2015-08-10  7:02     ` Jassi Brar
2015-08-10  8:52       ` Leo Yan

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=20150804084930.GA27609@leoy-linaro \
    --to=leo.yan@linaro.org \
    --cc=Zhenwei.wang@hisilicon.com \
    --cc=bintian.wang@huawei.com \
    --cc=catalin.marinas@arm.com \
    --cc=dan.zhao@hisilicon.com \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=guodong.xu@linaro.org \
    --cc=haojian.zhuang@linaro.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=jassisinghbrar@gmail.com \
    --cc=kongfei@hisilicon.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mohaoju@hisilicon.com \
    --cc=pawel.moll@arm.com \
    --cc=pebolle@tiscali.nl \
    --cc=robh+dt@kernel.org \
    --cc=will.deacon@arm.com \
    --cc=xuwei5@hisilicon.com \
    --cc=zengguangyue@hisilicon.com \
    --cc=zhangjian001@hisilicon.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;
as well as URLs for NNTP newsgroup(s).