From: David Cohen <david.a.cohen@linux.intel.com>
To: Joe Perches <joe@perches.com>
Cc: broonie@kernel.org, ning.li@intel.com,
linux-kernel@vger.kernel.org, linux-spi@vger.kernel.org,
Fei Yang <fei.yang@intel.com>
Subject: Re: [PATCH 1/2] spi: add Intel Mid SSP driver
Date: Tue, 29 Oct 2013 11:30:44 -0700 [thread overview]
Message-ID: <526FFED4.4070902@linux.intel.com> (raw)
In-Reply-To: <1383070766.12439.13.camel@joe-AO722>
Hi Joe,
On 10/29/2013 11:19 AM, Joe Perches wrote:
> On Tue, 2013-10-29 at 11:05 -0700, David Cohen wrote:
>> This patch adds driver for ssp spi interface on Intel Mid platform.
>
> A few simple notes:
>
> Please consider using checkpatch.
I did and got no warnings. But haven't used --strict option.
>
>> ---
>> drivers/spi/Kconfig | 12 +
>> drivers/spi/Makefile | 1 +
>> drivers/spi/spi-intel-mid-ssp.c | 1506 +++++++++++++++++++++++++++++++++
>> include/linux/spi/intel_mid_ssp_spi.h | 330 ++++++++
>
> Shouldn't this include file be in the drivers/spi directory?
I can't be. This header file will be needed by Intel MID platform code
located under arch/x86/platform/intel-mid/ directory.
>
> []
>
>> diff --git a/drivers/spi/spi-intel-mid-ssp.c b/drivers/spi/spi-intel-mid-ssp.c
> []
>> +#ifdef DUMP_RX
>> +static void dump_trailer(const struct device *dev, char *buf, int len, int sz)
>> +{
>
> You could save a couple of later #ifdefs by
> moving the #ifdef inside the function
I can do that.
>
> static void dump_trailer(etc)
> {
> #ifdef DUMP_RX
> ...
> #endif
> }
>
>> +static int map_dma_buffers(struct ssp_drv_context *sspc)
>> +{
> []
>> +#ifdef DUMP_RX
>> + dump_trailer(&sspc->pdev->dev, sspc->tx, sspc->len, 16);
>> +#endif
>
>> +static void int_transfer_complete(struct ssp_drv_context *sspc)
>> +{
> []
>> +#ifdef DUMP_RX
>> + dump_trailer(dev, sspc->rx, sspc->len, 16);
>> +#endif
>
>> +static int setup(struct spi_device *spi)
>> +{
> []
>> + if (!chip) {
>> + chip = kzalloc(sizeof(struct chip_data), GFP_KERNEL);
>> + if (!chip) {
>> + dev_err(&spi->dev,
>> + "failed setup: can't allocate chip data\n");
>
> OOM messages aren't necessary as a generic OOM message
> is already emitted along with a dump_stack();
So I'll remove the message.
Thanks for your feedback. A new version is coming soon.
Br, David Cohen
next prev parent reply other threads:[~2013-10-29 18:26 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-10-29 18:05 [PATCH 1/2] spi: add Intel Mid SSP driver David Cohen
2013-10-29 18:05 ` [PATCH 2/2] MAINTAINERS: add Intel MID SSP SPI maintainers David Cohen
2013-10-29 18:20 ` Joe Perches
2013-10-29 18:33 ` David Cohen
2013-10-29 18:57 ` Mark Brown
2013-10-29 18:19 ` [PATCH 1/2] spi: add Intel Mid SSP driver Joe Perches
2013-10-29 18:30 ` David Cohen [this message]
2013-10-29 18:35 ` Joe Perches
2013-10-29 19:32 ` David Cohen
2013-10-29 19:38 ` Joe Perches
2013-10-29 20:28 ` [PATCH] checkpatch: Improve "return is not a function" test Joe Perches
2013-10-31 23:12 ` [PATCH V2] " Joe Perches
2013-11-01 1:03 ` David Cohen
2013-11-04 22:21 ` Andrew Morton
2013-11-04 22:24 ` Joe Perches
2013-10-29 18:29 ` [PATCH 1/2] spi: add Intel Mid SSP driver Randy Dunlap
2013-10-29 18:35 ` David Cohen
2013-10-29 18:31 ` Felipe Balbi
2013-10-29 20:18 ` David Cohen
2013-10-30 3:26 ` Ning Li
2013-10-29 18:56 ` Mark Brown
2013-10-29 20:08 ` David Cohen
2013-10-30 1:42 ` Randy Dunlap
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=526FFED4.4070902@linux.intel.com \
--to=david.a.cohen@linux.intel.com \
--cc=broonie@kernel.org \
--cc=fei.yang@intel.com \
--cc=joe@perches.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-spi@vger.kernel.org \
--cc=ning.li@intel.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