From patchwork Fri Jan 20 05:57:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gavin Shan X-Patchwork-Id: 4289 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp36306wrn; Thu, 19 Jan 2023 22:08:27 -0800 (PST) X-Google-Smtp-Source: AMrXdXshk4SArx/hPPEPlXBxOi+/Z6I7pjuIiDJ2n/hiRACSckz8Ym4Pf2JHKOtXPKWIHE8V0rm8 X-Received: by 2002:a17:906:eb0e:b0:871:be7:c984 with SMTP id mb14-20020a170906eb0e00b008710be7c984mr13620851ejb.34.1674194906969; Thu, 19 Jan 2023 22:08:26 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674194906; cv=none; d=google.com; s=arc-20160816; b=Adc5DjQRj7V87+v+aynAdhJ5CQGtKklbbf3wP8vI86/MY+djLdSrpRyXTjQzOqR6GO ddBi9648un7bMq1n6qfH6/7D1LtyeyPumYuhpsnQBi2Bi7e700zgNciVCrabrh9dIDPY OwpdAfGM//VVd+CYzR0hADO7y8wT+z7bGXiAIwiVS9D67gv8mvRCnwG+YwKw/2sm/iYD w2H/l5Ntzo71WZJ9p26x/WU31FLduCNrDZ3vFWE+mjeW4R1D8nZwvhroKXAKsvMn8STt vMklhE6YfL3AMipjjxcBYlZZ0jgkPo44Sb08ouM/pCkjRxsfrn4KsqzgB7o/xp8PPsmJ ixTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=/L01UEOFAUDLhmeL3RQigMabUa8K4IscFqsvKS8pwCg=; b=hSNRyFCdxC+OyIj6dzO6FJ2rlIDE9XhecR7zYHBIiwYV41uXkMm/CNJQODun/us5GL ovxYEe+wYFFMl6sRJDyxPcAFtSno4DoZcMYsGFZWmRuZNzqJU1P5AIxE6dDHMaaD6h3b PFr/n19Z9gMLiCIcjWKLswekCHBIWTPzlyNn1UqgPDwT+rMxbSoOKWtKSQmDE6AES1h0 633MhFGYC8fu1Ww9mp4quC5HPJSNiYKhB1ep+zNvN81RfD8tsI+q06vJlmzVLoPadCkJ RpLqgpa4Uzy9RR5P966EInjINz0Q5CcRPcgvhwU/UgZb7OgXwIEzsQNPws9BGeHCHBit UIkw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cGyupNBL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id xc13-20020a170907074d00b00877a58772fesi392080ejb.90.2023.01.19.22.08.01; Thu, 19 Jan 2023 22:08:26 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=cGyupNBL; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 S230499AbjATF6e (ORCPT + 99 others); Fri, 20 Jan 2023 00:58:34 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41158 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230423AbjATF6a (ORCPT ); Fri, 20 Jan 2023 00:58:30 -0500 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 25B8D45F51 for ; Thu, 19 Jan 2023 21:57:39 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1674194258; 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: content-transfer-encoding:content-transfer-encoding; bh=/L01UEOFAUDLhmeL3RQigMabUa8K4IscFqsvKS8pwCg=; b=cGyupNBLONs2KVagy2g7SZlU3hbKJIgiKHtbpIBDusvVH+VXHY6ul116zhaRaB1UTYh7si HvBDLgPz8qLhQQWV29qDXDi1+gY1TVs3SuQDUECKhNdD+4C50j5qw3/CdOwO3IXO66rLp7 bIzO3m9UwzuUWaV6ikX3ZajznVfvJlI= Received: from mimecast-mx02.redhat.com (mimecast-mx02.redhat.com [66.187.233.88]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-265-ucut25HGMoOfFB6qwxueaw-1; Fri, 20 Jan 2023 00:57:35 -0500 X-MC-Unique: ucut25HGMoOfFB6qwxueaw-1 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.rdu2.redhat.com [10.11.54.2]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx02.redhat.com (Postfix) with ESMTPS id C3DB3811E6E; Fri, 20 Jan 2023 05:57:34 +0000 (UTC) Received: from gshan.redhat.com (vpn2-54-98.bne.redhat.com [10.64.54.98]) by smtp.corp.redhat.com (Postfix) with ESMTPS id E0CCA40C6EC4; Fri, 20 Jan 2023 05:57:31 +0000 (UTC) From: Gavin Shan To: linux-mm@kvack.org Cc: linux-kernel@vger.kernel.org, david@redhat.com, osalvador@suse.de, gregkh@linuxfoundation.org, rafael@kernel.org, shan.gavin@gmail.com Subject: [PATCH 0/2] drivers/base/memory: Two small cleanups Date: Fri, 20 Jan 2023 13:57:25 +0800 Message-Id: <20230120055727.355483-1-gshan@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.1 on 10.11.54.2 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_NONE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755520598649196935?= X-GMAIL-MSGID: =?utf-8?q?1755520598649196935?= PATCH[1] Fixes comments for phys_index_show() since it's showing the memory block ID instead of the section ID. PATCH[2] Use an array to show memory block state in state_show() Gavin Shan (2): drivers/base/memory: Fix comments for phys_index_show() drivers/base/memory: Use array to show memory block state drivers/base/memory.c | 34 ++++++++-------------------------- 1 file changed, 8 insertions(+), 26 deletions(-)