Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp3067544ybt; Mon, 29 Jun 2020 14:25:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwwFXEmW8A4jAtZR4h8sNg9Dpqn3HSq4tFrrpFvOJt03k2tS+8JeDZdRtd57wniKCFjBTkt X-Received: by 2002:aa7:cdca:: with SMTP id h10mr6114500edw.285.1593465947488; Mon, 29 Jun 2020 14:25:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593465947; cv=none; d=google.com; s=arc-20160816; b=WcGy/ttFQJ9NZPER7PVwrd0HRnYHc/WmFdV1IEPX3aTy33orsWMhphbItT8aQAeFPz i5tg98cFVKa/frUfLTNgpL3NHfVFFCbhxRU1PGW0BKmfUhSgprXRLGAID4X+SbtOW5BN V09wFblx1VMhLGms+xermDd5SLS6o3Ga5PZn6IiaOz5vxBWqZi7Ov784z18JnyOCsnaE Yv+2hSvzocVLcaMTsiEeifpnBas+uPagKdJJ373COgRTZLqBl5Z8nBbqTWQkJAj7wPMz cmJUMYd5NKiQYhSUnth9A6V7JYlAJHQHewGdEMfWrYdYHAkkM8B9GAsxdcyOSPnxv4AY vhVA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:date:cc:to:subject:from:message-id; bh=gT0coUM61fBuClOYRVORS1NhE+2AF0gDv8BlL7uTWA8=; b=ea98TkQjDPTGNXvEMZiycmm3ZCakj2hILCKxAjxuqRaL56MT8Tw7whi/vFbWMZuVTQ 4oN8Xh3Coyg7gs1b5oiPtGMTau1YnDKoSWNr7cALhvjZP/q6uAcoQaEosp6ONHxdwJTT aADAlsiXCzLfeKn2n9gtQ6Ftt0hxiC3xUnsdetJdMbusHjM4ed5RrAY2FxwHrwkbdIx2 9MLGmO4GxiBF2q6MjrPXzb1RzlvtxS/ECe3Z3wL7CgyGawP8N22P33gGiFH2pHTlCYcI CIMSKIpZJKvUDk08Zxr522OyHWYixXVtplHF1aV8jYg5pPIBpj66PvLjBRPYOnODvMLx JI2A== ARC-Authentication-Results: i=1; mx.google.com; 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 n6si416115edy.324.2020.06.29.14.25.24; Mon, 29 Jun 2020 14:25:47 -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; 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 S1729550AbgF2Su7 (ORCPT + 99 others); Mon, 29 Jun 2020 14:50:59 -0400 Received: from pegase1.c-s.fr ([93.17.236.30]:38135 "EHLO pegase1.c-s.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729511AbgF2Suz (ORCPT ); Mon, 29 Jun 2020 14:50:55 -0400 Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 49wQ1h4CRKz9v03x; Mon, 29 Jun 2020 13:17:12 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id iuSqKncCRLeh; Mon, 29 Jun 2020 13:17:12 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 49wQ1h380Lz9v03v; Mon, 29 Jun 2020 13:17:12 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 01BE58B79F; Mon, 29 Jun 2020 13:17:19 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id oz9GrzxMmbUc; Mon, 29 Jun 2020 13:17:18 +0200 (CEST) Received: from pc16570vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.230.105]) by messagerie.si.c-s.fr (Postfix) with ESMTP id AE2138B799; Mon, 29 Jun 2020 13:17:18 +0200 (CEST) Received: by pc16570vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 9B6D265B29; Mon, 29 Jun 2020 11:17:18 +0000 (UTC) Message-Id: <610d6b1a60ad0bedef865a90153c1110cfaa507e.1593429426.git.christophe.leroy@csgroup.eu> From: Christophe Leroy Subject: [PATCH v2 1/2] powerpc/ptdump: Refactor update of st->last_pa To: Benjamin Herrenschmidt , Paul Mackerras , Michael Ellerman Cc: linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org Date: Mon, 29 Jun 2020 11:17:18 +0000 (UTC) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org st->last_pa is always updated in note_page() so it can be done outside the if/elseif/else block. Signed-off-by: Christophe Leroy --- arch/powerpc/mm/ptdump/ptdump.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/arch/powerpc/mm/ptdump/ptdump.c b/arch/powerpc/mm/ptdump/ptdump.c index b2ed1ca4f254..20a039867934 100644 --- a/arch/powerpc/mm/ptdump/ptdump.c +++ b/arch/powerpc/mm/ptdump/ptdump.c @@ -211,7 +211,6 @@ static void note_page(struct pg_state *st, unsigned long addr, st->current_flags = flag; st->start_address = addr; st->start_pa = pa; - st->last_pa = pa; st->page_size = page_size; pt_dump_seq_printf(st->seq, "---[ %s ]---\n", st->marker->name); /* @@ -251,13 +250,11 @@ static void note_page(struct pg_state *st, unsigned long addr, } st->start_address = addr; st->start_pa = pa; - st->last_pa = pa; st->page_size = page_size; st->current_flags = flag; st->level = level; - } else { - st->last_pa = pa; } + st->last_pa = pa; } static void walk_pte(struct pg_state *st, pmd_t *pmd, unsigned long start) -- 2.25.0