mirror of
https://github.com/opnsense/src.git
synced 2026-05-28 04:12:45 -04:00
busdma: emit a warning for use of filters
Filter functions are deprecated, and unused in the tree. If either of the filter or filterarg arguments to bus_dma_tag_create() are non-NULL, print a warning. This is a direct commit to stable/14. Reviewed by: jhb Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D42897
This commit is contained in:
parent
e64d827d3a
commit
165cc0eea9
5 changed files with 20 additions and 0 deletions
|
|
@ -398,6 +398,10 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
|
|||
/* Return a NULL tag on failure */
|
||||
*dmat = NULL;
|
||||
|
||||
/* Filters are deprecated, emit a warning. */
|
||||
if (filter != NULL || filterarg != NULL)
|
||||
printf("Warning: use of filters is deprecated; see busdma(9)\n");
|
||||
|
||||
newtag = (bus_dma_tag_t)malloc(sizeof(*newtag), M_BUSDMA,
|
||||
M_ZERO | M_NOWAIT);
|
||||
if (newtag == NULL) {
|
||||
|
|
|
|||
|
|
@ -161,6 +161,10 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
|
|||
struct bus_dma_tag_common *tc;
|
||||
int error;
|
||||
|
||||
/* Filters are deprecated, emit a warning. */
|
||||
if (filter != NULL || filterarg != NULL)
|
||||
printf("Warning: use of filters is deprecated; see busdma(9)\n");
|
||||
|
||||
if (parent == NULL) {
|
||||
error = bus_dma_bounce_impl.tag_create(parent, alignment,
|
||||
boundary, lowaddr, highaddr, filter, filterarg, maxsize,
|
||||
|
|
|
|||
|
|
@ -168,6 +168,10 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
|
|||
return (EINVAL);
|
||||
}
|
||||
|
||||
/* Filters are deprecated, emit a warning. */
|
||||
if (filter != NULL || filterarg != NULL)
|
||||
printf("Warning: use of filters is deprecated; see busdma(9)\n");
|
||||
|
||||
/* Return a NULL tag on failure */
|
||||
*dmat = NULL;
|
||||
|
||||
|
|
|
|||
|
|
@ -162,6 +162,10 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
|
|||
struct bus_dma_tag_common *tc;
|
||||
int error;
|
||||
|
||||
/* Filters are deprecated, emit a warning. */
|
||||
if (filter != NULL || filterarg != NULL)
|
||||
printf("Warning: use of filters is deprecated; see busdma(9)\n");
|
||||
|
||||
if (parent == NULL) {
|
||||
error = bus_dma_bounce_impl.tag_create(parent, alignment,
|
||||
boundary, lowaddr, highaddr, filter, filterarg, maxsize,
|
||||
|
|
|
|||
|
|
@ -184,6 +184,10 @@ bus_dma_tag_create(bus_dma_tag_t parent, bus_size_t alignment,
|
|||
struct bus_dma_tag_common *tc;
|
||||
int error;
|
||||
|
||||
/* Filters are deprecated, emit a warning. */
|
||||
if (filter != NULL || filterarg != NULL)
|
||||
printf("Warning: use of filters is deprecated; see busdma(9)\n");
|
||||
|
||||
if (parent == NULL) {
|
||||
error = bus_dma_bounce_impl.tag_create(parent, alignment,
|
||||
boundary, lowaddr, highaddr, filter, filterarg, maxsize,
|
||||
|
|
|
|||
Loading…
Reference in a new issue