From patchwork Fri Oct 11 13:06:57 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 175940 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp730558ill; Fri, 11 Oct 2019 06:08:01 -0700 (PDT) X-Google-Smtp-Source: APXvYqwox0owvZFLbPMx8pOergStPuqgzspvRfVI+3xa80AfkibhbXvHUkTJTIbLrh+AWSr0RW6W X-Received: by 2002:adf:e78c:: with SMTP id n12mr12375377wrm.212.1570799281415; Fri, 11 Oct 2019 06:08:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1570799281; cv=none; d=google.com; s=arc-20160816; b=cj/Fk3EFKOLXn2slHx4YqOZQPeiuxe4EUEfHjCR6WMcGPwtp+16kmV+0Jm7EkSAUQW C5IvyO01nrt0fjQ6TUHDfTyO2hhg6GTIiwb9HaNluKCTEjHxqhMZwfyXC+0WFWOX7kep mpWmqU9R9BzsvXfw0UNkOVFgaNPtG7QFcrApZgPhAk1CY7qhinxxP2zMZ+R1a111PfFF bt157fyAixL6plepXGlZcGNmCuRK7j8S30bvDLL5YNIZvng+QhDP9ZALEFUiVi/wLPK0 er6ZVgXxJr4J1IJUKTS/rmHjGygiFf+MgETzFRGAnUPIK6hf8DHldG4zS8y7x3vl7qd2 AZ7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=nbVVUZ3Qhf2Oih+Vzfzrpge7klNd8/7wkUn5sxV3aTo=; b=obc5Spw4Ntp57jJe/LelKVEpQ4CZZKa1p+nA2Ug0M5RjvOxztExPeE1h7pzRcVtWho 6B4D91xADpaCf5uwKSl08NUyXxosPS5bwki2b3jdiLcT7Y2sW7c27X0eWlm+wsOVuInv rc4Bp1QmjFhREB5DjTT/QfsjG74T2Ont0tkzcd4hMG9K4HwnihlZ+mXrBkntJrJIHTzU 9xDWaE6qtmy8mk+vKjwxd3dhpNqAunc+HHKA6miGJroaJvOKBxSFSztWn4oijCWuR3S6 c5/1LlgLT0hVkqhdoVl97VOXKN0nU0fdyzxI7vxNIQ+oKyr5+ovtlbkkj4mKA78krPV6 ECnQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=fWxihbeX; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id e11si5325418ejr.383.2019.10.11.06.08.01; Fri, 11 Oct 2019 06:08:01 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=fWxihbeX; spf=pass (google.com: best guess record for domain of linux-leds-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-leds-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728472AbfJKNH5 (ORCPT + 1 other); Fri, 11 Oct 2019 09:07:57 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:36954 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728258AbfJKNHY (ORCPT ); Fri, 11 Oct 2019 09:07:24 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9BD7MQQ078510; Fri, 11 Oct 2019 08:07:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1570799242; bh=nbVVUZ3Qhf2Oih+Vzfzrpge7klNd8/7wkUn5sxV3aTo=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=fWxihbeX8lPzOUIk/Ss8mFTGZ73O3uXFhknmu+vttKtqvjWjTCkHQgFBNskZGDbF5 RvxdpYyr6ugJ+bfbZDUgEZQrtVTggKGAWrXTjIGYiOrb1N37FyjL5Wqm0lcCutDSm+ idn/2HsV3ngmCxYyADRjw7tyC9BjLalGWminJhZE= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x9BD7MP0078730 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Fri, 11 Oct 2019 08:07:22 -0500 Received: from DFLE113.ent.ti.com (10.64.6.34) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 11 Oct 2019 08:07:17 -0500 Received: from fllv0040.itg.ti.com (10.64.41.20) by DFLE113.ent.ti.com (10.64.6.34) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5 via Frontend Transport; Fri, 11 Oct 2019 08:07:17 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0040.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9BD7LWV118600; Fri, 11 Oct 2019 08:07:21 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v12 16/16] leds: lp5523: Fix checkpatch issues in the code Date: Fri, 11 Oct 2019 08:06:57 -0500 Message-ID: <20191011130657.4713-17-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191011130657.4713-1-dmurphy@ti.com> References: <20191011130657.4713-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-leds-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-leds@vger.kernel.org Fix checkpatch errors and warnings for the LP5523.c device driver. Signed-off-by: Dan Murphy --- drivers/leds/leds-lp5523.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) -- 2.22.0.214.g8dca754b1e diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c index 5d6002e4d657..3c7c2e68e137 100644 --- a/drivers/leds/leds-lp5523.c +++ b/drivers/leds/leds-lp5523.c @@ -23,13 +23,13 @@ #define LP5523_PROGRAM_LENGTH 32 /* bytes */ /* Memory is used like this: - 0x00 engine 1 program - 0x10 engine 2 program - 0x20 engine 3 program - 0x30 engine 1 muxing info - 0x40 engine 2 muxing info - 0x50 engine 3 muxing info -*/ + * 0x00 engine 1 program + * 0x10 engine 2 program + * 0x20 engine 3 program + * 0x30 engine 1 muxing info + * 0x40 engine 2 muxing info + * 0x50 engine 3 muxing info + */ #define LP5523_MAX_LEDS 9 /* Registers */ @@ -326,7 +326,7 @@ static int lp5523_update_program_memory(struct lp55xx_chip *chip, const u8 *data, size_t size) { u8 pattern[LP5523_PROGRAM_LENGTH] = {0}; - unsigned cmd; + unsigned int cmd; char c[3]; int nrchars; int ret; @@ -468,6 +468,7 @@ static int lp5523_mux_parse(const char *buf, u16 *mux, size_t len) static void lp5523_mux_to_array(u16 led_mux, char *array) { int i, pos = 0; + for (i = 0; i < LP5523_MAX_LEDS; i++) pos += sprintf(array + pos, "%x", LED_ACTIVE(led_mux, i)); @@ -506,7 +507,7 @@ static int lp5523_load_mux(struct lp55xx_chip *chip, u16 mux, int nr) if (ret) return ret; - ret = lp55xx_write(chip, LP5523_REG_PROG_MEM , (u8)(mux >> 8)); + ret = lp55xx_write(chip, LP5523_REG_PROG_MEM, (u8)(mux >> 8)); if (ret) return ret;