lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Mon, 15 Dec 2014 08:22:23 -0600
From:	Dinh Nguyen <dinh.linux@...il.com>
To:	Ley Foon Tan <lftan@...era.com>
CC:	Jassi Brar <jassisinghbrar@...il.com>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	Suman Anna <s-anna@...com>, devicetree@...r.kernel.org
Subject: Re: [PATCH (resend)] mailbox: Add Altera mailbox driver



On 12/15/14, 12:22 AM, Ley Foon Tan wrote:
> On Fri, Dec 12, 2014 at 10:38 PM, Dinh Nguyen <dinh.linux@...il.com> wrote:
> 
>>> +
>>> +#include <linux/kernel.h>
>>> +#include <linux/module.h>
>>> +#include <linux/device.h>
>>> +#include <linux/platform_device.h>
>>> +#include <linux/interrupt.h>
>>> +#include <linux/io.h>
>>> +#include <linux/of.h>
>>> +#include <linux/mailbox_controller.h>
>>
>> Alphabetize the headers.
> Okay.
> 
> 
>>> +static int altera_mbox_startup_sender(struct mbox_chan *chan)
>>> +{
>>> +     int ret;
>>> +     struct altera_mbox *mbox = to_altera_mbox(chan);
>>> +
>>> +     if (mbox->intr_mode) {
>>> +             ret = request_irq(mbox->irq, altera_mbox_tx_interrupt, 0,
>>
>> Use devm_request_irq, since you didn't have and don't need use free_irq
>> in the shutdown function.
> We want to free_irq when it shutdown. That means nobody requests for
> that mailbox (or channel) and request_irq() again if someone requests
> for a mailbox.
> 

But you didn't have any free_irq in the shutdown function. Use
devm_request_irq here, so you don't have to add them.

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