.. | .. |
---|
| 1 | +// SPDX-License-Identifier: GPL-2.0 |
---|
1 | 2 | /* |
---|
2 | 3 | * Dmaengine driver base library for DMA controllers, found on SH-based SoCs |
---|
3 | 4 | * |
---|
.. | .. |
---|
7 | 8 | * Copyright (C) 2009 Nobuhiro Iwamatsu <iwamatsu.nobuhiro@renesas.com> |
---|
8 | 9 | * Copyright (C) 2009 Renesas Solutions, Inc. All rights reserved. |
---|
9 | 10 | * Copyright (C) 2007 Freescale Semiconductor, Inc. All rights reserved. |
---|
10 | | - * |
---|
11 | | - * This is free software; you can redistribute it and/or modify |
---|
12 | | - * it under the terms of version 2 of the GNU General Public License as |
---|
13 | | - * published by the Free Software Foundation. |
---|
14 | 11 | */ |
---|
15 | 12 | |
---|
16 | 13 | #include <linux/delay.h> |
---|
.. | .. |
---|
386 | 383 | switch (desc->mark) { |
---|
387 | 384 | case DESC_COMPLETED: |
---|
388 | 385 | desc->mark = DESC_WAITING; |
---|
389 | | - /* Fall through */ |
---|
| 386 | + fallthrough; |
---|
390 | 387 | case DESC_WAITING: |
---|
391 | 388 | if (head_acked) |
---|
392 | 389 | async_tx_ack(&desc->async_tx); |
---|
.. | .. |
---|
712 | 709 | BUG_ON(!schan->desc_num); |
---|
713 | 710 | |
---|
714 | 711 | if (sg_len > SHDMA_MAX_SG_LEN) { |
---|
715 | | - dev_err(schan->dev, "sg length %d exceds limit %d", |
---|
| 712 | + dev_err(schan->dev, "sg length %d exceeds limit %d", |
---|
716 | 713 | sg_len, SHDMA_MAX_SG_LEN); |
---|
717 | 714 | return NULL; |
---|
718 | 715 | } |
---|
.. | .. |
---|
731 | 728 | * Allocate the sg list dynamically as it would consumer too much stack |
---|
732 | 729 | * space. |
---|
733 | 730 | */ |
---|
734 | | - sgl = kcalloc(sg_len, sizeof(*sgl), GFP_KERNEL); |
---|
| 731 | + sgl = kmalloc_array(sg_len, sizeof(*sgl), GFP_KERNEL); |
---|
735 | 732 | if (!sgl) |
---|
736 | 733 | return NULL; |
---|
737 | 734 | |
---|