Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1927972ybg; Thu, 30 Jul 2020 06:26:06 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw4jwegvFfVilFtV+xE4pnnbTy4LOD9qqWw3m5G4t/JQAMJGfFuZ9LmxOmgwPLABxY/spAg X-Received: by 2002:a17:906:7e06:: with SMTP id e6mr2722098ejr.236.1596115566408; Thu, 30 Jul 2020 06:26:06 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596115566; cv=none; d=google.com; s=arc-20160816; b=hXppm6uiFNiJV5UMOMEJMYqFtS6yk49FRfK7oO/XnIZT/bvww59d8Jw2mGlSdl+l06 JDl0wSRU06vsxJp6HXpI52KZ6tmvXoJ0TShCxFMfL3GooAXbqREXggr46p9YU0nYd178 qNg7oK6x7aWIdO6FqAAa0NhHvt2e+rOcmRudEjXraFohm4XCa+MU5PyClguwsW8dn2h7 VPElBXtoCknr3r7m47ZALEqAnBFKnbGWL2mOZD0vlV9iihwp1xsl+J55ge/fjfVBTMkt 8MPGPXEKRRFf9RtQPtBz9bKHbBCjHhD2kJq39edo4MBXv1HKNItpETvBsz+QfAObh5y3 zHiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=wcPyE4+cPQF2p348dprC1q/nCXnWrHlXNo+LiKFxU9c=; b=AJYEsPbiLCcwi18ayM4PuGOG1QVE0rBqbsrTEYHW7p7HZ0Yi1jPN6R+vBZaYymn7lc FPcWZYR9UXiBdvTrp1vUixnqUmUs47ejy5pbSSPC2eDEZ9kEeVwQfePjdDb0MNcmJ2/r uo0/9c+33UNktvCWl4DOKZnWV9Nd2L2rSl+ymJAhuABKSSsORdC5K5BV59++0TD3ApDW vaUP3uzPPz4jhYVw7gBYYz2QKELN8+WQ7XcKuc1uxozc530rEdxcFrHbtoUjlAIXxudk UVV1eHKdsW7M2mFwugAtZqpGqilSMQYMM1q0rmwdm6ykiYr4CVYraU++jm+Yy/BdEqg9 mm0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=NT0JKZu1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id i22si290288ejf.220.2020.07.30.06.25.43; Thu, 30 Jul 2020 06:26:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@infradead.org header.s=casper.20170209 header.b=NT0JKZu1; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728301AbgG3NWn (ORCPT + 99 others); Thu, 30 Jul 2020 09:22:43 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44950 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726281AbgG3NWn (ORCPT ); Thu, 30 Jul 2020 09:22:43 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 09D37C061794 for ; Thu, 30 Jul 2020 06:22:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=wcPyE4+cPQF2p348dprC1q/nCXnWrHlXNo+LiKFxU9c=; b=NT0JKZu1sNprgCq89FvOkPnuOA O7GShg8Baj2xualxn0r//kz6dxm8pUnpLMkS1+MfO7wv8THh15aLntzgTGP81xuHkPCFLq2iUC9jZ B1u354qTKAb8QPHhwEa5WANwSb76+MCBAGWmyIlRwhJszxFSQtMCddHwEnLUthMqmSMbU/fxQU6vO iti/wW7L0zJEkWI9BrbeILJDX6vcCrvQ1XOgq/qUeHop6F098yfV7uIIzxdITYKmS6UYNElIKfka4 W3n8mcrmn+hRtb7e3EcUgoTVw5qekWXUnbnzYVRN42F2u+LvD3eyLSoiMOQ6xweEAKenOQ9t8rHrr AvH+omKg==; Received: from j217100.upc-j.chello.nl ([24.132.217.100] helo=noisy.programming.kicks-ass.net) by casper.infradead.org with esmtpsa (Exim 4.92.3 #3 (Red Hat Linux)) id 1k18W8-0007Rg-Bq; Thu, 30 Jul 2020 13:22:40 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id 0F73C30411F; Thu, 30 Jul 2020 15:22:37 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id D8F3B203DB3CD; Thu, 30 Jul 2020 15:22:37 +0200 (CEST) Date: Thu, 30 Jul 2020 15:22:37 +0200 From: peterz@infradead.org To: Julien Thierry Cc: linux-kernel@vger.kernel.org, jpoimboe@redhat.com, mhelsley@vmware.com, mbenes@suse.cz Subject: Re: [PATCH v3 2/4] objtool: Move orc outside of check Message-ID: <20200730132237.GM2655@hirez.programming.kicks-ass.net> References: <20200730094143.27494-1-jthierry@redhat.com> <20200730094143.27494-3-jthierry@redhat.com> <20200730095759.GH2655@hirez.programming.kicks-ass.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Jul 30, 2020 at 01:40:42PM +0100, Julien Thierry wrote: > > > On 7/30/20 10:57 AM, peterz@infradead.org wrote: > > On Thu, Jul 30, 2020 at 10:41:41AM +0100, Julien Thierry wrote: > > > + if (file->elf->changed) > > > + return elf_write(file->elf); > > > + else > > > + return 0; > > > } > > > > I think we can do without that else :-) > > > > I did wonder and was not 100% confident about it, but the orc gen will > always change the file, correct? Not if it already has orc, iirc. But what I was trying to say is that: if (file->elf->changed) return elf_write(file->elf) return 0; is identical code and, IMO, easier to read.