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]
Message-ID: <CAHp75VcGQ9jCpGb2jhCEX4NsbUsR0aytwd1AMkt4GpTXYVPnwQ@mail.gmail.com>
Date:	Wed, 26 Sep 2012 20:55:36 +0300
From:	Andy Shevchenko <andy.shevchenko@...il.com>
To:	viresh kumar <viresh.kumar@...aro.org>
Cc:	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
	Arnd Bergmann <arnd@...db.de>,
	Vinod Koul <vinod.koul@...el.com>,
	linux-kernel@...r.kernel.org,
	Heikki Krogerus <heikki.krogerus@...ux.intel.com>,
	spear-devel <spear-devel@...t.st.com>
Subject: Re: [PATCHv2 2/4] dmaengine: dw_dmac: Add PCI part of the driver

On Wed, Sep 26, 2012 at 5:33 PM, viresh kumar <viresh.kumar@...aro.org> wrote:
> Forgot earlier, please keep spear-devel in cc... They will be going to
> use dw_dmac driver :)
Oh, my bad. v3 will be Cc'ed there as well. Sorry.

> On Wed, Sep 26, 2012 at 6:10 PM, Andy Shevchenko
> <andriy.shevchenko@...ux.intel.com> wrote:
>> diff --git a/drivers/dma/dw_dmac_pci.c b/drivers/dma/dw_dmac_pci.c
>> +#include <linux/module.h>
>> +#include <linux/pci.h>
>> +#include <linux/platform_device.h>
>> +#include <linux/dw_dmac.h>
>> +
>> +#define DRIVER(_is_private, _chan_order, _chan_pri)            \
>> +       ((kernel_ulong_t)&(struct dw_dma_platform_data) {       \
>> +               .is_private = (_is_private),                    \
>> +               .chan_allocation_order = (_chan_order),         \
>> +               .chan_priority = (_chan_pri),                   \
>
> I believe you don't need these braces around input variables on right side
> of "=". Even if there is something complex passed.
Hmm... Have no idea if anyone will use robust stuff as a parameter to
that macro. I could remove them.

>
> Did you try to align "\"? Sorry can't see it in gmail :(
I checked - I have tabular indentation, that's why you see them at
different columns. In vi they look pretty well formated.

[snip]

>> +       pd = platform_device_alloc("dw_dmac", instance);
>> +       if (!pd) {
>> +               dev_err(&pdev->dev, "can't allocate dw_dmac platform device\n");
>> +               ret = -ENOMEM;
>> +               goto err0;
>> +       }
>
> Is this the correct approach? I doubt... We are creating a platform
> device from a
> pci driver... Don't know if it can lead to some issues within kernel.
>
> Lets call the specialist for his comments  :)
> @Arnd: Can you please help us here?
This approach is used among different drivers in kernel. As first
example that comes to my mind you could consider chipidea USB driver
(drivers/usb/chipidea).


-- 
With Best Regards,
Andy Shevchenko
--
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