Message ID | 20231018124007.1306159-3-sunilvl@ventanamicro.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4759562vqb; Wed, 18 Oct 2023 05:41:17 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEdul9WgZQNJqTUk16LcScSnjPhJgHcv11LOIDO5AIq1KNblRO26i66IpADupziH1KeVi6M X-Received: by 2002:a05:6358:e927:b0:166:d9c3:941d with SMTP id gk39-20020a056358e92700b00166d9c3941dmr5467437rwb.3.1697632877077; Wed, 18 Oct 2023 05:41:17 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697632877; cv=none; d=google.com; s=arc-20160816; b=rRuuw5eTuSDpaEUCa2i4wU2efqqYLQT6opD3DME38ibxOp00BvoOvIiAMt2pOzKOm4 VERinbOjBKcY4Z6kSfwlEdjhdexnQJfs3d12zXBByzsvOghrb6wtAytfS0atdRo2mYms fjICree5uaeck6oNgoMk/SD3bRTg7o4Pom7irqphSmCf9B4IbgwY7EHP6b6eGEfns0bx +LjI8XgyVG0Yiqc7iroiKUGrs42JqXB57uO9ZaA89OHUq75ej0xkXQPp+i6fUs0jBPry NOHbffklsOYOOqmVuw4tf3GwQ2m0mzxy3APsFMyfCps9glf8NAlYOZSQtiTsQVZU3kTn FcSg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=TgXGiaZbK4m4HiMVh4BDyfHZ4ZNWdeAQabBtO14MLJk=; fh=GA8jgg99n1wbdtGTXlvdoBzs7t1k8r/1aGEnK0qMx54=; b=FCkQUPCAPh0IXnoIdpr2HjZeIToWTlX2OFs3c1eeYXX18IERqV217w6AAt5+HGXoso HmeVyDaeLee5Igl60qnikswA40uzc5KHKml6bdoCPDMBpOboSXr9J2o+x/SDLi95jLxy Q2Am76sTOx3e8+t3tOQq9PddZ94uQ0JIrzr8dwQ1rxaeo0HB/flHc0wKmpQMbatBdiUY oJ8TM4i6/LYHUlFqjTA5ASnoxkbR5o16Fqihuw/pfqASC8ffs0eKVddCzXJaFx5odVmg /BuQIYtnPSPyUbvlHfGFvq2hMXyNTUGjyfaxGVshkUtzJMQJX7ytsHEbSILl9RzSrBAv cZhQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=TVGXfpil; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from fry.vger.email (fry.vger.email. [2620:137:e000::3:8]) by mx.google.com with ESMTPS id b1-20020a056a00114100b0068fac3509a9si4073267pfm.350.2023.10.18.05.41.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 05:41:17 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) client-ip=2620:137:e000::3:8; Authentication-Results: mx.google.com; dkim=pass header.i=@ventanamicro.com header.s=google header.b=TVGXfpil; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:8 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by fry.vger.email (Postfix) with ESMTP id 7E7498087275; Wed, 18 Oct 2023 05:40:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at fry.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230296AbjJRMk1 (ORCPT <rfc822;zwp10758@gmail.com> + 23 others); Wed, 18 Oct 2023 08:40:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37038 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230355AbjJRMkX (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 18 Oct 2023 08:40:23 -0400 Received: from mail-pf1-x435.google.com (mail-pf1-x435.google.com [IPv6:2607:f8b0:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 387B6116 for <linux-kernel@vger.kernel.org>; Wed, 18 Oct 2023 05:40:22 -0700 (PDT) Received: by mail-pf1-x435.google.com with SMTP id d2e1a72fcca58-6b20a48522fso4385971b3a.1 for <linux-kernel@vger.kernel.org>; Wed, 18 Oct 2023 05:40:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ventanamicro.com; s=google; t=1697632821; x=1698237621; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=TgXGiaZbK4m4HiMVh4BDyfHZ4ZNWdeAQabBtO14MLJk=; b=TVGXfpilDcoTQyjcyxM4vGOMfK6awfsLvj+WpPGp0FQp/Z+prg8AehGJc8slm2Lz3o gWXch3bUg2KcUuFeX1kSPtODJcrWVAhrOk6G6JG+C8rZIFd1is8O4zsFMOMYV7MlKf1O HNT4d6U/PqZIcM9kV3KEuxFF2xRXJJ9cRB5FvWpKC3194UjbUCO7XC++Oll8622+tNWO BkQh3bIR7KwR/G9M0a/UztF/zVzBQx6f/bFcLl8YhXreyl4t6LHBLzwhBId4m+0VGZuD hYA2VXs1h9oxJe5YZscAJlZ5skygD3yGeKN4SzJKhe9GqE3VJftNmPbk/SuEaH/Tjy2k hwcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697632821; x=1698237621; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=TgXGiaZbK4m4HiMVh4BDyfHZ4ZNWdeAQabBtO14MLJk=; b=su7tf71Q+B+3AigrHBB7vNZj0UR/jlhUH3HV/qi1KeXUQ7hg/2VVr55cdUPQxTPtLx JZiyPojHZe5tpLvPKUdk11nH41w2XMk4Pch3TZ/Ssj5KQ03bv+QAQdTcHYWrz1KortPf YI94I5g/WpDjt2QuHae8ikRqqEkAYrukx6Lkoq2SPmhH+8EYfwYsmArAy2OhTdbCiht8 5z/BsOXNvm57EDVQLFxy2iYdZJyfJ+cTGINWsBksyeFZ90sQfooBloMZ/Mq0gKHCfklD tpe3TItc+LpOWsTr8gPoa+EPMxN9gyWwU82i1KYUTvLChmmMTGsRD/Wl0WJSlCQY5NYx 9a4g== X-Gm-Message-State: AOJu0Yx0rsJMIE0tsOCXcxRbkRIosTBYV/LYsCjiX1kIv3DvygL4YF8N asc0ve329p76uWcx+WuLKemWVw== X-Received: by 2002:a05:6a00:24d4:b0:692:b6e8:ce88 with SMTP id d20-20020a056a0024d400b00692b6e8ce88mr5494314pfv.17.1697632821422; Wed, 18 Oct 2023 05:40:21 -0700 (PDT) Received: from sunil-pc.Dlink ([106.51.188.78]) by smtp.gmail.com with ESMTPSA id w190-20020a6382c7000000b005891f3af36asm1599267pgd.87.2023.10.18.05.40.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 05:40:21 -0700 (PDT) From: Sunil V L <sunilvl@ventanamicro.com> To: linux-riscv@lists.infradead.org, linux-kernel@vger.kernel.org, linux-acpi@vger.kernel.org Cc: Paul Walmsley <paul.walmsley@sifive.com>, Palmer Dabbelt <palmer@dabbelt.com>, Albert Ou <aou@eecs.berkeley.edu>, "Rafael J . Wysocki" <rafael@kernel.org>, Len Brown <lenb@kernel.org>, Andrew Jones <ajones@ventanamicro.com>, Conor Dooley <conor.dooley@microchip.com>, Anup Patel <apatel@ventanamicro.com>, Sunil V L <sunilvl@ventanamicro.com> Subject: [PATCH v4 -next 2/4] RISC-V: ACPI: Update the return value of acpi_get_rhct() Date: Wed, 18 Oct 2023 18:10:05 +0530 Message-Id: <20231018124007.1306159-3-sunilvl@ventanamicro.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20231018124007.1306159-1-sunilvl@ventanamicro.com> References: <20231018124007.1306159-1-sunilvl@ventanamicro.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=2.7 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, RCVD_IN_SBL_CSS,SPF_HELO_NONE,SPF_PASS autolearn=no autolearn_force=no version=3.4.6 X-Spam-Level: ** X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on fry.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (fry.vger.email [0.0.0.0]); Wed, 18 Oct 2023 05:40:38 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780097091190153345 X-GMAIL-MSGID: 1780097091190153345 |
Series |
RISC-V: ACPI improvements
|
|
Commit Message
Sunil V L
Oct. 18, 2023, 12:40 p.m. UTC
acpi_get_rhct() currently returns pointer to acpi_table_header
structure. But since this is specific to RHCT, return pointer to
acpi_table_rhct structure itself.
Suggested-by: Andrew Jones <ajones@ventanamicro.com>
Signed-off-by: Sunil V L <sunilvl@ventanamicro.com>
---
drivers/acpi/riscv/rhct.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
Comments
On Wed, Oct 18, 2023 at 06:10:05PM +0530, Sunil V L wrote: > acpi_get_rhct() currently returns pointer to acpi_table_header > structure. But since this is specific to RHCT, return pointer to > acpi_table_rhct structure itself. > > Suggested-by: Andrew Jones <ajones@ventanamicro.com> > Signed-off-by: Sunil V L <sunilvl@ventanamicro.com> > --- > drivers/acpi/riscv/rhct.c | 6 +++--- > 1 file changed, 3 insertions(+), 3 deletions(-) > > diff --git a/drivers/acpi/riscv/rhct.c b/drivers/acpi/riscv/rhct.c > index b280b3e9c7d9..489b0e93b1e5 100644 > --- a/drivers/acpi/riscv/rhct.c > +++ b/drivers/acpi/riscv/rhct.c > @@ -9,7 +9,7 @@ > > #include <linux/acpi.h> > > -static struct acpi_table_header *acpi_get_rhct(void) > +static struct acpi_table_rhct *acpi_get_rhct(void) > { > static struct acpi_table_header *rhct; > acpi_status status; > @@ -26,7 +26,7 @@ static struct acpi_table_header *acpi_get_rhct(void) > } > } > > - return rhct; > + return (struct acpi_table_rhct *)rhct; > } > > /* > @@ -48,7 +48,7 @@ int acpi_get_riscv_isa(struct acpi_table_header *table, unsigned int cpu, const > BUG_ON(acpi_disabled); > > if (!table) { > - rhct = (struct acpi_table_rhct *)acpi_get_rhct(); > + rhct = acpi_get_rhct(); > if (!rhct) > return -ENOENT; > } else { > -- > 2.39.2 > Reviewed-by: Andrew Jones <ajones@ventanamicro.com>
diff --git a/drivers/acpi/riscv/rhct.c b/drivers/acpi/riscv/rhct.c index b280b3e9c7d9..489b0e93b1e5 100644 --- a/drivers/acpi/riscv/rhct.c +++ b/drivers/acpi/riscv/rhct.c @@ -9,7 +9,7 @@ #include <linux/acpi.h> -static struct acpi_table_header *acpi_get_rhct(void) +static struct acpi_table_rhct *acpi_get_rhct(void) { static struct acpi_table_header *rhct; acpi_status status; @@ -26,7 +26,7 @@ static struct acpi_table_header *acpi_get_rhct(void) } } - return rhct; + return (struct acpi_table_rhct *)rhct; } /* @@ -48,7 +48,7 @@ int acpi_get_riscv_isa(struct acpi_table_header *table, unsigned int cpu, const BUG_ON(acpi_disabled); if (!table) { - rhct = (struct acpi_table_rhct *)acpi_get_rhct(); + rhct = acpi_get_rhct(); if (!rhct) return -ENOENT; } else {