From patchwork Sun Apr 28 17:15:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 792999 Received: from smtp.smtpout.orange.fr (smtp-24.smtpout.orange.fr [80.12.242.24]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E19A11DFC5; Sun, 28 Apr 2024 17:15:51 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.24 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714324554; cv=none; b=YHPAg5L4Y+nfuecd8PQeMZ5gpG0eC2N3DMBMLtDNJDp/CuhsDi26ZqEAqTXA4+HcdSi2k438t9JlqtVSPo9LX36oL+rbFpdHTKql+1jp26DKE42zmKQHFgjYKak5x34BOM78vBA2rsY9EjtAwueL4Dn+niv9pgPzm4XeBsQlEBU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714324554; c=relaxed/simple; bh=2KHTn+gBnvvbtZfhLE6uBJkjWrOqKvIQgnSHQYp8Vvk=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=Cbej6UZVwW/S1Odz8/5je5dKAZy7Z/Y/MYJsT/TNJjByOkoNmP2g2IuMqRGngQjQypJ42PzRSwHO994Vc4yA/SW9xyX7bmAO5sO3u4dAh+hWURbNAx1Nx9am4RLU4m15C6nzxHgHFsTKPr18pTongFJTSH78tYdA4RYxghkYEXU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=EhAuTmf2; arc=none smtp.client-ip=80.12.242.24 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="EhAuTmf2" Received: from localhost.localdomain ([86.243.17.157]) by smtp.orange.fr with ESMTPA id 187rso5aKhCCi187rsyVv2; Sun, 28 Apr 2024 19:15:44 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1714324544; bh=BK7RPti6UkUvOmAIkmd/9QNpbw8XpoHnN+HqRtfulTg=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=EhAuTmf2or+j6lTj88rnGXo2YukhSn7MMNKI/e9G4bdE47O+60stWBz3C8JiZNlL0 51PPkwi33sCMpgxr31fHyK0kb21yMQ3k3jeLwyjB77OwmxTiYnlvF0flg51V6i84pS Vd7vl+7Wg/F6x8B8KMm9GNwQL+Tzzg3hbQfZmTH7jxF1cspmCb7YviZDoFxVK5+RCW T4FDurAq2boUSy0Ap4jcKnWtTIyYQChPvD60A4boXJWi/aMwbPyTPC6LwY7zp8DjJx bPOIpGLnXD1UIrE3NLYpy4DjNaAL7JrKNi4lTPbcwij5tchLaIRZVzJ2GVSB72LJQl o8qU2/I4B46wg== X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 28 Apr 2024 19:15:44 +0200 X-ME-IP: 86.243.17.157 From: Christophe JAILLET To: Pavel Machek , Lee Jones Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-leds@vger.kernel.org Subject: [PATCH 1/2] leds: lp50xx: Remove an unused field in struct lp50xx_led Date: Sun, 28 Apr 2024 19:15:24 +0200 Message-ID: X-Mailer: git-send-email 2.44.0 Precedence: bulk X-Mailing-List: linux-leds@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In "struct lp50xx_led", the 'bank_modules' field is unused. Remove it. Found with cppcheck, unusedStructMember. Signed-off-by: Christophe JAILLET --- Compile tested only. It was added added in the initial commit 242b81170fb8 ("leds: lp50xx: Add the LP50XX family of the RGB LED driver") but was never used. --- drivers/leds/leds-lp50xx.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/leds/leds-lp50xx.c b/drivers/leds/leds-lp50xx.c index 68c4d9967d68..407eddcf17c0 100644 --- a/drivers/leds/leds-lp50xx.c +++ b/drivers/leds/leds-lp50xx.c @@ -265,7 +265,6 @@ static const struct lp50xx_chip_info lp50xx_chip_info_tbl[] = { struct lp50xx_led { struct led_classdev_mc mc_cdev; struct lp50xx *priv; - unsigned long bank_modules; u8 ctrl_bank_enabled; int led_number; }; From patchwork Sun Apr 28 17:15:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe JAILLET X-Patchwork-Id: 793198 Received: from smtp.smtpout.orange.fr (smtp-23.smtpout.orange.fr [80.12.242.23]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 33FA93BBCA; Sun, 28 Apr 2024 17:25:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=80.12.242.23 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714325127; cv=none; b=QOLADktJxRr6rjoqZU+C8sPhSrD2AfnGPhYeLnu9BOKTpwVBCi7GZGE89yBTLgRh3el+a8MSoQEKWJaFkuQX6nOYB3tOQs6r4kmX++sNWkqEKcVZGhReOXWg8nKFHJeJJU8nSQvNhhN/wMLud7LUn6AmtHbNS1esR8BnsOAVlCM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1714325127; c=relaxed/simple; bh=5Ie8qBiBobpvq91m8AfEjh4NgFLM5+PpWwD6L45jGsM=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NLqtx6GSNl8U62BhwebXP5ETWVcoFFIywcYR+SVIhr8EOMc1JWEkYybtOGMVPTQOyjXeYlwPXf6y7V+AfHVqyLNVYgihis2vqXAIDjHWRIT35dUnsYnGX1xp/CjPnPxrUu6qo5geYDs8ocY/SvRDtB9Ifvnqo5Eaf271Ud5VoFA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr; spf=pass smtp.mailfrom=wanadoo.fr; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b=ed0LQV1E; arc=none smtp.client-ip=80.12.242.23 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=wanadoo.fr Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=wanadoo.fr header.i=@wanadoo.fr header.b="ed0LQV1E" Received: from localhost.localdomain ([86.243.17.157]) by smtp.orange.fr with ESMTPA id 187rso5aKhCCi187ysyVvo; Sun, 28 Apr 2024 19:15:51 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=wanadoo.fr; s=t20230301; t=1714324551; bh=5CZgwmjLxv43WMhGXX/Yzm0AcpGimpypUVeUw8u1ncs=; h=From:To:Subject:Date:Message-ID:MIME-Version; b=ed0LQV1EVZScxldK46Qkqnyk6u95rniGUT3+SheeNMfBTOOE5RasW+Jy5QDMb3hYo nhKlu4DH3YvdGfJZXDrHyyGdxA8k2mnJV+tWV55gqsWs1EbmaWdRS7Zo7KeiA81OYy 1HLwkDK4i2APklK5H5es5gr6MUFjwFBYrm0pHvKPhiqVLjMIMySIxLn6Oq9qWc2QGk WCZK1jy73Itd31EFP6sbaxu3cGzUhQccKeyxnR8+MZMYriOCiuDkyYAbJqwJK6/3xy IzTBAmmjjwYjBu/gKPq2u5kZDBNQHWtA/Bs2//pcV90GHaL4Gi6jLlqvQ3FvUc78K4 cd498XOTL1JjA== X-ME-Helo: localhost.localdomain X-ME-Auth: Y2hyaXN0b3BoZS5qYWlsbGV0QHdhbmFkb28uZnI= X-ME-Date: Sun, 28 Apr 2024 19:15:51 +0200 X-ME-IP: 86.243.17.157 From: Christophe JAILLET To: Pavel Machek , Lee Jones Cc: linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org, Christophe JAILLET , linux-leds@vger.kernel.org Subject: [PATCH 2/2] leds: lp50xx: Remove an unused field in struct lp50xx Date: Sun, 28 Apr 2024 19:15:25 +0200 Message-ID: X-Mailer: git-send-email 2.44.0 In-Reply-To: References: Precedence: bulk X-Mailing-List: linux-leds@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 In "struct lp50xx", the 'num_of_banked_leds' field is only written and is never used. Moreover, storing such an information in the 'priv' structure looks pointless. So, remove it. Signed-off-by: Christophe JAILLET --- Compile tested only. --- drivers/leds/leds-lp50xx.c | 4 ---- 1 file changed, 4 deletions(-) diff --git a/drivers/leds/leds-lp50xx.c b/drivers/leds/leds-lp50xx.c index 407eddcf17c0..175d4b06659b 100644 --- a/drivers/leds/leds-lp50xx.c +++ b/drivers/leds/leds-lp50xx.c @@ -278,7 +278,6 @@ struct lp50xx_led { * @dev: pointer to the devices device struct * @lock: lock for reading/writing the device * @chip_info: chip specific information (ie num_leds) - * @num_of_banked_leds: holds the number of banked LEDs * @leds: array of LED strings */ struct lp50xx { @@ -289,7 +288,6 @@ struct lp50xx { struct device *dev; struct mutex lock; const struct lp50xx_chip_info *chip_info; - int num_of_banked_leds; /* This needs to be at the end of the struct */ struct lp50xx_led leds[]; @@ -403,8 +401,6 @@ static int lp50xx_probe_leds(struct fwnode_handle *child, struct lp50xx *priv, return -EINVAL; } - priv->num_of_banked_leds = num_leds; - ret = fwnode_property_read_u32_array(child, "reg", led_banks, num_leds); if (ret) { dev_err(priv->dev, "reg property is missing\n");