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:	Thu, 15 Nov 2012 17:27:49 +0200
From:	Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
To:	Viresh Kumar <viresh.kumar@...aro.org>
Cc:	Vinod Koul <vinod.koul@...el.com>,
	spear-devel <spear-devel@...t.st.com>,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/2] dw_dmac: make usage of dw_dma_slave optional

On Thu, 2012-11-15 at 20:54 +0530, Viresh Kumar wrote: 
> On 15 November 2012 20:51, Andy Shevchenko
> <andriy.shevchenko@...ux.intel.com> wrote:
> > On Thu, 2012-11-15 at 20:28 +0530, viresh kumar wrote:
> >> On Thu, Nov 15, 2012 at 7:50 PM, Andy Shevchenko
> >> <andriy.shevchenko@...ux.intel.com> wrote:
> >> > diff --git a/drivers/dma/dw_dmac.c b/drivers/dma/dw_dmac.c
> >>
> >> > +static inline bool dwc_is_slave(struct dma_slave_config *sconfig)
> >> > +{
> >> > +       return is_slave_direction(sconfig->direction);
> >> > +}
> >>
> >> I will not buy this one. Why hide the real implementation, call
> >> is_slave_direction()
> >> directly.
> >
> > There is no strong reason to keep it so.
> >
> >> > @@ -1344,6 +1352,8 @@ struct dw_cyclic_desc *dw_dma_cyclic_prep(struct dma_chan *chan,
> >> > +       sconfig->direction = direction;
> >> > +
> >>
> >> > @@ -1718,6 +1728,7 @@ static int __devinit dw_probe(struct platform_device *pdev)
> >> > +               dwc->dma_sconfig.direction = DMA_TRANS_NONE;
> >>
> >> Why do you need above changes??
> >
> > This one is not needed indeed. But we have to look after default (0)
> > enum value.
> 
> I am asking about all lines where you are doing sconfig->direction = foo;

Well, the prep_* should assign the value due to changes of check in the
dwc_descriptor_complete. Otherwise we will potentially skip some
important piece of code.


-- 
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>
Intel Finland Oy
--
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