linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Lee Jones <lee.jones@linaro.org>
To: Holger Dengler <dengler@linutronix.de>
Cc: linux-kernel@vger.kernel.org, Peter Mahler <mahler@xkrug.com>,
	Juergen Bubeck <bubeck@xkrug.com>,
	Benedikt Spranger <b.spranger@linutronix.de>,
	Samuel Ortiz <sameo@linux.intel.com>
Subject: Re: [PATCH 01/11] mfd: Eberspaecher Flexcard PMC II Carrier Board support
Date: Mon, 30 Mar 2015 08:57:00 +0100	[thread overview]
Message-ID: <20150330075700.GL457@x1> (raw)
In-Reply-To: <1427277120-16924-2-git-send-email-dengler@linutronix.de>



> From: Benedikt Spranger <b.spranger@linutronix.de>
> 
> The Eberspaecher Flexcard PMC II is a PMC (PCI Mezzanine Card) II
> carrier board. The carrier board can take up to 4 exchangeable physical
> layer boards for e.g. CAN, FlexRay or Ethernet.
> 
> Signed-off-by: Holger Dengler <dengler@linutronix.de>
> Signed-off-by: Benedikt Spranger <b.spranger@linutronix.de>
> cc: Samuel Ortiz <sameo@linux.intel.com>
> cc: Lee Jones <lee.jones@linaro.org>

When you're providing a patch-set such as this, where all of the
patches spread across the various subsystems are related, it's better
to just send the whole thing to everyone.  Adding maintainers in this
way means that some of us are now missing come context.  More
importantly I'm missing [PATCH 00/11].

After looking the cover-letter up on the interweb, I notice this:

"According to the comments regarding our last posting, the MFD driver
patchset has been split up into separate functional parts."

Where did your last posting go?  I can't seem to look it up, either on
the MLs or via Google.  Who asked you to split up the MFD patches?  Do
you have a link to any previous conversation surrounding this set?

> ---
>  drivers/mfd/Kconfig           |  10 +++
>  drivers/mfd/Makefile          |   2 +
>  drivers/mfd/flexcard/Makefile |   2 +

This is worrying.  What makes flexcard special enough to require a
directory?  There are currently no other directories in drivers/mfd.

>  drivers/mfd/flexcard/core.c   | 193 ++++++++++++++++++++++++++++++++++++++++++
>  include/linux/mfd/flexcard.h  |  34 ++++++++
>  include/uapi/linux/flexcard.h | 125 +++++++++++++++++++++++++++
>  6 files changed, 366 insertions(+)
>  create mode 100644 drivers/mfd/flexcard/Makefile
>  create mode 100644 drivers/mfd/flexcard/core.c
>  create mode 100644 include/linux/mfd/flexcard.h
>  create mode 100644 include/uapi/linux/flexcard.h

[...]

> diff --git a/drivers/mfd/flexcard/core.c b/drivers/mfd/flexcard/core.c
> new file mode 100644
> index 0000000..99df3d5
> --- /dev/null
> +++ b/drivers/mfd/flexcard/core.c
> @@ -0,0 +1,193 @@
> +/*
> + * Eberspaecher Flexcard PMC II Carrier Board PCI Driver
> + *
> + * Copyright (c) 2014,2015 Linutronix GmbH
> + * Author: Holger Dengler
> + *         Benedikt Spranger

Full email addresses of the authors please.

> + * 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.
> + */
> +
> +#include <linux/kernel.h>
> +#include <linux/module.h>
> +#include <linux/init.h>
> +#include <linux/flexcard.h>
> +#include <linux/pci.h>
> +#include <linux/platform_device.h>
> +#include <linux/mfd/core.h>
> +#include <linux/mfd/flexcard.h>

Alphabetical.

> +static const char drv_name[] = "flexcard";

I've never really liked these.  Just use "flexcard" where required.

[...]

