From: Marc Kleine-Budde <mkl@pengutronix.de>
To: Akshay Bhat <akshay.bhat@timesys.com>, wg@grandegger.com
Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Akshay Bhat <nodeax@gmail.com>
Subject: Re: [PATCH v4 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver
Date: Tue, 4 Apr 2017 17:34:02 +0200 [thread overview]
Message-ID: <145b8725-c3dd-e899-8a3e-133e68a3b1e6@pengutronix.de> (raw)
In-Reply-To: <32114de2-8ab7-daec-9b36-209cab0ea550@timesys.com>
[-- Attachment #1.1: Type: text/plain, Size: 2622 bytes --]
On 03/24/2017 06:20 PM, Akshay Bhat wrote:
> Hi Marc,
>
> On 03/17/2017 05:10 PM, Akshay Bhat wrote:
>> This patch adds support for the Holt HI-311x CAN controller. The HI311x
>> CAN controller is capable of transmitting and receiving standard data
>> frames, extended data frames and remote frames. The HI311x interfaces
>> with the host over SPI.
>>
>> Datasheet: www.holtic.com/documents/371-hi-3110_v-rev-jpdf.do
>>
>> Signed-off-by: Akshay Bhat <nodeax@gmail.com>
>> ---
>>
>
> If there are no further review comments can this series be applied to
> can-next or does it need to wait for the next kernel release cycle (4.13)?
The driver doesn't check if the workqueue allocation is successfull,
I've squashed this patch:
> diff --git a/drivers/net/can/spi/hi311x.c b/drivers/net/can/spi/hi311x.c
> index ff4bb40d855e..170e8e3971b2 100644
> --- a/drivers/net/can/spi/hi311x.c
> +++ b/drivers/net/can/spi/hi311x.c
> @@ -780,20 +780,24 @@ static int hi3110_open(struct net_device *net)
>
> priv->wq = alloc_workqueue("hi3110_wq", WQ_FREEZABLE | WQ_MEM_RECLAIM,
> 0);
> + if (!priv->wq) {
> + ret = -ENOMEM;
> + goto out_free_irq;
> + }
> INIT_WORK(&priv->tx_work, hi3110_tx_work_handler);
> INIT_WORK(&priv->restart_work, hi3110_restart_work_handler);
>
> ret = hi3110_hw_reset(spi);
> if (ret)
> - goto out_free_irq;
> + goto out_free_wq;
>
> ret = hi3110_setup(net);
> if (ret)
> - goto out_free_irq;
> + goto out_free_wq;
>
> ret = hi3110_set_normal_mode(spi);
> if (ret)
> - goto out_free_irq;
> + goto out_free_wq;
>
> can_led_event(net, CAN_LED_EVENT_OPEN);
> netif_wake_queue(net);
> @@ -801,11 +805,12 @@ static int hi3110_open(struct net_device *net)
>
> return 0;
>
> -out_free_irq:
> + out_free_wq:
> + destroy_workqueue(priv->wq);
> + out_free_irq:
> free_irq(spi->irq, priv);
> hi3110_hw_sleep(spi);
> -
> -out_close:
> + out_close:
> hi3110_power_enable(priv->transceiver, 0);
> close_candev(net);
> mutex_unlock(&priv->hi3110_lock);
Marc
--
Pengutronix e.K. | Marc Kleine-Budde |
Industrial Linux Solutions | Phone: +49-231-2826-924 |
Vertretung West/Dortmund | Fax: +49-5121-206917-5555 |
Amtsgericht Hildesheim, HRA 2686 | http://www.pengutronix.de |
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]
next prev parent reply other threads:[~2017-04-04 15:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-17 21:10 [PATCH v4 1/2] can: holt_hi311x: document device tree bindings Akshay Bhat
2017-03-17 21:10 ` [PATCH v4 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver Akshay Bhat
2017-03-19 16:17 ` Wolfgang Grandegger
2017-03-20 15:14 ` Akshay Bhat
2017-03-20 16:46 ` Wolfgang Grandegger
2017-03-20 19:04 ` Akshay Bhat
2017-03-24 17:20 ` Akshay Bhat
2017-04-04 15:34 ` Marc Kleine-Budde [this message]
2017-04-04 18:22 ` Akshay Bhat
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=145b8725-c3dd-e899-8a3e-133e68a3b1e6@pengutronix.de \
--to=mkl@pengutronix.de \
--cc=akshay.bhat@timesys.com \
--cc=devicetree@vger.kernel.org \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nodeax@gmail.com \
--cc=wg@grandegger.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
all inboxes | Powered by JetHome®