From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F2A6AC433FE for ; Mon, 1 Nov 2021 02:24:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id CD3F460524 for ; Mon, 1 Nov 2021 02:24:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230320AbhKAC0p (ORCPT ); Sun, 31 Oct 2021 22:26:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230222AbhKAC0n (ORCPT ); Sun, 31 Oct 2021 22:26:43 -0400 Received: from casper.infradead.org (casper.infradead.org [IPv6:2001:8b0:10b:1236::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3F4BAC061714; Sun, 31 Oct 2021 19:24:11 -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=Q6ZAJzHp/d1wIOZgcMMjKOzpX1S/wfI1y2rL7tlK/iU=; b=Yzn6agCs5K0Y375M4heXim/QCw QMO4liQGIzBYe9AaPTh8+bycDFE95CeuIYay74lJkQ3eV+e/vGugfR/MCCkpYiWnQjw/zHd/J0VVb fe8eCRnjoPHHd+nE9tuLQO+J/IDzPDdG2jFbqCzd1jKrMfZdKWjgOPe1T8bQzWyAFbTAbUA/jDQdb JBKGH+V7pHQysa8SKaqdxgseZk0GxM/iIfNnprcZFCdBm84gOvUHqS5Z9a86mMAJm/c/LRaSFG7/Q wSvqDwy25ZkI6rAQenBZJ5feEhxwaWnU5sb643HkSlgAVn26VTg6bXNefooExYxCGikYWSf6CVqOq fZvjmB2g==; Received: from willy by casper.infradead.org with local (Exim 4.94.2 #2 (Red Hat Linux)) id 1mhMxA-003SE6-AM; Mon, 01 Nov 2021 02:21:57 +0000 Date: Mon, 1 Nov 2021 02:21:40 +0000 From: Matthew Wilcox To: Yihao Han Cc: "James E.J. Bottomley" , Helge Deller , Kefeng Wang , David Hildenbrand , Christophe Leroy , Sven Schnelle , linux-parisc@vger.kernel.org, linux-kernel@vger.kernel.org, kernel@vivo.com Subject: Re: [PATCH] parisc: using swap() instead of tmp Message-ID: References: <20211101021047.22945-1-hanyihao@vivo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20211101021047.22945-1-hanyihao@vivo.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Oct 31, 2021 at 07:10:45PM -0700, Yihao Han wrote: > @@ -127,16 +127,13 @@ static void __init setup_bootmem(void) > int j; > > for (j = i; j > 0; j--) { > - physmem_range_t tmp; > If you're going to delete that line, you should also delete the blank line after it. > if (pmem_ranges[j-1].start_pfn < > pmem_ranges[j].start_pfn) { > > break; > } > - tmp = pmem_ranges[j-1]; > - pmem_ranges[j-1] = pmem_ranges[j]; > - pmem_ranges[j] = tmp; > + swap(pmem_ranges[j-1], pmem_ranges[j]); > } > } > > -- > 2.17.1 >