[PATCH v2] powerpc/kprobes: Remove redundant code

Michael Ellerman patch-notifications at ellerman.id.au
Thu Mar 26 23:06:27 AEDT 2020


On Wed, 2020-02-19 at 08:05:57 UTC, Christophe Leroy wrote:
> At the time being we have something like
> 
> 	if (something) {
> 		p = get();
> 		if (p) {
> 			if (something_wrong)
> 				goto out;
> 			...
> 			return;
> 		} else if (a != b) {
> 			if (some_error)
> 				goto out;
> 			...
> 		}
> 		goto out;
> 	}
> 	p = get();
> 	if (!p) {
> 		if (a != b) {
> 			if (some_error)
> 				goto out;
> 			...
> 		}
> 		goto out;
> 	}
> 
> This is similar to
> 
> 	p = get();
> 	if (!p) {
> 		if (a != b) {
> 			if (some_error)
> 				goto out;
> 			...
> 		}
> 		goto out;
> 	}
> 	if (something) {
> 		if (something_wrong)
> 			goto out;
> 		...
> 		return;
> 	}
> 
> Signed-off-by: Christophe Leroy <christophe.leroy at c-s.fr>

Applied to powerpc next, thanks.

https://git.kernel.org/powerpc/c/eb4f8e259acc37b91b62ca57e0d3c8960c357843

cheers


More information about the Linuxppc-dev mailing list