From patchwork Thu Oct 10 16:27:19 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Rob Herring (Arm)" X-Patchwork-Id: 13830533 X-Patchwork-Delegate: robh@kernel.org Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 68DD61D07A1; Thu, 10 Oct 2024 16:28:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728577685; cv=none; b=c+wozfnOQtdrNtw3GdcO147WpkwfQozlwMRfqn8Zrek5mvEg08yWWkdKDU/ImEXffy1fDnb6DVw5S7vBBToA+bGR1IefqvaVC9l2j9piXYYRXhJefoQN9FITF5vt6QQb/pui+RFKB1BMcM4zsJrhNnaUV2fyserfMeCCutg8aAE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1728577685; c=relaxed/simple; bh=z4IyvVjXjEZw7zQtMyfkFIU6h9M3fysnHZi4qbEv91k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=EC8CMrrjW4EWbbEtkJWS9DzQz1Uw5gdEP/fkfvrEUmjj0Qj+6OVcacC+APf1hIqLlPZ3fupDrQSAyTYaCqNF5/J0KMEHoAGZhKzL4cVMdsjtk9fEfRGf7yUVxPlyzuK/59ysPHwk03C/5nz74ZoIgFQOjQFNFPD9mpmG2pa3EDY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=kETxjbB+; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kETxjbB+" Received: by smtp.kernel.org (Postfix) with ESMTPSA id D2413C4AF09; Thu, 10 Oct 2024 16:28:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1728577685; bh=z4IyvVjXjEZw7zQtMyfkFIU6h9M3fysnHZi4qbEv91k=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=kETxjbB+qFxSVd8WfNceqjYnXjY3vmv3dRwsMF8CZ+Xr/bEtcrq2t7ERvDWGwfJxw 8wTvQ9gBjdi23hY2/44Igbq3o6q9y2P4L1jL3cPrTGSiAwy0LEJbFonUNxO1irntkf JOs46Rds7ENouyfUDdkUJKxXWnG0PoS/FgjWdv3xG8KJxSbphmBkTTRbJWyf3LcAHG PgqtFqtgHmQcqiLLvadGdWhX/8Z4nbW5l4MTL9vWgK3B9hhzRVcQvyPYyyChxqEJTg 8KPh9++W/SIlahpxo03BFj1xVTdns8hibyoMGFm3p24tt4j9vSv5B4nN6w9bMypuNb KCorX3nIJvRpA== From: "Rob Herring (Arm)" Date: Thu, 10 Oct 2024 11:27:19 -0500 Subject: [PATCH 6/7] of: Constify safe_name() kobject arg Precedence: bulk X-Mailing-List: linux-pci@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20241010-dt-const-v1-6-87a51f558425@kernel.org> References: <20241010-dt-const-v1-0-87a51f558425@kernel.org> In-Reply-To: <20241010-dt-const-v1-0-87a51f558425@kernel.org> To: Bjorn Helgaas , Andrew Morton , Saravana Kannan Cc: linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org X-Mailer: b4 0.15-dev The kobject is not modified by safe_name() function, so make it const. Signed-off-by: Rob Herring (Arm) Reviewed-by: Krzysztof Kozlowski --- drivers/of/kobj.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/of/kobj.c b/drivers/of/kobj.c index aeb1709d4e85..cab9b169dc67 100644 --- a/drivers/of/kobj.c +++ b/drivers/of/kobj.c @@ -37,7 +37,7 @@ static ssize_t of_node_property_read(struct file *filp, struct kobject *kobj, } /* always return newly allocated name, caller must free after use */ -static const char *safe_name(struct kobject *kobj, const char *orig_name) +static const char *safe_name(const struct kobject *kobj, const char *orig_name) { const char *name = orig_name; struct kernfs_node *kn;