From: Kees Bakker <kees@ijzerbout.nl>
To: Dave Penkler <dpenkler@gmail.com>
To: Linux Staging <linux-staging@lists.linux.dev>
Subject: [PATCH] staging: gpib: Change return type of fluke_get_dma_residue
Date: Tue, 15 Oct 2024 22:33:30 +0200 [thread overview]
Message-ID: <20241017181504.1346F18DAF2@bout3.ijzerbout.nl> (raw)
The function fluke_get_dma_residue returns an error as a negative value.
So the return type must not be unsigned.
Signed-off-by: Kees Bakker <kees@ijzerbout.nl>
---
drivers/staging/gpib/eastwood/fluke_gpib.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/staging/gpib/eastwood/fluke_gpib.c b/drivers/staging/gpib/eastwood/fluke_gpib.c
index f9f149db222d..77bbe2b587b1 100644
--- a/drivers/staging/gpib/eastwood/fluke_gpib.c
+++ b/drivers/staging/gpib/eastwood/fluke_gpib.c
@@ -536,7 +536,7 @@ static int fluke_accel_write(gpib_board_t *board, uint8_t *buffer, size_t length
return 0;
}
-static unsigned int fluke_get_dma_residue(struct dma_chan *chan, dma_cookie_t cookie)
+static int fluke_get_dma_residue(struct dma_chan *chan, dma_cookie_t cookie)
{
struct dma_tx_state state;
int result;
@@ -549,7 +549,7 @@ static unsigned int fluke_get_dma_residue(struct dma_chan *chan, dma_cookie_t co
dmaengine_tx_status(chan, cookie, &state);
// hardware doesn't support resume, so dont call this
// method unless the dma transfer is done.
- return state.residue;
+ return (int)state.residue;
}
static int fluke_dma_read(gpib_board_t *board, uint8_t *buffer,
--
2.47.0
next reply other threads:[~2024-10-17 18:15 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-15 20:33 Kees Bakker [this message]
2024-10-19 7:59 ` [PATCH] staging: gpib: Change return type of fluke_get_dma_residue Greg KH
2024-10-19 18:19 ` Kees Bakker
-- strict thread matches above, loose matches on Subject: below --
2024-10-15 20:33 Kees Bakker
2024-11-03 23:45 ` Greg KH
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241017181504.1346F18DAF2@bout3.ijzerbout.nl \
--to=kees@ijzerbout.nl \
--cc=dpenkler@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox