devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Steffen Trumtrar <s.trumtrar@pengutronix.de>
To: atull@opensource.altera.com
Cc: gregkh@linuxfoundation.org, jgunthorpe@obsidianresearch.com,
	hpa@zytor.com, monstr@monstr.eu, michal.simek@xilinx.com,
	rdunlap@infradead.org, linux-kernel@vger.kernel.org,
	devicetree@vger.kernel.org, pantelis.antoniou@konsulko.com,
	robh+dt@kernel.org, grant.likely@linaro.org,
	iws@ovro.caltech.edu, linux-doc@vger.kernel.org, pavel@denx.de,
	broonie@kernel.org, philip@balister.org, rubini@gnudd.com,
	jason@lakedaemon.net, kyle.teske@ni.com, nico@linaro.org,
	balbi@ti.com, m.chehab@samsung.com, davidb@codeaurora.org,
	rob@landley.net, davem@davemloft.net, cesarb@cesarb.net,
	sameo@linux.intel.com, akpm@linux-foundation.org,
	linus.walleij@linaro.org, pawel.moll@arm.com,
	mark.rutland@arm.com, ijc+devicetree@hellion.org.uk,
	galak@codeaurora.org, devel@driverdev.osuosl.org,
	delicious.quinoa@gmail.com, dinguyen@opensource.altera.com,
	yvanderv@opensource.altera.com
Subject: Re: [PATCH v6 4/4] staging: fpga manager: add driver for socfpga fpga manager
Date: Fri, 19 Dec 2014 09:55:16 +0100	[thread overview]
Message-ID: <20141219085516.GF13070@pengutronix.de> (raw)
In-Reply-To: <1418941748-16111-5-git-send-email-atull@opensource.altera.com>

Hi!

Just a minor nitpick, but...

On Thu, Dec 18, 2014 at 04:29:08PM -0600, atull@opensource.altera.com wrote:
> From: Alan Tull <atull@opensource.altera.com>
> 
> Add driver to fpga manager framework to allow configuration
> of FPGA in Altera SoCFPGA parts.
> 
> Signed-off-by: Alan Tull <atull@opensource.altera.com>
> Acked-by: Michal Simek <michal.simek@xilinx.com>
> ---
> v2: fpga_manager struct now contains struct device
>     fpga_manager_register parameters now take device
> 
> v3: skip a version to align versions
> 
> v4: move to drivers/staging
> 
> v5: fix array_size.cocci warnings
>     fix platform_no_drv_owner.cocci warnings
>     Remove .owner = THIS_MODULE
>     include asm/irq.h
>     clean up list of includes
>     use altera_fpga_reset for ops
>     use enum fpga_mgr_states or u32 as needed
>     use devm_request_irq
>     check irq <= 0 instead of == NO_IRQ
>     Use ARRAY_SIZE
>     rename altera -> socfpga
>     static const socfpga_fpga_ops
>     header moved to linux/fpga/ folder
>     remove ifdef'ed code
>     use platform_get_resource and platform_get_irq
>     move .probe and .remove lines adjacent
>     use module_platform_driver
>     use __maybe_unused
>     only need to 'if (IS_ENABLED(CONFIG_REGULATOR))' in one fn
>     fix "unsigned 'mode' is never < 0"
> 
> v6: return error for (unused) default of case statement
> ---
  ^^^

...if you remove these, than that changelog will not land in the final
commit which I would prefer. Nobody cares for the changelog of a
patch once it is in its final state. And this is a rather noisy one.
When someone in the future looks at this, he will see two lines of
information and 10 times that of uninteresting noise.

Not a dealbreaker, but just something to consider for future patches.

