Received: by 2002:a89:413:0:b0:1fd:dba5:e537 with SMTP id m19csp198458lqs; Thu, 13 Jun 2024 07:49:20 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCWHNaXBGlJZXoFjZnyVOLz855d18OwISDkdNfev8iPC+MRiG2d94oczDOm2sinbG4h3jtuEqpfN9VnXRLGqit8LtbxPymVfFw4VBnlJew== X-Google-Smtp-Source: AGHT+IEUKj4X/W3FCgSxB0ja3C97UhYOIYr+JNuspdYjxBJJ7bxeCmUywc0Qis+PCYGFpNRgrBJF X-Received: by 2002:ac8:5712:0:b0:440:5477:7198 with SMTP id d75a77b69052e-4415ac6c8dcmr55433371cf.62.1718290160674; Thu, 13 Jun 2024 07:49:20 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1718290160; cv=pass; d=google.com; s=arc-20160816; b=YsVi9/XsE2gUkuVQJdjhNFS+SgjlTy4tr4JyNu5SfNoyMnSf00lHJEu/SajZuIWAxo WKk2yBfVMs9wvveDMZK365/hXy4woQ0suNt/Bs9laALLONDb5CiwsvTkYHAFwOUA22wo 3eMEQDeSNxwUpfx/SnR0oYHwdVwouG7KHRMjYmFia2GuFHGgvikKRuEMx9nIWYM38XoA Mg0PnFGyYrxtDo68MSG0eNsLK40qtejUfN1En6wOOuovaw3qJdnBSaidoYduYL3ZFErY FUHwUcx9iGEYcIxYh1m1npz5xXrpJyQM8R98U83UswlIYqsnaCncI/z5euOiObbVmr0/ 5uWw== 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=YrA9lZW/l1yJwIp9+GNhgafyvodI7hcVrlz/UB7YZrw=; fh=XLi9m/0X8PjVhIWQEAZtk+9KXM176oIARH6s/tAj4ok=; b=F7lbDs//2uPwRNzGIDiYdG8YwAxZSkJBdHBAi0UwjBSQT0eUHWnCc2q7O2iU8SVArA ebKZgz+UxMAfI2WpL7IDhlQBMWZFFWQhXO7CmQkBXW/pMyoAAKaHNObgROjIMyRG18ZT JtQolCzQXArkL7x3IB1G4lKxP0kq8gVfkO8ZewfuQSYOHrsJOTAOF+WNyzdUWiyHVmKg RZeP7C6vGDSraNBPcrilTbZ9ULwScaT9riLjw7PnmGJ3ycFIcaW5jluUp39gM/XYZWm7 WdDUNe7Tv/NseJZhMDPTuQOcOVmlVLgEPpdktHIBUzauPSSszxTi/Opkq2NNHK/DmSeE PIrQ==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=XN1JFlti; 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-213464-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213464-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=QUARANTINE sp=QUARANTINE dis=NONE) header.from=weissschuh.net Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id d75a77b69052e-441f3102a50si14884081cf.705.2024.06.13.07.49.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 13 Jun 2024 07:49:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-213464-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@weissschuh.net header.s=mail header.b=XN1JFlti; 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-213464-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-213464-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 ny.mirrors.kernel.org (Postfix) with ESMTPS id ECEAE1C23CA5 for ; Thu, 13 Jun 2024 14:49:14 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 15A1E146A83; Thu, 13 Jun 2024 14:48:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=weissschuh.net header.i=@weissschuh.net header.b="XN1JFlti" 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 4245A145FEA; Thu, 13 Jun 2024 14:48:48 +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=1718290130; cv=none; b=DH9ewGyvSybQHK78EtosZsLLbGf8XelLk0V+/cdItviYlO9IhGCA6vD+sy1DR+tUjRNoYyN7LPGaeNdpqP3ynI5iSkqZ3vfNbyNym51BqF/5uGaRLezYOA8pYEreFXGbVGbBVOT0R0MFIKPGZLm0Dgkd237GMar/wtBCD2HwpfA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1718290130; c=relaxed/simple; bh=RYdWV51r8PcyeNbSw5etkeGipgLJ2iNvDv6KpRFCB3g=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=UBiU4M+WYADDXGhdDAakXHLdpoQL1DicWrXG5taLh+l1drDRKherLB6SEbQUAddMCoI6VmyESIiiwnrRW2vIW3DJnQAfSfjBcWSzXr0olBreGeaojBsWjPG3B/qmjtTp5qIn0pK85pbSeDJLm04KSJuoZrZA+M2cSd6w/4HnGWs= 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=XN1JFlti; 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=1718290120; bh=RYdWV51r8PcyeNbSw5etkeGipgLJ2iNvDv6KpRFCB3g=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=XN1JFltiFXp2L2rqTWR4Bz22ATckDg7dp1tfm/cpV2hBrSJEvEOCSoL97+FO3IO+z 85ywGoHF876rW5xjwbhMHGwN7zw3rMNyabdV8OpnQSAgk0NAQBXksKAKAK2j+e5tUS F6JedxHDukOqh/Zv8Ql0ybBwe6hROnjwyN0LtxKo= From: =?utf-8?q?Thomas_Wei=C3=9Fschuh?= Date: Thu, 13 Jun 2024 16:48:37 +0200 Subject: [PATCH v3 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: <20240613-cros_ec-led-v3-2-500b50f41e0f@weissschuh.net> References: <20240613-cros_ec-led-v3-0-500b50f41e0f@weissschuh.net> In-Reply-To: <20240613-cros_ec-led-v3-0-500b50f41e0f@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=1718290119; l=942; i=linux@weissschuh.net; s=20221212; h=from:subject:message-id; bh=RYdWV51r8PcyeNbSw5etkeGipgLJ2iNvDv6KpRFCB3g=; b=OItp3aZh/jgZ1XoXq/Awow9+PJGcoX1ucS+3ULAY1SaAQkDtBjZYWsqdkIXTJJsHIMeZ7pUsA CuWDYaZXNKMDlICN14C6oy/Lv+V9npjsNFOx04X51PW3RxG0yI4/cYO 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.2