From patchwork Mon Jun 8 19:39:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 187618 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp5141072ilo; Mon, 8 Jun 2020 12:40:46 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyHNLczrBDcoFI0g2UaLACAjFjAL0iRxvE9ayI+iRnanHaZH1u2+LhK9tIm1e5W8Qe/NjXs X-Received: by 2002:aa7:c3d7:: with SMTP id l23mr3277296edr.264.1591645246830; Mon, 08 Jun 2020 12:40:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1591645246; cv=none; d=google.com; s=arc-20160816; b=0YqRwpVI9NlxIJ7Bfqb9IM6nQ4f/c3Pw7mQSRDLvmZvB+jdvx3bqhtnVHakAbgSskQ kTFkLjXPxOMQ0qB04alR8VWgRzHVUU2/ZnoQmwqgh49Y1sM0yk1OG1Pi9u3ub3FEnjzp xFIQAHTi+flllHeeTqq2ntVjvh1MNdk1CJu6gnWwA4Tw7+N11lcgr7XJgX4eS6aiBITu zEUSY223y7TrTy+lij3Z8VSXAW8hN9MUbNwF0xic5OoA8hdvtBBLB6/SIttpPoxp4Q9h b76f2A29N/kV32FdpXqQ2/W3UBAehmUHq981UaWDoQUz4/a+/C6h+55pvIYDKw+GAjcH gnKQ== 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=4Fus+1STo6fJcdmND8htjDFw0u7LkR/zKPWh9+ob2Js=; b=NhORLpv2TtfIZ8MtbG1KYjT66z2GOiiNVsFqlg98LT3SO2/iy4amZL2lj+SfF/naWJ SKw/bu8FjSc4KpnGmRjABHypPuRWaqLKB88KGISshTgpqqw+cN+8ZGHOu7fnsOp/Du1M i4liNaJTgqUKtwy9dAxQKoiftFP6oBL+zTIymD0JmSjekcZRdLwvIRqkSJfuwKf3A2NF Zu4rNPC4s4RWIIUCUDsgqQRmN/k/iKQJ4ecDU4fK4oUyESH47uUng3Hjnznv7826cpjK Vr2UeSw6nZtprXPaKXbtPJBM9OCxw13EcEFUX/Zzm8bMtbYWiouM+kNr0EZov/+EO4s9 iwRQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=jgxBh18B; spf=pass (google.com: domain of linux-leds-owner@vger.kernel.org designates 23.128.96.18 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. [23.128.96.18]) by mx.google.com with ESMTP id b23si10061256edj.441.2020.06.08.12.40.46; Mon, 08 Jun 2020 12:40:46 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-leds-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=jgxBh18B; spf=pass (google.com: domain of linux-leds-owner@vger.kernel.org designates 23.128.96.18 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 S1726784AbgFHTkm (ORCPT + 1 other); Mon, 8 Jun 2020 15:40:42 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:35302 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726778AbgFHTkl (ORCPT ); Mon, 8 Jun 2020 15:40:41 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 058Jecvg004394; Mon, 8 Jun 2020 14:40:38 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1591645238; bh=4Fus+1STo6fJcdmND8htjDFw0u7LkR/zKPWh9+ob2Js=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=jgxBh18BRXNxtOVN+dkaLeVc0KgWztjTkxiSQoOL7RHSHMGGWjIDNkbTKRjeMyfcj 99YPZBkjsoHREymYny5s3zfzfYdPwCOjYS0GZVXamOB238k6bmZVM/+y4XZbj9RnV4 ueMZHzkGA46pI3VyLYUc1Ph2r1XWzUCU7dKvbyPU= Received: from DFLE113.ent.ti.com (dfle113.ent.ti.com [10.64.6.34]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 058Jec0n030550 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 8 Jun 2020 14:40:38 -0500 Received: from DFLE100.ent.ti.com (10.64.6.21) 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.1979.3; Mon, 8 Jun 2020 14:40:37 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DFLE100.ent.ti.com (10.64.6.21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3 via Frontend Transport; Mon, 8 Jun 2020 14:40:37 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by lelv0326.itg.ti.com (8.15.2/8.15.2) with ESMTP id 058Jebog070894; Mon, 8 Jun 2020 14:40:37 -0500 From: Dan Murphy To: , CC: , , , Dan Murphy Subject: [PATCH v27 15/15] leds: lp5523: Fix various formatting issues in the code Date: Mon, 8 Jun 2020 14:39:17 -0500 Message-ID: <20200608193917.13084-16-dmurphy@ti.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200608193917.13084-1-dmurphy@ti.com> References: <20200608193917.13084-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. Acked-by: Pavel Machek Acked-by: Jacek Anaszewski Signed-off-by: Dan Murphy --- drivers/leds/leds-lp5523.c | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) -- 2.26.2 diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c index 9776dc72a764..f55d97258d5e 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;