From patchwork Mon Nov 4 12:37:05 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 178416 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp1427819ilf; Mon, 4 Nov 2019 04:39:38 -0800 (PST) X-Google-Smtp-Source: APXvYqwNKeP72jNEXtsF4pKf6+euQ1o/YBNs3qd9MW65sFwa6RwzvFYEF/ocRfKQqffnkPv4L91X X-Received: by 2002:a17:906:d293:: with SMTP id ay19mr3363294ejb.146.1572871178197; Mon, 04 Nov 2019 04:39:38 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572871178; cv=none; d=google.com; s=arc-20160816; b=VIQMDXjaK/4hmn4eMXWr/DtvVcQ0mIfR6c2L2K5mkYNNeJghoWLnXlIAWyqnD6WX5s UhUrYEisr0fcBXh6hZKiHdjNHuYMqzDHlhQ0cAj5bbKAUcy8ax1oi6BNLmCJs9A5tL+I 3OWujuIzSnubqlXR1AbKsjiasCQUa/n1H+SSo1fnzFq+i1jiYgNGWZzh1mdeY+0nr9Ni 6JYlF7V/I2XRDI3GH7NOKR9+dFOo0VEPCo75/g5i4+0TBe5HbmNrmSlhVjbRIqj6InaS 9213lrSyhn081wqty2EX9boBL0WUcd2l63RGrZFp4Ql4yKWXgQ3103fF6uZ7MmTjEOUI KJWg== 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=yqJDS3alZzWFxMeWByNS3Df+MxQWXKOF0M1R1LSyv2fTTsgEkmv/2sjQ8aI9o5MltE xh/TG5XPdOGGaDGq0fGK3x1UhqygHubghEIM8+Dl9ViTD7NJQYXWx9cym+0dxJA5SSE6 X20t2dC/xOwhvF2Mlq6/jFP1NdP7iYxQxaawTCK0SjFU9LlP5Xl7bosr2AIeOp17xKo0 iA7syCN7bXeA66ofSLuffmWAfT0CNlyq2sbJ9W5cZy5zpWNTeL2fnHj7ev/DyBgW1G23 lSj7b1/HT/wcfScC5bAzsFASdyGb5GVykkaSnvxp01olVae/y9GGGegY1zMszdF7E9vi v9PQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ctOiAkIp; 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 q17si8465550edc.6.2019.11.04.04.39.38; Mon, 04 Nov 2019 04:39:38 -0800 (PST) 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=ctOiAkIp; 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 S1727322AbfKDMjh (ORCPT + 1 other); Mon, 4 Nov 2019 07:39:37 -0500 Received: from fllv0016.ext.ti.com ([198.47.19.142]:52644 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727267AbfKDMjh (ORCPT ); Mon, 4 Nov 2019 07:39:37 -0500 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id xA4CdY99118782; Mon, 4 Nov 2019 06:39:34 -0600 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1572871174; bh=NQIDcyaqyTtBOLVrg500yyWcRWTyZF2LrgrP3Wcd470=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ctOiAkIpgu+9WDh8VS8MDY5LoT0jOZAFijdbOFsF23GGqmO7p3jqYGr1N5FtpNgzS sR4BeIrlvHVwYXKK0hc6OywqTQEYEOFfamAi22CH2F9rwtjV3+wR6ZcxdTV80lMq5A cWP3NzA47s+0qhBVxX3Y8bPjNRDC5PGCLXNiOtXA= Received: from DLEE111.ent.ti.com (dlee111.ent.ti.com [157.170.170.22]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id xA4CdYXp130843 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 4 Nov 2019 06:39:34 -0600 Received: from DLEE113.ent.ti.com (157.170.170.24) by DLEE111.ent.ti.com (157.170.170.22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Mon, 4 Nov 2019 06:39:20 -0600 Received: from lelv0327.itg.ti.com (10.180.67.183) 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.1713.5 via Frontend Transport; Mon, 4 Nov 2019 06:39:20 -0600 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0327.itg.ti.com (8.15.2/8.15.2) with ESMTP id xA4CdYZc086947; Mon, 4 Nov 2019 06:39:34 -0600 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v16 17/19] leds: lp5523: Fix checkpatch issues in the code Date: Mon, 4 Nov 2019 06:37:05 -0600 Message-ID: <20191104123707.31930-18-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191104123707.31930-1-dmurphy@ti.com> References: <20191104123707.31930-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 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;