Received: by 2002:a25:ca44:0:0:0:0:0 with SMTP id a65csp1966542ybg; Thu, 30 Jul 2020 07:16:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyZlGWq30o5gYKtpr9oPUgOEDdNEUzCn8WGU3iqfdHnYiBdtnMcwQ9OT7BkmPAiDgtzSiHH X-Received: by 2002:aa7:d45a:: with SMTP id q26mr2831412edr.95.1596118580700; Thu, 30 Jul 2020 07:16:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1596118580; cv=none; d=google.com; s=arc-20160816; b=01OQc9d6MSXnzYIXmLEkLF/2jZbaXF5SJfLB3TlUg0S4NnqdtlB1IWUgbWhLkDk02/ AyAvVkOtz/eKIMAeNtYNQJ+Qg3p5vLG2YzZVxn3eVGVxb1wDMfiVvutiX9hGyTPyZ19I IkeWE8w37xj1cFi8Q0t8Q27XoL/1UAtDdLE0VJcd+APsw+ZMojfB+PrxfXp6zLNdCdGd VOiRSE0UfVOFmZaWfYMWPRWug3UiY1aqd7hy/SlUZANLIybZlZyTCBcIYp4mpTkaDU// NdoKXg2CtEZuw90/mDDevFuSZylw6FNpWawSlJvwpbTcfhSBsn3mHevzx1a3ET4biW5K Wtvg== 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=mC9bnvLUmM2DBjf+quSal6Se9a1/PYo8DVnoJYZcaTc=; b=YRo/SmZ0Xg0ng8rOtMuEX7F30Bxvk1EFm++CBrxHqGwHWZr/BDUPhvxNNS/rqrmAG1 FZvY2Gs1xQL8IReW+xHJaGk/4Ec2dA6NlD6rQtlT2PYXvWYTXuolx+gZvtb7fCP4Vz0m Hyof26YnndeP7dkEIcpnDMK19D68LdL4kLA73488qXEshkI/OaVzrrxQF7lOLo8me25I /eLcRtpIjUs37HWbwVTrk/0LpgJDWDKmCfIO7bo5dNdyRPzIm0QToSMk/t1nm9LA3YUW VxNBUEPPSNeO9ae/8oRWCE34Pr1Uz/t8LGqVTADZLi8Tfcf6WDP+p7XA3UezEbckVVlL NuDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ow95l7Hy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id q18si3448452eji.43.2020.07.30.07.15.58; Thu, 30 Jul 2020 07:16:20 -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=pass header.i=@redhat.com header.s=mimecast20190719 header.b=Ow95l7Hy; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728310AbgG3OPf (ORCPT + 99 others); Thu, 30 Jul 2020 10:15:35 -0400 Received: from us-smtp-2.mimecast.com ([205.139.110.61]:40259 "EHLO us-smtp-delivery-1.mimecast.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1727072AbgG3OPf (ORCPT ); Thu, 30 Jul 2020 10:15:35 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1596118534; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=mC9bnvLUmM2DBjf+quSal6Se9a1/PYo8DVnoJYZcaTc=; b=Ow95l7Hy33WpUuimm99Ud9CJFBgQD0BACnv886Nqeva1yiKdxYL8qujGa2RgrIt6zIJADE dDESO9mihKk12v9ZjT1D1IcxF2K+MelbN7uKUo2tpSE0JSEKxCh7hCjYiQnHMn1pgD06ea LieU59CIrmnQ2YWvuSiZvhkOy9WaQSU= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-296-2bvH98rxNImIqjoAgJcl4A-1; Thu, 30 Jul 2020 10:15:32 -0400 X-MC-Unique: 2bvH98rxNImIqjoAgJcl4A-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 66FFA100944F; Thu, 30 Jul 2020 14:15:31 +0000 (UTC) Received: from treble (ovpn-119-23.rdu2.redhat.com [10.10.119.23]) by smtp.corp.redhat.com (Postfix) with ESMTPS id C0E2610246F2; Thu, 30 Jul 2020 14:15:28 +0000 (UTC) Date: Thu, 30 Jul 2020 09:15:26 -0500 From: Josh Poimboeuf To: Julien Thierry Cc: peterz@infradead.org, linux-kernel@vger.kernel.org, mbenes@suse.cz Subject: Re: [PATCH v3 2/4] objtool: Move orc outside of check Message-ID: <20200730141526.lr33zv4ffa3rdygp@treble> References: <20200730094143.27494-1-jthierry@redhat.com> <20200730094143.27494-3-jthierry@redhat.com> <20200730095759.GH2655@hirez.programming.kicks-ass.net> <20200730132237.GM2655@hirez.programming.kicks-ass.net> <3af41a3b-a4b9-8120-3ac0-c9ce13770628@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <3af41a3b-a4b9-8120-3ac0-c9ce13770628@redhat.com> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 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 02:29:20PM +0100, Julien Thierry wrote: > > > On 7/30/20 2:22 PM, peterz@infradead.org wrote: > > 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. > > > > Much easier yes, I'll change it. But I think file->elf->changed can be assumed at this point anyway, so it could just be an unconditional return elf_write(file->elf); -- Josh