Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1384095

Re: [PATCH 02/18] dmaengine: st_fdma: Add STMicroelectronics FDMA driver header file

From Arnd Bergmann <arnd@arndb.de>
Newsgroups linux.kernel
Subject Re: [PATCH 02/18] dmaengine: st_fdma: Add STMicroelectronics FDMA driver header file
Date 2016-04-21 13:30 +0200
Message-ID <rqkY2-8lx-17@gated-at.bofh.it> (permalink)
References <rqkEG-8dU-7@gated-at.bofh.it> <rqkEG-8dU-25@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On Thursday 21 April 2016 12:04:19 Peter Griffin wrote:
> Signed-off-by: Ludovic Barre <ludovic.barre@st.com>
> Signed-off-by: Peter Griffin <peter.griffin@linaro.org>

Please add a changelog text for each patch.

>  drivers/dma/st_fdma.h | 281 ++++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 281 insertions(+)
>  create mode 100644 drivers/dma/st_fdma.h

When the header file is only included from one other file, it's
usually better to move the entire contents into the .c file.

> +#define fdma_read(fdev, name) \
> +	readl_relaxed((fdev)->io_base + FDMA_##name##_OFST)
> +
> +#define fdma_write(fdev, val, name) \
> +	writel_relaxed((val), (fdev)->io_base + FDMA_##name##_OFST)

Try to avoid string concatenation for macro names. It's better
to always pass the full name of the register in there to make
it easier to grep for the usage when trying to understand the
driver as a reader.

Once you do that, just convert the macro into an inline function.

> +bool st_fdma_filter_fn(struct dma_chan *chan, void *param);

The filter function should not be needed here.

	Arnd

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH 02/18] dmaengine: st_fdma:  Add STMicroelectronics FDMA driver header file Peter Griffin <peter.griffin@linaro.org> - 2016-04-21 13:10 +0200
  Re: [PATCH 02/18] dmaengine: st_fdma:  Add STMicroelectronics FDMA driver header file Arnd Bergmann <arnd@arndb.de> - 2016-04-21 13:30 +0200

csiph-web