Search Linux Wireless

Re: [PATCH] remove lots of IS_ERR_VALUE abuses

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, May 27, 2016 at 11:23:25PM +0200, Arnd Bergmann wrote:

> @@ -837,7 +837,7 @@ static int load_flat_shared_library(int id, struct lib_info *libs)
>  
>  	res = prepare_binprm(&bprm);
>  
> -	if (!IS_ERR_VALUE(res))
> +	if (res >= 0)

	if (res == 0), please - prepare_binprm() returns 0 or -E...

> --- a/net/9p/client.c
> +++ b/net/9p/client.c
> @@ -521,7 +521,7 @@ static int p9_check_errors(struct p9_client *c, struct p9_req_t *req)
>  		if (p9_is_proto_dotu(c))
>  			err = -ecode;
>  
> -		if (!err || !IS_ERR_VALUE(err)) {
> +		if (!err || !IS_ERR_VALUE((unsigned long)err)) {

Not really - it's actually
		if (p9_is_proto_dotu(c) && ecode < 512)
			err = -ecode;

		if (!err) {
			...
> @@ -608,7 +608,7 @@ static int p9_check_zc_errors(struct p9_client *c, struct p9_req_t *req,
>  		if (p9_is_proto_dotu(c))
>  			err = -ecode;
>  
> -		if (!err || !IS_ERR_VALUE(err)) {
> +		if (!err || !IS_ERR_VALUE((unsigned long)err)) {

Ditto.
--
To unsubscribe from this list: send the line "unsubscribe linux-wireless" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux Host AP]     [ATH6KL]     [Linux Wireless Personal Area Network]     [Linux Bluetooth]     [Linux Netdev]     [Kernel Newbies]     [Linux Kernel]     [IDE]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite Hiking]     [MIPS Linux]     [ARM Linux]     [Linux RAID]

  Powered by Linux