svn commit: r332258 - head/sys/dev/spibus

O. Hartmann ohartmann at walstatt.org
Sat Apr 7 22:00:24 UTC 2018


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Am Sat, 7 Apr 2018 21:31:09 +0000 (UTC)
Ian Lepore <ian at FreeBSD.org> schrieb:

> Author: ian
> Date: Sat Apr  7 21:31:09 2018
> New Revision: 332258
> URL: https://svnweb.freebsd.org/changeset/base/332258
> 
> Log:
>   Don't check for impossible NULL return from malloc(..., M_WAITOK).
> 
> Modified:
>   head/sys/dev/spibus/spigen.c
> 
> Modified: head/sys/dev/spibus/spigen.c
> ==============================================================================
> --- head/sys/dev/spibus/spigen.c	Sat Apr  7 21:25:29 2018	(r332257)
> +++ head/sys/dev/spibus/spigen.c	Sat Apr  7 21:31:09 2018	(r332258)
> @@ -242,15 +242,9 @@ spigen_transfer(struct cdev *cdev, struct spigen_trans
>  #endif
>  	transfer.tx_cmd = transfer.rx_cmd = malloc(st->st_command.iov_len,
>  	    M_DEVBUF, M_WAITOK);
> -	if (transfer.tx_cmd == NULL)
> -		return (ENOMEM);
>  	if (st->st_data.iov_len > 0) {
>  		transfer.tx_data = transfer.rx_data = malloc(st->st_data.iov_len,
>  		    M_DEVBUF, M_WAITOK);
> -		if (transfer.tx_data == NULL) {
> -			free(transfer.tx_cmd, M_DEVBUF);
> -			return (ENOMEM);
> -		}
>  	}
>  	else
>  		transfer.tx_data = transfer.rx_data = NULL;
> _______________________________________________
> svn-src-head at freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/svn-src-head
> To unsubscribe, send any mail to "svn-src-head-unsubscribe at freebsd.org"

This one kills buildkernel:

[...]
- --- spigen.o ---
/usr/src/sys/dev/spibus/spigen.c:327:33: error: incompatible pointer types passing
'uintptr_t *' (aka 'unsigned long *') to parameter of type 'uint32_t *' (aka 'unsigned
int *') [-Werror,-Wincompatible-pointer-types] error = spibus_get_clock(dev, (uintptr_t
*)data); ^~~~~~~~~~~~~~~~~

- -- 
O. Hartmann

Ich widerspreche der Nutzung oder Übermittlung meiner Daten für
Werbezwecke oder für die Markt- oder Meinungsforschung (§ 28 Abs. 4 BDSG).
-----BEGIN PGP SIGNATURE-----

iLUEARMKAB0WIQQZVZMzAtwC2T/86TrS528fyFhYlAUCWsk/bQAKCRDS528fyFhY
lE3XAf4/hxNDiseKf4Do4OygdZtNv+JDC36j3AQ5+E96GwpH/khFBELxKIRHH85Y
Tof/QLL8Un43wZTr6moydE5eOdiRAf9Z0vvVvodEkmVPbWsfqn0lYTVjXqnkUfDH
7QMo3QBROtMUBo4LOa7fM7OlZZv9oMGUBsBWqHMjPXeqUOqbM+A4
=xGWs
-----END PGP SIGNATURE-----


More information about the svn-src-all mailing list