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


Groups > linux.kernel > #1214050

Re: [PATCH 2/4] remoteproc: Supply controller driver for ST's Remote Processors

From Nathan Lynch <Nathan_Lynch@mentor.com>
Newsgroups linux.kernel
Subject Re: [PATCH 2/4] remoteproc: Supply controller driver for ST's Remote Processors
Date 2015-08-26 19:10 +0200
Message-ID <q1Mn1-3z4-25@gated-at.bofh.it> (permalink)
References <q1IMq-6N8-7@gated-at.bofh.it> <q1IMp-6N8-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


On 08/26/2015 08:08 AM, Lee Jones wrote:
> --- /dev/null
> +++ b/drivers/remoteproc/st_remoteproc.c
> @@ -0,0 +1,300 @@
> +/*
> + * ST's Remote Processor Control Driver
> + *
> + * Copyright (C) 2015 STMicroelectronics - All Rights Reserved
> + *
> + * Author: Ludovic Barre <ludovic.barre@st.com>

When submitting code you didn't write, I'd say it's better practice to
clearly indicate its provenance in the commit message.  E.g. something
like "Driver based on code authored by Ludovic Barre for ST".  And
obtain signoffs etc if possible.


> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; either version 2 of the License.

Please review the wording here.  It's unclear whether this is intended
to be v2-only or v2 or later.


> +static int st_rproc_stop(struct rproc *rproc)
> +{
> +	struct st_rproc *st_rproc = rproc->priv;
> +	int err = 0;
> +
> +	if (st_rproc->config->sw_reset) {
> +		err = reset_control_assert(st_rproc->sw_reset);
> +		if (err)
> +			dev_warn(&rproc->dev, "Failed to assert S/W Reset\n");
> +	}
> +
> +	if (st_rproc->config->pwr_reset) {
> +		err = reset_control_assert(st_rproc->pwr_reset);
> +		if (err)
> +			dev_warn(&rproc->dev, "Failed to assert Power Reset\n");
> +	}
> +
> +	clk_disable(st_rproc->clk);
> +
> +	return 0;
> +}

Seems like st_rproc_stop should propagate errors back to its caller
instead of always returning 0.

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

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


Thread

[PATCH 2/4] remoteproc: Supply controller driver for ST's Remote Processors Lee Jones <lee.jones@linaro.org> - 2015-08-26 15:20 +0200
  Re: [PATCH 2/4] remoteproc: Supply controller driver for ST's Remote  Processors Nathan Lynch <Nathan_Lynch@mentor.com> - 2015-08-26 19:10 +0200
    Re: [PATCH 2/4] remoteproc: Supply controller driver for ST's Remote  Processors Lee Jones <lee.jones@linaro.org> - 2015-08-27 08:50 +0200

csiph-web