Hello,
On Tue, May 20, 2014 at 08:54:09AM +0300, Eli Billauer wrote:
> That seems OK to me, but the problem I'm concerned with is this: In
> devm_get_free_pages() it says
>
> devres = devres_alloc(devm_pages_release,
> sizeof(struct pages_devres), GFP_KERNEL);
> if
Hello, Tejun.
On 19/05/14 23:17, Tejun Heo wrote:
What can't it just do the following?
if (dma_mapping_error(dev, dma_handle)) {
devres_free(dr);
return dma_handle;
}
The caller would have to invoke dma_mapping_error() again but is that
a
Hello, Tejun.
On 19/05/14 23:17, Tejun Heo wrote:
What can't it just do the following?
if (dma_mapping_error(dev, dma_handle)) {
devres_free(dr);
return dma_handle;
}
The caller would have to invoke dma_mapping_error() again but is that
a
Hello,
On Tue, May 20, 2014 at 08:54:09AM +0300, Eli Billauer wrote:
That seems OK to me, but the problem I'm concerned with is this: In
devm_get_free_pages() it says
devres = devres_alloc(devm_pages_release,
sizeof(struct pages_devres), GFP_KERNEL);
if
Hello, Eli.
On Sat, May 17, 2014 at 03:19:21PM +0300, Eli Billauer wrote:
> >>+ if (dma_mapping_error(dev, dma_handle)) {
> >>+ devres_free(dr);
> >>+ return 0;
> >Can't we just keep returning dma_handle? Even if that means invoking
> >->mapping_error() twice? It's yucky
Hello, Eli.
On Sat, May 17, 2014 at 03:19:21PM +0300, Eli Billauer wrote:
+ if (dma_mapping_error(dev, dma_handle)) {
+ devres_free(dr);
+ return 0;
Can't we just keep returning dma_handle? Even if that means invoking
-mapping_error() twice? It's yucky to have subtly
Hello Tejun,
On 17/05/14 00:08, Tejun Heo wrote:
Don't we wanna map the underlying operation - dma_map_single_attrs() -
instead?
I'll resubmit this patch promptly, with a follow-up patch for the diff
to implement dmam_map_single_attrs() instead. Plus a define-statement
for
Hello Tejun,
On 17/05/14 00:08, Tejun Heo wrote:
Don't we wanna map the underlying operation - dma_map_single_attrs() -
instead?
I'll resubmit this patch promptly, with a follow-up patch for the diff
to implement dmam_map_single_attrs() instead. Plus a define-statement
for
Hello,
On Fri, May 16, 2014 at 11:26:36AM +0300, Eli Billauer wrote:
> +dma_addr_t dmam_map_single(struct device *dev, void *ptr, size_t size,
> +enum dma_data_direction direction)
> +
> +{
> + struct dma_devres *dr;
> + dma_addr_t dma_handle;
> +
> + dr =
dmam_map_single() and dmam_unmap_single() are the managed counterparts
for the respective dma_* functions.
Note that dmam_map_single() returns zero on failure, and not a value to
be handled by dma_mapping_error(): The error check is done by
dmam_map_single() to avoid the registration of a mapping
dmam_map_single() and dmam_unmap_single() are the managed counterparts
for the respective dma_* functions.
Note that dmam_map_single() returns zero on failure, and not a value to
be handled by dma_mapping_error(): The error check is done by
dmam_map_single() to avoid the registration of a mapping
Hello,
On Fri, May 16, 2014 at 11:26:36AM +0300, Eli Billauer wrote:
+dma_addr_t dmam_map_single(struct device *dev, void *ptr, size_t size,
+enum dma_data_direction direction)
+
+{
+ struct dma_devres *dr;
+ dma_addr_t dma_handle;
+
+ dr =
12 matches
Mail list logo