From patchwork Thu Nov 14 13:30:21 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 179426 Delivered-To: patch@linaro.org Received: by 2002:a92:38d5:0:0:0:0:0 with SMTP id g82csp11065069ilf; Thu, 14 Nov 2019 05:32:54 -0800 (PST) X-Google-Smtp-Source: APXvYqxAOVKeZIsqQWdm2/vhQC5CxWrFsnN/t2NtXjGJOMXdCQkBJuehS1OMQmp7womDpeQA0kF6 X-Received: by 2002:aa7:cf8b:: with SMTP id z11mr1262932edx.294.1573738374777; Thu, 14 Nov 2019 05:32:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1573738374; cv=none; d=google.com; s=arc-20160816; b=UsdoQ8DehFnexp/4DSnFfK3CeLv8jcEYUi4hYYSuDpfTfYM771G1emXFgaW7Fzarpi ZEppnPXmZCCGS7bOqudQ5VMT0x+r17qJQUJ236PsPBiJX9AKYZ48sbq/SKxUxoKgvwvP o+oNI4hxlCzqvUmHapa2Zut466aWInP63qlZ/IRkCcwT+QvzmsQaPLRhLYKy/E6CndTD jocbdbtBqK/CDAMnh7TR0S463bfWX5NEEnp0wn4lLe03HIAxCIENkUJ/ySXmhCjBBds+ 6PJ26oPDtk6k7ztroq8gBf5dp3ELs6F3ikpUH7ie3MC1ZP0f5aB6ltsEe4Vo4LJnKgGC h1/A== 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=jgMnZl43pa5xtBZM4uL6cPESx85VumQhTUuagVEmEvseOgettL1GJxElkN6min5of1 0NVxn1i9YQglVOE6yvCDWqe1o3UWqiyHffM171+99xRwRDjOf8Ilx5N9u/u1rpEjpHB4 NLALwFUtgxwRej2Pz4rjPutOMuYN1OVgyWUfgpfRHW7OIytWWqx0lo/LOUKJjlpgH9SK 5e5c6Wcrchl4LFQ36TFgLmxRev9B5LlpZGCbI87nop9KljrekCepE0PbXSZ0DcaRHw53 0zfKlsES1tZsivEFgB//8IA8vjKkgEpmAHW6FOAO85putIfXjTEkHzISyoG8P2oTs4AY hivw== 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-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 m4si3212156eja.96.2019.11.14.05.32.54; Thu, 14 Nov 2019 05:32:54 -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=ood9URs0; 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 S1726818AbfKNNcy (ORCPT + 1 other); 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 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 Acked-by: Pavel Machek 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;