summaryrefslogtreecommitdiff
path: root/drivers/staging/mt7621-dma
AgeCommit message (Collapse)Author
2021-09-13staging/mt7621-dma: Format lines in "hsdma-mt7621.c" ending with an open ↵Krish Jain
parenthesis This patch fixes the format of the code. It properly formats lines that should not end with a '(' as suggested by checkpath.pl. Signed-off-by: Krish Jain <krishjain02939@gmail.com> Link: https://lore.kernel.org/r/20210908205903.GA108157@panther Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-01-31staging/mt7621-dma: mtk-hsdma.c->hsdma-mt7621.cIlya Lipnitskiy
Also use KBUILD_MODNAME for module name. This driver is only used by RALINK MIPS MT7621 SoCs. Tested by building against that target using OpenWrt with Linux 5.10.10. Fixes the following error: error: the following would cause module name conflict: drivers/dma/mediatek/mtk-hsdma.ko drivers/staging/mt7621-dma/mtk-hsdma.ko Cc: stable@vger.kernel.org Cc: Masahiro Yamada <masahiroy@kernel.org> Signed-off-by: Ilya Lipnitskiy <ilya.lipnitskiy@gmail.com> Link: https://lore.kernel.org/r/20210130034507.2115280-1-ilya.lipnitskiy@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-12-28staging: mt7621-dma: Fix a resource leak in an error handling pathChristophe JAILLET
If an error occurs after calling 'mtk_hsdma_init()', it must be undone by a corresponding call to 'mtk_hsdma_uninit()' as already done in the remove function. Fixes: 0853c7a53eb3 ("staging: mt7621-dma: ralink: add rt2880 dma engine") Signed-off-by: Christophe JAILLET <christophe.jaillet@wanadoo.fr> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20201213153513.138723-1-christophe.jaillet@wanadoo.fr Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-11-06staging: mt7621-dma: fix alignment warningsSiddhant Gupta
Fix the checkpatch warning of alignment should match open parenthesis for some dev_dbg() calls Signed-off-by: Siddhant Gupta <siddhantgupta416@gmail.com> Link: https://lore.kernel.org/r/20201106082226.GA22990@Sleakybeast Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-16staging: mt7621-dma: convert tasklets to use new tasklet_setup() APIAllen Pais
In preparation for unconditionally passing the struct tasklet_struct pointer to all tasklet callbacks, switch to using the new tasklet_setup() and from_tasklet() to pass the tasklet pointer explicitly. Signed-off-by: Romain Perier <romain.perier@gmail.com> Signed-off-by: Allen Pais <apais@linux.microsoft.com> Link: https://lore.kernel.org/r/20200916062459.58426-1-allen.lkml@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-03-21staging: mt7621-dma: quoted string split across linesGokce Kuler
quoted string merge to upper line Signed-off-by: Gokce Kuler <gokcekuler@gmail.com> Link: https://lore.kernel.org/r/20200320232607.GA8601@siyah2 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-11-07staging: mt7621-dma: align to match open parenthesisJules Irenge
Align to match open parenthesis. "CHECK: Alignment should match open parenthesis". Issue detected by checkpatch tool. Signed-off-by: Jules Irenge <jbi.octave@gmail.com> Link: https://lore.kernel.org/r/20191105220320.50180-1-jbi.octave@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-28staging: mt7621-dma: Remove unnecessary line continuationsFrank A. Cancio Bello
checkpatch message: "WARNING:LINE_CONTINUATIONS: Avoid unnecessary line continuations" Signed-off-by: Frank A. Cancio Bello <frank@generalsoftwareinc.com> Link: https://lore.kernel.org/r/20191028051237.3row7xnbr6pgn4bp@linux-kernel-dev Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-10-24staging: mt7621-dma: use devm_platform_ioremap_resource() to simplify codeYueHaibing
Use devm_platform_ioremap_resource() to simplify the code a bit. This is detected by coccinelle. Signed-off-by: YueHaibing <yuehaibing@huawei.com> Link: https://lore.kernel.org/r/20191016085833.26376-1-yuehaibing@huawei.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-07-30staging: Remove dev_err() usage after platform_get_irq()Stephen Boyd
We don't need dev_err() messages when platform_get_irq() fails now that platform_get_irq() prints an error message itself when something goes wrong. Let's remove these prints with a simple semantic patch. // <smpl> @@ expression ret; struct platform_device *E; @@ ret = ( platform_get_irq(E, ...) | platform_get_irq_byname(E, ...) ); if ( \( ret < 0 \| ret <= 0 \) ) { ( -if (ret != -EPROBE_DEFER) -{ ... -dev_err(...); -... } | ... -dev_err(...); ) ... } // </smpl> While we're here, remove braces on if statements that only have one statement (manually). Signed-off-by: Stephen Boyd <swboyd@chromium.org> Link: https://lore.kernel.org/r/20190730181557.90391-43-swboyd@chromium.org Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-30staging: mt7621-dma: sizeof via pointer dereferenceBenjamin Sherman
Pass the size of a struct into kzalloc by pointer dereference. This complies with the Linux kernel coding style and removes the possibility for a bug if the pointer's type is changed. Signed-off-by: Benjamin Sherman <benjamin@bensherman.io> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-20Staging: mt7621-dma: Remove braces around single if statementPuranjay Mohan
Fix following checkpatch.pl warning by removing unnecessary braces: WARNING: braces {} are not necessary for single statement blocks Signed-off-by: Puranjay Mohan <puranjay12@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: add missing SPDX lines to Makefile filesGreg Kroah-Hartman
There are a few remaining drivers/staging/*/Makefile files that do not have SPDX identifiers in them. Add the correct GPL-2.0 identifier to them to make scanning tools happy. Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: add missing SPDX lines to Kconfig filesGreg Kroah-Hartman
There are a few remaining drivers/staging/*/Kconfig files that do not have SPDX identifiers in them. Add the correct GPL-2.0 identifier to them to make scanning tools happy. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-03staging: mt7621-dma: Remove print statement on devm_kzalloc errorNishka Dasgupta
Remove print statement following error of devm_kzalloc. Issue found with Coccinelle. Signed-off-by: Nishka Dasgupta <nishka.dasgupta@yahoo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-29staging: mediatek: addres minor style issues flagged by clang-format.Armando Miraglia
Running clang-format on mtk-hsdma.c I noticed that few lines would not need to be wrapped, since they fit 80 columns. This change changes such lines to better fit the style-guide. Signed-off-by: Armando Miraglia <armax@google.com> Acked-by: Sean Wang <sean.wang@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-03staging: mt7621-dma: remove license boilerplate textJules Irenge
Remove license boilerplate text. Signed-off-by: Jules Irenge <jbi.octave@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-03staging: mt7621-dma: add SPDX GPL-2.0+ license identifierJules Irenge
Add SPDX GPL-2.0+ license to fix missing SPDX warning reported by checkpatch.pl. Signed-off-by: Jules Irenge <jbi.octave@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26Staging: mt761-dma: Alignment should match open parenthesisBhanusree Pola
Adjust "dev_dbg" parameters to match alignment with open parenthesis Issue found with checkpatch.pl Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-26Staging: mt7621_dma: Prefer unsigned int over just unsignedBhanusree Pola
Replace 'unsigned' with 'unsigned int' to be specific with data type. Issue found with checkpatch.pl Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-15staging: Move ralink-gdma to its own directoryGeorge Hilliard
This is in preparation to allow it and the mt7621-dma drivers to be built separately. They are completely independent pieces of software, and the Kconfig specifies very different requirements. Cc: linux-kernel@vger.kernel.org Cc: devel@driverdev.osuosl.org Cc: Neil Brown <neil@brown.name> Signed-off-by: George Hilliard <thirtythreeforty@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-01-07staging: mt7621-dma: Use struct_size() in devm_kzalloc()Gustavo A. R. Silva
One of the more common cases of allocation size calculations is finding the size of a structure that has a zero-sized array at the end, along with memory for some number of elements for that array. For example: struct foo { int stuff; void *entry[]; }; instance = devm_kzalloc(dev, sizeof(struct foo) + sizeof(void *) * count, GFP_KERNEL); Instead of leaving these open-coded and prone to type mistakes, we can now use the new struct_size() helper: instance = devm_kzalloc(dev, struct_size(instance, entry, count), GFP_KERNEL); This code was detected with the help of Coccinelle. Signed-off-by: Gustavo A. R. Silva <gustavo@embeddedor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-17staging: mt7621-dma: fix unbalanced bracesLou Knauer
Add braces to conditional statements if the other branch has them in order to be more compliant with the linux kernel coding style. Remaining checkpatch.pl issues include unnecessary line continuations and use of non-conventional types. Signed-off-by: Lou Knauer <lou.knauer@fau.de> Signed-off-by: Philipp Panzer <philipp.panzer@fau.de> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-12-03Merge 4.20-rc5 into staging-nextGreg Kroah-Hartman
We need the staging fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-07staging: mt7621-dma: fix potentially dereferencing uninitialized 'tx_desc'Sergio Paracuellos
Function 'mtk_hsdma_start_transfer' uses 'tx_desc' pointer which can be dereferenced before it is initializated. Initializate pointer before avoiding the problem. Fixes: 0853c7a53eb3 ("staging: mt7621-dma: ralink: add rt2880 dma engine") Reported-by: Dan Carpenter <dan.carpenter@oracle.com> Signed-off-by: Sergio Paracuellos <sergio.paracuellos@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-11-05staging: mt7621-dma: Add braces around else branchesKimberly Brown
Add braces around else branches in conditional statements that include branches with multiple statements. This style complies with the Linux kernel coding style and improves consistency and readability. Issues found by checkpatch. Signed-off-by: Kimberly Brown <kimbrownkd@gmail.com> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-10-10staging: mt7621-dma: Delete unused defineBhanusree Pola
delete unused '#define GDMA_REG_CTRL1_CONTINOUS BIT(14)' Signed-off-by: Bhanusree Pola <bhanusreemahesh@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-23staging: mt7621-dma: Fixing parenthesis alignmentChristian Lütke-Stetzkamp
Fixes checkpatch check: PARENTHESIS_ALIGNMENT Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-23staging: mt7621-dma: Removing unnecessary bracesChristian Lütke-Stetzkamp
Fixes checkpatch warning: BRACES Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-23staging: mt7621-dma: Fix ident by spaceChristian Lütke-Stetzkamp
Fixes checkpatch error: CODE_IDENT Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-23staging: mt7621-dma: Remove assignment in ifChristian Lütke-Stetzkamp
Fixes checkpatch error: ASSIGN_IN_IF by adding an inner if in the else path, this also avoids calling vchan_find_desc when not needed. Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-23staging: mt7621-dma: Fix open brace positionChristian Lütke-Stetzkamp
Fixes checkpatch error: OPEN_BRACE Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-23staging: mt7621-dma: Fix SpacingChristian Lütke-Stetzkamp
Fixes checkpatch error: SPACING Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-23staging: mt7621-dma: Fix Pointer LocationChristian Lütke-Stetzkamp
Fixes checkpatch error: POINTER_LOCATION Signed-off-by: Christian Lütke-Stetzkamp <christian@lkamp.de> Reviewed-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-19staging: mt7621-dma: ralink: add rt2880 dma engineJohn Crispin
Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: NeilBrown <neil@brown.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>