Received: by 2002:a05:6500:2018:b0:1fb:9675:f89d with SMTP id t24csp571595lqh; Fri, 31 May 2024 09:35:34 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCUYySNZZ3iHO6iva1E8qAflB2npe+C0vzHHOMe/fS+wI3yDu29brISK3S97ujgu3k2M/NKI7gdRlB04yXfnoc1Kv8phTQsIZTS+s7gcvA== X-Google-Smtp-Source: AGHT+IEn1Od+omBjKL7h741gfua6bj7g4TUnoju54hdiyzGE9w//ZVdApgGmh3R/RfDfR8qWHypi X-Received: by 2002:a50:9518:0:b0:57a:30b3:a5b7 with SMTP id 4fb4d7f45d1cf-57a3635999amr1712944a12.7.1717173334624; Fri, 31 May 2024 09:35:34 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1717173334; cv=pass; d=google.com; s=arc-20160816; b=Nx4LjgNaegjWj10rfrrSSIuNvpjxlTUisJRSqVsm6IdEUNiRatp0AgMjpBkyACqidQ 6yCdPZdQEiTgh7vTse/gAL5WtWwVJvo4Lir2LugRcG/CmyQTpIViJXxcimnqpBQzj5HQ Gc7EkE/W2D4+S0wvLczMF16sR2sfitz6Df/JIq2j72xGwHEF8jHwoXuyzW8GnJEWiPKW vnEE5F1Tbrubs5uNr8l5v0XaR7mFbZKYey/7IsXFZk/DnA5rf4tf5Ws6yEHQYJYDysF9 xuq9TJ1onyH2Yu3VC/MIAi/WUorkmKSojogKg7ZB0EJnWoapfues2sSQ+SgwxSxjxGzJ a2ag== 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=r8fW9nzqZks7yL/zT8stjClTRMhsNmcRMjhodghDtsc=; fh=XLi9m/0X8PjVhIWQEAZtk+9KXM176oIARH6s/tAj4ok=; b=nWLWVq5Imbudq54rK42SWwgBqmrflupCqZPNxfgEAYholNowcuQSUYVBcSd+RibVZo 7AEeg4UUb6pufPqv9U1eaKL4AhvKYcSfLVm3VEWSEOSAv3D5zPU/pJe4Zj+RYLym6iUF hQvVSsGiEn3xQ7cE/8/Clv+ecX3/EXog1tntXMYwBbU7ftgItmu/oq8jYO8Y6ndUzqid dBziudss6Jkrs0htnrVbtkYyP+1UU2ZBb+tWvHBB+R4EW6+fzGtPvNG5/0EjrFIAcv/s MVNvi7BAKpfFAj4NwQDTJA+ipGwq3467jpfrnBEvb/T4QR0Xzton6cFCHYp2WTkZWyDu TJLQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=TXYxNV2B; 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-197163-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197163-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 4fb4d7f45d1cf-57a31c77777si1098300a12.407.2024.05.31.09.35.34 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 31 May 2024 09:35:34 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-197163-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=TXYxNV2B; 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-197163-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-197163-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 4DD041F26D25 for ; Fri, 31 May 2024 16:35:34 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 8D23417D8B0; Fri, 31 May 2024 16:33:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="TXYxNV2B" 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 0BEE517D88A; Fri, 31 May 2024 16:33:41 +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=1717173223; cv=none; b=thcVm50nN9AYvqvlh8SM851OexzOMG9Hr7rQI3+phyPRxHfydcc/yq+Gnq8E1veR9RCnv8+0DDBAC+L2aVG1jjOogkajyTxJmGJeE/4/0Xn21dIx2N5B3oeoiIQGwwIUBxyjeODAqcCVpiosmM3VYF2lzGrN8YnyfRqaQMAm5ks= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1717173223; c=relaxed/simple; bh=mR6GzlkWH3qHprHn11q+4xst17qh+XBAHkTQgtLxS4o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=Cv9JtLoHvNCRSZ1PuvmrBcSKFRZMvq91b3Uk+MLsqpP3jKvC3r2g9mf/7m1LQdXiXPLuWX66OTJ4WDKKQa75d/bmhaHqf3MMpYkAk2O3uOMX8YfDLj4VGGcdQ8/NMr8hespfkhPNCWCBSj1jlTP74XU7THd7wQNpXbWPc/X1Egk= 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=TXYxNV2B; 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=1717173219; bh=mR6GzlkWH3qHprHn11q+4xst17qh+XBAHkTQgtLxS4o=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=TXYxNV2B//jK3MqoIzUgwNlLwzUfPNSFwgednrs+peOnP0kCUXd+amePHM8fFfjjK y18QbG1JpLyK5RST/1c9X6Z0nh9vDf7xB7SxEfg/MxFTUitxWhqXtHWBzFSWvE6RI6 ZILZ4Z8jJZYHbVNiYAn10AlLSjyk/iitSVSYrAmQ= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Fri, 31 May 2024 18:33:32 +0200 Subject: [PATCH v2 2/5] leds: multicolor: Use led_get_color_name() function 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: <20240531-cros_ec-led-v2-2-6cc34408b40d@weissschuh.net> References: <20240531-cros_ec-led-v2-0-6cc34408b40d@weissschuh.net> In-Reply-To: <20240531-cros_ec-led-v2-0-6cc34408b40d@weissschuh.net> To: Pavel Machek , Lee Jones , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= , Benson Leung , Guenter Roeck , Tzung-Bi Shih Cc: linux-leds@vger.kernel.org, linux-kernel@vger.kernel.org, chrome-platform@lists.linux.dev, Dustin Howett , Mario Limonciello , =?utf-8?q?Thomas_Wei=C3=9Fschuh?= X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1717173219; l=942; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=mR6GzlkWH3qHprHn11q+4xst17qh+XBAHkTQgtLxS4o=; b=tUA8JrwsAnM/01+XZiQJ1wK2eRlxXmLXA2mipUdTZ4tlgRS+Dhip9uCkV6wxFxR/F2ygTYpyE sWVEa58x0EnAcLS2wCm6/2M6TZWjhu6DmiuEJ+7zE7fyagdhqdSSpAG X-Developer-Key: i=linux@weissschuh.net; a=ed25519; pk=KcycQgFPX2wGR5azS7RhpBqedglOZVgRPfdFSPB1LNw= led_get_color_name() is a safer alternative to led_colors. led-class-multicolor.c is the only external user of led_colors and its removal allows unexporting the array. Signed-off-by: Thomas Weißschuh --- drivers/leds/led-class-multicolor.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/leds/led-class-multicolor.c b/drivers/leds/led-class-multicolor.c index ec62a4811613..584e3786a1e7 100644 --- a/drivers/leds/led-class-multicolor.c +++ b/drivers/leds/led-class-multicolor.c @@ -101,7 +101,7 @@ static ssize_t multi_index_show(struct device *dev, for (i = 0; i < mcled_cdev->num_colors; i++) { index = mcled_cdev->subled_info[i].color_index; - len += sprintf(buf + len, "%s", led_colors[index]); + len += sprintf(buf + len, "%s", led_get_color_name(index)); if (i < mcled_cdev->num_colors - 1) len += sprintf(buf + len, " "); } -- 2.45.1