Received: by 2002:a25:7ec1:0:0:0:0:0 with SMTP id z184csp3200148ybc; Thu, 14 Nov 2019 05:37:09 -0800 (PST) X-Google-Smtp-Source: APXvYqykPNUQGAhq3OgaljkmzeQ9jBBtBztM4W46YNEVbQwkpyqo+Eh1kYpzct+QkcI05WWKicVj X-Received: by 2002:a17:906:1ed7:: with SMTP id m23mr8230576ejj.326.1573738629262; Thu, 14 Nov 2019 05:37:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573738629; cv=none; d=google.com; s=arc-20160816; b=ITTxo8klz6H8iYNzuHXAIqbJdbeBpJTuXi1XiCH2jkIhF2dRKvzvd8EtFaoeG2SnaS rG5J5JGvFInWDtf0Lk7O8TsCmlgkZvRQhZ53xUg607BKUPKXumZi9EoC4bcrSFlzx+qF ys+XZKJAX0TZFmBgOfXy3MIfJbDTHraD7MqdGGVYwGnX3Ri7D3+xrIWC0s+02LFGACHX lxSKqblLaR1EQZ7NdU10NxbbGBYv6OQiOEdi13w8XPveqyt1xcOdXwvuUUpNDLZvSbie 9/rgWIk0epX0QbxbWDgc7sxxq3f9zUJ0TwTq9K2DmwrTPJb64vt4ZcN7FkG/lE6XX1bZ xrFw== 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=NQIDcyaqyTtBOLVrg500yyWcRWTyZF2LrgrP3Wcd470=; b=C/32dCUUOqHiyMaxHJmIfPBI01jyhyquqG5SzETOa4pFjLrn1EUIg/3BXbQjagcZ/T Wuw2DWrY3uqORgZcPPqFAFUBcRliNpQX0xFUhdA0XHYXwG0fhHmi7VVt/Rn5K+8gtQvC p4y5gTyEBM03sLDt3fRrXqMcp4aMhW3XWwnbCwMs7uui9DfnIP+ur89dyFPzfyN7T4pH EfIb+Wh/adxwE19XJJYNlwR5FUcP928gtiKp/dPUREZDN3+RBibhYskrVQbNvwptmJfC Iml7gDYVBTHOBBnmwvfcoUWOP3tA6Pd3eV5ZSOtJlwKnrHXELNzsW2S9xQwvTqEWDl8W egjg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ood9URs0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 b13si3464323eja.112.2019.11.14.05.36.44; Thu, 14 Nov 2019 05:37:09 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-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=ood9URs0; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727470AbfKNNcy (ORCPT + 99 others); Thu, 14 Nov 2019 08:32:54 -0500 Received: from lelv0142.ext.ti.com ([198.47.23.249]:40660 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726980AbfKNNcx (ORCPT ); Thu, 14 Nov 2019 08:32:53 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id xAEDWomW103943; Thu, 14 Nov 2019 07:32:50 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1573738370; bh=NQIDcyaqyTtBOLVrg500yyWcRWTyZF2LrgrP3Wcd470=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ood9URs003ONQbpL3uGluUpWlZ1s7lJtaVT0jDY7I8+kf1hKR7iFqz7raPWUKmtv2 BCgTVRW29rr8Vl5eaXUAveNOxyC8slWIyE7dDn8u9z0ZTcKCBGJPk9hA3WlY71mmnq GQ95I144liru4TB44N+ogCmjlYiMmRh1kVhdeV+I= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xAEDWo3U020956 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Thu, 14 Nov 2019 07:32:50 -0600 Received: from DLEE115.ent.ti.com (157.170.170.26) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3; Thu, 14 Nov 2019 07:32:50 -0600 Received: from fllv0040.itg.ti.com (10.64.41.20) by DLEE115.ent.ti.com (157.170.170.26) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1847.3 via Frontend Transport; Thu, 14 Nov 2019 07:32:50 -0600 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 xAEDWoj4092464; Thu, 14 Nov 2019 07:32:50 -0600 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v17 17/19] leds: lp5523: Fix checkpatch issues in the code Date: Thu, 14 Nov 2019 07:30:21 -0600 Message-ID: <20191114133023.32185-18-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191114133023.32185-1-dmurphy@ti.com> References: <20191114133023.32185-1-dmurphy@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c index 609288077917..cb402b5b4495 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; -- 2.22.0.214.g8dca754b1e