All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mark Brown <broonie-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
To: Eddie James <eajames-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org>
Cc: linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	joel-U3u1mxZcP9KHXe+LvDLADg@public.gmane.org,
	andrew-zrmu5oMJ5Fs@public.gmane.org
Subject: Re: [PATCH] spi: Add FSI-attached SPI controller driver
Date: Thu, 30 Jan 2020 14:46:09 +0000	[thread overview]
Message-ID: <20200130144609.GD6682@sirena.org.uk> (raw)
In-Reply-To: <1580328504-436-1-git-send-email-eajames-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1133 bytes --]

On Wed, Jan 29, 2020 at 02:08:24PM -0600, Eddie James wrote:

Overall this looks good, some comments below but they're all fairly
minor.

> +++ b/drivers/spi/spi-fsi.c
> @@ -0,0 +1,547 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/*
> + * Copyright (C) IBM Corporation 2020
> + */

Please make the entire comment a C++ one so things look more
intentional.

> +
> +static int fsi_spi_data_in(u64 in, u8 *rx, int len)
> +{
> +	int i;
> +	int num_bytes = len > 8 ? 8 : len;

Please write normal conditional statements to improve legibility, the
ternery operator isn't really needed here.

> +static int fsi_spi_reset(struct fsi_spi *ctx)
> +{
> +	int rc;
> +
> +	dev_info(ctx->dev, "Resetting SPI controller.\n");

This should be lowered to dev_dbg() at most, it's not really adding
anything otherwise.

> +static int fsi_spi_remove(struct device *dev)
> +{
> +	return 0;
> +}

Remove empty functions, if they can safely be empty then it should be
possible to omit them.

> +static const struct fsi_device_id fsi_spi_ids[] = {
> +	{ FSI_ENGID_SPI, FSI_VERSION_ANY },
> +	{ }
> +};

This needs a MODULE_DEVICE_TABLE annotation.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

WARNING: multiple messages have this Message-ID (diff)
From: Mark Brown <broonie@kernel.org>
To: Eddie James <eajames@linux.ibm.com>
Cc: linux-spi@vger.kernel.org, linux-kernel@vger.kernel.org,
	joel@jms.id.au, andrew@aj.id.au
Subject: Re: [PATCH] spi: Add FSI-attached SPI controller driver
Date: Thu, 30 Jan 2020 14:46:09 +0000	[thread overview]
Message-ID: <20200130144609.GD6682@sirena.org.uk> (raw)
In-Reply-To: <1580328504-436-1-git-send-email-eajames@linux.ibm.com>

[-- Attachment #1: Type: text/plain, Size: 1133 bytes --]

On Wed, Jan 29, 2020 at 02:08:24PM -0600, Eddie James wrote:

Overall this looks good, some comments below but they're all fairly
minor.

> +++ b/drivers/spi/spi-fsi.c
> @@ -0,0 +1,547 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/*
> + * Copyright (C) IBM Corporation 2020
> + */

Please make the entire comment a C++ one so things look more
intentional.

> +
> +static int fsi_spi_data_in(u64 in, u8 *rx, int len)
> +{
> +	int i;
> +	int num_bytes = len > 8 ? 8 : len;

Please write normal conditional statements to improve legibility, the
ternery operator isn't really needed here.

> +static int fsi_spi_reset(struct fsi_spi *ctx)
> +{
> +	int rc;
> +
> +	dev_info(ctx->dev, "Resetting SPI controller.\n");

This should be lowered to dev_dbg() at most, it's not really adding
anything otherwise.

> +static int fsi_spi_remove(struct device *dev)
> +{
> +	return 0;
> +}

Remove empty functions, if they can safely be empty then it should be
possible to omit them.

> +static const struct fsi_device_id fsi_spi_ids[] = {
> +	{ FSI_ENGID_SPI, FSI_VERSION_ANY },
> +	{ }
> +};

This needs a MODULE_DEVICE_TABLE annotation.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  parent reply	other threads:[~2020-01-30 14:46 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-29 20:08 [PATCH] spi: Add FSI-attached SPI controller driver Eddie James
2020-01-29 20:08 ` Eddie James
     [not found] ` <1580328504-436-1-git-send-email-eajames-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org>
2020-01-30 14:46   ` Mark Brown [this message]
2020-01-30 14:46     ` Mark Brown
2020-01-30 15:32     ` Eddie James
2020-01-30 16:37   ` Andy Shevchenko
2020-01-30 16:37     ` Andy Shevchenko
2020-02-03 20:33     ` Eddie James
     [not found]       ` <29f6cc86-69ca-bc88-b6ae-2b1a24c0dae3-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2020-02-04 11:02         ` Andy Shevchenko
2020-02-04 11:02           ` Andy Shevchenko
     [not found]           ` <CAHp75Vf3NCkbw39E+d_nf+AyViG2o-u5HxrCjXXmbGk4LaFLog-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-02-04 16:06             ` Eddie James
2020-02-04 16:06               ` Eddie James
     [not found]               ` <744f0019-8656-eec1-cb9a-7e70cd042587-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org>
2020-02-05 15:51                 ` Andy Shevchenko
2020-02-05 15:51                   ` Andy Shevchenko
     [not found]                   ` <CAHp75VfOM5Rd3LRBtvyT96G=+J4KxTRoSVUcQTj+RxrGyZMMnQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-02-07 19:28                     ` Eddie James
2020-02-07 19:28                       ` Eddie James
     [not found]                       ` <90973143-bd0a-33cf-9eb8-a83be1a9b415-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2020-02-07 19:39                         ` Andy Shevchenko
2020-02-07 19:39                           ` Andy Shevchenko
     [not found]                           ` <CAHp75Vf6HJw=SpK9_HUgcMaaabs5pZEybP4SS-gc1wz5GRcqeg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-02-07 20:04                             ` Eddie James
2020-02-07 20:04                               ` Eddie James
     [not found]                               ` <cd8a7279-beb2-39e6-58e6-6ea505665547-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2020-02-07 20:34                                 ` Andy Shevchenko
2020-02-07 20:34                                   ` Andy Shevchenko
     [not found]                                   ` <CAHp75VdO2+Kkgo1Nv3EJXTMqP6Y7XgLVXtRvURk6Zz0p=R9zNQ-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-02-07 20:59                                     ` Eddie James
2020-02-07 20:59                                       ` Eddie James
     [not found]                                       ` <ca8a832e-ceeb-3ce1-9807-96ee41e0f166-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2020-02-07 22:04                                         ` Andy Shevchenko
2020-02-07 22:04                                           ` Andy Shevchenko
     [not found]                                           ` <CAHp75VduJn=kMuriGNAGk1ZrL4b2LpqEn5c8AC=PHFKrgoz=vg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-02-10 20:05                                             ` Eddie James
2020-02-10 20:05                                               ` Eddie James
2020-02-10 20:33                                               ` Andy Shevchenko
     [not found]                                                 ` <CAHp75VfpRV7UDMpPKo8Vu1PaOfLjUG24yUdkg8ip9=923cwarA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2020-02-10 20:50                                                   ` Eddie James
2020-02-10 20:50                                                     ` Eddie James

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=20200130144609.GD6682@sirena.org.uk \
    --to=broonie-dgejt+ai2ygdnm+yrofe0a@public.gmane.org \
    --cc=andrew-zrmu5oMJ5Fs@public.gmane.org \
    --cc=eajames-tEXmvtCZX7AybS5Ee8rs3A@public.gmane.org \
    --cc=joel-U3u1mxZcP9KHXe+LvDLADg@public.gmane.org \
    --cc=linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-spi-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    /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.