Skip to content

Commit

Permalink
spidev warning fix
Browse files Browse the repository at this point in the history
Git rid of "warning: passing arg 2 of `access_ok' makes pointer from integer
without a cast" reported on SH ...  most architectures use macros in that
test, SH uses inlined functions.

Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
  • Loading branch information
David Brownell authored and Linus Torvalds committed Aug 11, 2007
1 parent 4a2a4da commit 96ddbf5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion drivers/spi/spidev.c
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,9 @@ static int spidev_message(struct spidev_data *spidev,

if (u_tmp->rx_buf) {
k_tmp->rx_buf = buf;
if (!access_ok(VERIFY_WRITE, u_tmp->rx_buf, u_tmp->len))
if (!access_ok(VERIFY_WRITE, (u8 __user *)
(ptrdiff_t) u_tmp->rx_buf,
u_tmp->len))
goto done;
}
if (u_tmp->tx_buf) {
Expand Down

0 comments on commit 96ddbf5

Please sign in to comment.