From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752380AbbIQJrh (ORCPT ); Thu, 17 Sep 2015 05:47:37 -0400 Received: from ozlabs.org ([103.22.144.67]:47937 "EHLO ozlabs.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751087AbbIQJrg (ORCPT ); Thu, 17 Sep 2015 05:47:36 -0400 Message-ID: <1442483254.26748.5.camel@ellerman.id.au> Subject: Re: [PATCH] arch-powerpc: Return false instead of -EFAULT From: Michael Ellerman To: Peter Senna Tschudin Cc: benh@kernel.crashing.org, paulus@samba.org, anton@samba.org, linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Date: Thu, 17 Sep 2015 19:47:34 +1000 In-Reply-To: <1442481536-11088-1-git-send-email-peter.senna@gmail.com> References: <1442481536-11088-1-git-send-email-peter.senna@gmail.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.12.11-0ubuntu3 Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2015-09-17 at 11:18 +0200, Peter Senna Tschudin wrote: > Returning a negative value for a boolean function seem to have the > undesired effect of returning true. Replace -EINVAL by false in a > bool-returning function. > > The diff of the .s file before and after the change (using cross > compilation) starts with: > > 440,441c440,441 > < .L43: > < li 3,1 # D.25775, > --- > > .L42: > > li 3,0 # D.25775, > ... > > while if -EFAULT is replaced by true, the diff is empty. Ah, that's rather unfortunate. Can you post the full asm listing, for all three cases? cheers