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 X-Patchwork-Id: 1995557 Return-Path: X-Original-To: incoming-dt@patchwork.ozlabs.org Delivered-To: patchwork-incoming-dt@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20201202 header.b=kETxjbB+; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=vger.kernel.org (client-ip=2604:1380:4601:e00::3; helo=am.mirrors.kernel.org; envelope-from=devicetree+bounces-110019-incoming-dt=patchwork.ozlabs.org@vger.kernel.org; receiver=patchwork.ozlabs.org) Received: from am.mirrors.kernel.org (am.mirrors.kernel.org [IPv6:2604:1380:4601:e00::3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1)) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4XPZw84wlpz1xtv for ; Fri, 11 Oct 2024 03:29:28 +1100 (AEDT) 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 4BACA1F21BD5 for ; Thu, 10 Oct 2024 16:29:26 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id B013E1D0E10; Thu, 10 Oct 2024 16:28:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="kETxjbB+" X-Original-To: devicetree@vger.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 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: devicetree@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;