Received: by 2002:ab2:68c1:0:b0:1fd:9a81:d0e4 with SMTP id e1csp390884lqp; Sun, 9 Jun 2024 00:27:52 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUsVIPt9PGR8tPVSIjnX3VSHw6B4udc4CHvt56ZfK5pXwE4bIf33ux/oVGM3sbdWYNGZx0X2IgVRHKHhrEUhkaWdxOvzn9vP+lnaghDSQ== X-Google-Smtp-Source: AGHT+IFvyzh/f/M1wND53qdldVP6NIlg4QER8KXzzUIAopmfxVvWkWm+t77y96ypPHnFUtDM5e6y X-Received: by 2002:a17:906:840e:b0:a6f:e93:f8f1 with SMTP id a640c23a62f3a-a6f0e93fa78mr208505366b.14.1717918071884; Sun, 09 Jun 2024 00:27:51 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717918071; cv=pass; d=google.com; s=arc-20160816; b=RqKqLpu2fdpQBkcLWmEMXVc/mcd2h3Rg5bEeURJzgc00LE1t7+fzqYIU5fYYLOmsM0 hy2fgE7PU/IwEQQxo7941epFniO1ciSARF8rG56Gf4KbTWt/O4C4KNosQs3mShjz5T6q DyK5jfWcja+jQ99JERyGgV6JRsv+Xj3P6b9+nSvGuoK80qps52PpbkCLljpVVV0q/38P jFSnIFYss0+R575IZq8eB9sY+Zv76zz1WNoOXF0Ed86FQ8yoYHQMdSOPj5E6APcfJlbE tA1Yhh4cKHU6XIfP2VwaVo6o8ixGpVFTxCr7R9V2ytqLaXdKrZx6UL+uqCx32Du8epA7 f0Pg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=EMLo9VzJmNo9SkDsgBwS7OGk2CNBpjSI19zRG6yABsc=; fh=3fJWFrtiiPD+viya4NwE6ZvCPdMm1SLkJQEHzoJ8YWk=; b=o1XewfSs+M4PMyytKNx4DlTbcNQYtF0YOubnEx7zfz0KblGOpYRk+wzZGlHT2sDooX yTWm5j7x9oPR716ZPL8XbEoJAwCmtZZdcx3664JTQ8qkRX+Jh1VZSCZeQAR5ZlStSMJ9 Ckf1jw2kfHSgXmVBgnLu3OCoZopcvOCFuyElTJp3nZVr0ZYkyyZE9YZ0/zHzQLuX3cuz vsh7UEM50N0MKICNPNLdPB34m4lxw3fYbZHFwwzun+TN13uX7tDdQSa6/JE9JCYp3/rw S3LF+zLFBWICCFlsfL/yvlmBOWmamplqTd0kIS/UarUNfh1MHI+jrMBRa6x1Vs6swYsI LPNg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=LnlR9jpB; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net dmarc=pass fromdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-207264-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207264-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=weissschuh.net Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id a640c23a62f3a-a6f0783d276si122576966b.42.2024.06.09.00.27.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 09 Jun 2024 00:27:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-207264-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=LnlR9jpB; arc=pass (i=1 spf=pass spfdomain=weissschuh.net dkim=pass dkdomain=weissschuh.net dmarc=pass fromdomain=weissschuh.net); spf=pass (google.com: domain of linux-kernel+bounces-207264-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-207264-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=weissschuh.net Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 175991F209A3 for ; Sun, 9 Jun 2024 07:27:50 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 73EC8200C7; Sun, 9 Jun 2024 07:27:22 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="LnlR9jpB" Received: from todd.t-8ch.de (todd.t-8ch.de [159.69.126.157]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 22FC217997; Sun, 9 Jun 2024 07:27:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=159.69.126.157 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717918041; cv=none; b=k6/K20b7QML5MX2UB06osxKDwEzEUWTHfIsDnF46e6C9NtNFJMEarNIU3AZEimj0YLLsRi1N3TRfjL59K7UhpiQ2D/31KN3rXQh6OqBn9jcqAgCq5x2CaPnpVKBH/8iLg3+APOjKR5u74SxTxIHyU2qhsQl6/q1vAPQq4eDH6yQ= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717918041; c=relaxed/simple; bh=RJZgnCB5BUCDv22+RPw4ZAtNO1sIx6+p/3RbQvlhnWs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rO6oB9frkvmb1DXgPccXSFEwtZInjBxF9GOmROmlEhKPBRrV1PKzXr5EbixN8iL6o4h0eZCXPPPCr80sgM9EnwCigvOx26vtIrtrrjWAb6sUgRTI9VJX4qhy4MMzP/CAj//fXFBQl8LZ3KyU/Uoj8s8hr/Lu60GkuimxpfMeCLY= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net; spf=pass smtp.mailfrom=weissschuh.net; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b=LnlR9jpB; arc=none smtp.client-ip=159.69.126.157 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=weissschuh.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=weissschuh.net DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=weissschuh.net; s=mail; t=1717918035; bh=RJZgnCB5BUCDv22+RPw4ZAtNO1sIx6+p/3RbQvlhnWs=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=LnlR9jpBQkNjBNVbOqnzzg1QcyeODyClP98zajH9iop3yd4v81XjLVaffExACQWww fLvzIQvDchYk8p7PibGOJDpkSYX9i6ZTok119Po3VmU74MrydbaHcPDYdMvD9/t3iv FT41UFIR88PLrYJWI7PjuJXbP3GlIwxYrYGLo7Os= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Sun, 09 Jun 2024 09:27:14 +0200 Subject: [PATCH 3/5] ACPI: battery: constify powersupply properties Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Message-Id: <20240609-acpi-battery-cleanup-v1-3-344517bdca73@weissschuh.net> References: <20240609-acpi-battery-cleanup-v1-0-344517bdca73@weissschuh.net> In-Reply-To: <20240609-acpi-battery-cleanup-v1-0-344517bdca73@weissschuh.net> To: "Rafael J. Wysocki" , Len Brown Cc: linux-acpi@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1717918035; l=1841; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=RJZgnCB5BUCDv22+RPw4ZAtNO1sIx6+p/3RbQvlhnWs=; b=P4wUdzdC2tWG0jbHRMuRKjRLTtMm1Ac9HwtTuXg+7G0CROrZy2CZ090nUUBru8n4VJR88RPh2 riqFeGR8a3ZBImDfQ+rueWzfmOa7Q928VXzv9iQfDJT22IKOVjAGTkr X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= The arrays are never modified, make them const. Signed-off-by: Thomas Weißschuh --- drivers/acpi/battery.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/acpi/battery.c b/drivers/acpi/battery.c index b379401ff1c2..984236b95dff 100644 --- a/drivers/acpi/battery.c +++ b/drivers/acpi/battery.c @@ -308,7 +308,7 @@ static int acpi_battery_get_property(struct power_supply *psy, return ret; } -static enum power_supply_property charge_battery_props[] = { +static const enum power_supply_property charge_battery_props[] = { POWER_SUPPLY_PROP_STATUS, POWER_SUPPLY_PROP_PRESENT, POWER_SUPPLY_PROP_TECHNOLOGY, @@ -326,7 +326,7 @@ static enum power_supply_property charge_battery_props[] = { POWER_SUPPLY_PROP_SERIAL_NUMBER, }; -static enum power_supply_property charge_battery_full_cap_broken_props[] = { +static const enum power_supply_property charge_battery_full_cap_broken_props[] = { POWER_SUPPLY_PROP_STATUS, POWER_SUPPLY_PROP_PRESENT, POWER_SUPPLY_PROP_TECHNOLOGY, @@ -340,7 +340,7 @@ static enum power_supply_property charge_battery_full_cap_broken_props[] = { POWER_SUPPLY_PROP_SERIAL_NUMBER, }; -static enum power_supply_property energy_battery_props[] = { +static const enum power_supply_property energy_battery_props[] = { POWER_SUPPLY_PROP_STATUS, POWER_SUPPLY_PROP_PRESENT, POWER_SUPPLY_PROP_TECHNOLOGY, @@ -358,7 +358,7 @@ static enum power_supply_property energy_battery_props[] = { POWER_SUPPLY_PROP_SERIAL_NUMBER, }; -static enum power_supply_property energy_battery_full_cap_broken_props[] = { +static const enum power_supply_property energy_battery_full_cap_broken_props[] = { POWER_SUPPLY_PROP_STATUS, POWER_SUPPLY_PROP_PRESENT, POWER_SUPPLY_PROP_TECHNOLOGY, -- 2.45.2