> +
> +static u32 socfpga_fpga_readl(struct socfpga_fpga_priv *priv, u32 reg_offset)
> +{
> +	return readl(priv->fpga_base_addr + reg_offset);
> +}
> +
> +static void socfpga_fpga_writel(struct socfpga_fpga_priv *priv, u32 reg_offset,
> +				u32 value)
> +{
> +	writel(value, priv->fpga_base_addr + reg_offset);
> +}
> +
> +static u32 socfpga_fpga_raw_readl(struct socfpga_fpga_priv *priv,
> +				  u32 reg_offset)
> +{
> +	return __raw_readl(priv->fpga_base_addr + reg_offset);
> +}
> +
> +static void socfpga_fpga_raw_writel(struct socfpga_fpga_priv *priv,
> +				    u32 reg_offset, u32 value)
> +{
> +	__raw_writel(value, priv->fpga_base_addr + reg_offset);
> +}
> +
> +static void socfpga_fpga_data_writel(struct socfpga_fpga_priv *priv, u32 value)
> +{
> +	writel(value, priv->fpga_data_addr);
> +}
> +
> +static inline void socfpga_fpga_set_bitsl(struct socfpga_fpga_priv *priv,
> +					  u32 offset, u32 bits)
> +{
> +	u32 val;
> +
> +	val = socfpga_fpga_readl(priv, offset);
> +	val |= bits;
> +	socfpga_fpga_writel(priv, offset, val);
> +}
> +
> +static inline void socfpga_fpga_clr_bitsl(struct socfpga_fpga_priv *priv,
> +					  u32 offset, u32 bits)
> +{
> +	u32 val;
> +
> +	val = socfpga_fpga_readl(priv, offset);
> +	val &= ~bits;
> +	socfpga_fpga_writel(priv, offset, val);
> +}
> +

Please, please, please at least fix this once the driver hit staging.
It is always a major annoyance, to follow functions, just to find out
that their only reason of existence is to flip the arguments just for the
hell of it. But I guess it is okay for staging...

Regards,
Steffen

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

  reply	other threads:[~2014-12-19  8:55 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-18 22:29 [PATCH v6 0/4] FPGA Manager Framework atull
2014-12-18 22:29 ` [PATCH v6 1/4] doc: add bindings document for altera fpga manager atull
2014-12-18 22:29 ` [PATCH v6 2/4] fpga manager: add sysfs interface document atull
2014-12-18 22:29 ` [PATCH v6 3/4] staging: fpga manager: framework core atull
2014-12-19 14:08   ` Michal Simek
2014-12-18 22:29 ` [PATCH v6 4/4] staging: fpga manager: add driver for socfpga fpga manager atull
2014-12-19  8:55   ` Steffen Trumtrar [this message]
2014-12-19 14:05     ` Michal Simek
2014-12-19 15:07       ` Steffen Trumtrar
2014-12-19 15:55         ` atull
2014-12-19 16:15           ` Steffen Trumtrar
2014-12-19 14:20 ` [PATCH v6 0/4] FPGA Manager Framework Michal Simek
2014-12-19 15:38   ` Greg KH
2014-12-19 15:47     ` atull
2014-12-19 16:49       ` Greg KH

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=20141219085516.GF13070@pengutronix.de \
    --to=s.trumtrar@pengutronix.de \
    --cc=akpm@linux-foundation.org \
    --cc=atull@opensource.altera.com \
    --cc=balbi@ti.com \
    --cc=broonie@kernel.org \
    --cc=cesarb@cesarb.net \
    --cc=davem@davemloft.net \
    --cc=davidb@codeaurora.org \
    --cc=delicious.quinoa@gmail.com \
    --cc=devel@driverdev.osuosl.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dinguyen@opensource.altera.com \
    --cc=galak@codeaurora.org \
    --cc=grant.likely@linaro.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hpa@zytor.com \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=iws@ovro.caltech.edu \
    --cc=jason@lakedaemon.net \
    --cc=jgunthorpe@obsidianresearch.com \
    --cc=kyle.teske@ni.com \
    --cc=linus.walleij@linaro.org \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=m.chehab@samsung.com \
    --cc=mark.rutland@arm.com \
    --cc=michal.simek@xilinx.com \
    --cc=monstr@monstr.eu \
    --cc=nico@linaro.org \
    --cc=pantelis.antoniou@konsulko.com \
    --cc=pavel@denx.de \
    --cc=pawel.moll@arm.com \
    --cc=philip@balister.org \
    --cc=rdunlap@infradead.org \
    --cc=rob@landley.net \
    --cc=robh+dt@kernel.org \
    --cc=rubini@gnudd.com \
    --cc=sameo@linux.intel.com \
    --cc=yvanderv@opensource.altera.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).