> +static int flexcard_tiny_probe(struct flexcard_device *priv)
> +{
> +	u32 fc_slic0 = priv->conf->fc_slic[0];
> +	struct pci_dev *pdev = priv->pdev;
> +	u8 nr_can, nr_fr, nr;
> +	u32 offset = 0;
> +	int i, ret;
> +
> +	nr_can = (fc_slic0 >> 4) & 0xf;
> +	nr_fr = fc_slic0 & 0xf;
> +	nr = nr_can + nr_fr;

You need to make this more easily/instantly readable.  Insert a
comment explaining what's happening and consider renaming the local
variable to something more friendly/explanatory.

[...]

> diff --git a/include/linux/mfd/flexcard.h b/include/linux/mfd/flexcard.h
> new file mode 100644
> index 0000000..20d0f40
> --- /dev/null
> +++ b/include/linux/mfd/flexcard.h
> @@ -0,0 +1,34 @@
> +/*
> + * Common Definitions for Eberspaecher Flexcard PMC II
> + *
> + * Copyright (c) 2014,2015 Linutronix GmbH
> + * Author: Holger Dengler
> + *         Benedikt Spranger
> + *
> + * 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 FLEXCARD_H
> +#define FLEXCARD_H
> +
> +#define FLEXCARD_CAN_OFFSET	0x2000
> +#define FLEXCARD_CAN_SIZE	0x2000
> +
> +#define FLEXCARD_FR_OFFSET	0x4000
> +#define FLEXCARD_FR_SIZE	0x2000

Are these used anywhere else except core.c?  If not, please move them
into there.  Same with any other variable/struct/define which is used
in only a single file.

> +struct flexcard_device {
> +	struct pci_dev *pdev;
> +	struct fc_conf_bar __iomem *conf;
> +	struct mfd_cell *cells;
> +	struct resource *res;
> +};
> +
> +enum flexcard_cell_id {
> +	FLEXCARD_CELL_CAN,
> +	FLEXCARD_CELL_FLEXRAY,
> +};
> +
> +#endif /* FLEXCARD_H */

[...]

-- 
Lee Jones
Linaro STMicroelectronics Landing Team Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog

  reply	other threads:[~2015-03-30  7:57 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-25  9:51 [PATCH 00/11] Eberspaecher Flexcard PMC II base support Holger Dengler
2015-03-25  9:51 ` [PATCH 01/11] mfd: Eberspaecher Flexcard PMC II Carrier Board support Holger Dengler
2015-03-30  7:57   ` Lee Jones [this message]
2015-03-25  9:51 ` [PATCH 02/11] mfd: flexcard: add flexcard core device Holger Dengler
2015-03-30  8:06   ` Lee Jones
2015-03-25  9:51 ` [PATCH 03/11] mfd: flexcard: add device attributes Holger Dengler
2015-03-30  8:15   ` Lee Jones
2015-03-25  9:51 ` [PATCH 04/11] mfd: flexcard: add clocksrc device Holger Dengler
2015-03-30  8:30   ` Lee Jones
2015-03-25  9:51 ` [PATCH 05/11] mfd: flexcard: add interrupt support Holger Dengler
2015-03-30  8:46   ` Lee Jones
2015-03-25  9:51 ` [PATCH 06/11] mfd: flexcard: add DMA interrupt domain Holger Dengler
2015-03-30  8:50   ` Lee Jones
2015-03-25  9:51 ` [PATCH 07/11] mfd: flexcard: add UIO IRQ devices Holger Dengler
2015-03-30  8:57   ` Lee Jones
2015-03-25  9:51 ` [PATCH 08/11] mfd: flexcard: add DMA device Holger Dengler
2015-03-30  8:59   ` Lee Jones
2015-03-25  9:51 ` [PATCH 09/11] mfd: flexcard: add DMA ringbuffer demux driver Holger Dengler
2015-03-30  9:02   ` Lee Jones
2015-03-25  9:51 ` [PATCH 10/11] clocksource: flexcard: Add basic timestamp counter support Holger Dengler
2015-03-26  9:41   ` Daniel Lezcano
2015-03-26 11:01     ` Holger Dengler
2015-03-26 16:34       ` John Stultz
2015-03-27 12:27         ` Holger Dengler
2015-03-25  9:52 ` [PATCH 11/11] clocksource: flexcard: Support timestamp trigger selection Holger Dengler

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=20150330075700.GL457@x1 \
    --to=lee.jones@linaro.org \
    --cc=b.spranger@linutronix.de \
    --cc=bubeck@xkrug.com \
    --cc=dengler@linutronix.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mahler@xkrug.com \
    --cc=sameo@linux.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;
as well as URLs for NNTP newsgroup(s).