From patchwork Mon Jun 15 20:15:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 187965 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp3052981ilo; Mon, 15 Jun 2020 13:17:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJz3SSrXhdCwicbg/YZj3b+MKrA48ik777MOZgMIUK+8lg+OvkdT5byVWZQ4qMwLG+5IBty+ X-Received: by 2002:a17:906:434f:: with SMTP id z15mr17389413ejm.178.1592252231228; Mon, 15 Jun 2020 13:17:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592252231; cv=none; d=google.com; s=arc-20160816; b=SqqxbHv1WpvdtD+ugQTPinyyv2dWKRYaDPUMkQWyUS9jrZDN6b8gC2sAD/KFPPrt2t cxYVgg/TTzCuoV8Fsm4W2OF3H54fBKOlXvQO6PqywPyR/QoKAFvjw0spQwN258S/SrRQ d8+z6WVGp8m4Oj54K00dK6HGujAjWed34m/1d252Ceh+tmDw/GWPuyu4h58cCssxNgWj ZZzNs2onBOc2w+17WD+cNu5rXBXZLRY0uJgKkSipAn2+muGVxRU9iawVKv8eE+kCSs1e ydBIeW67qvIJy/bZ3FbEr8q8+tNwzf7NOzjAPuB7a0IYf872KpDSjl7DF+5w96DmVYlC WgHQ== 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=QhIZFSdnby3zDjNoJo+21RBiA4JHC3yp4kqHpgp3RcqwiU/KtBeIMIbrbqJrfFg0Nt oACJc+dbg2dPG9bYd79xCsuJhWXCxQ4LFugqLj4MGbydQhWjjq9I8QtNtkFhA/Vc4oGh b2Odu02/+hN6XwAWf2zjvgoVALiRu6PZUJAfYy7AwOrzwXIPJ8QsaOgKMZpB7hrWMEyq 81cResQE1fAob918uT1a8d5ThQC8G2s3sayoHUxdH3zfhf2yxaeyJKst6Wgx1yqIUs8u lvtZwACg5Rtq8TPsvdhFlGO29fvqucgWHeU6FWr/NY1Nm6lsHAXUBWKdACuWkyGMthVk og6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=sjA6pS3a; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 p13si9717493ejf.178.2020.06.15.13.17.11; Mon, 15 Jun 2020 13:17:11 -0700 (PDT) Received-SPF: pass (google.com: domain of devicetree-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=sjA6pS3a; spf=pass (google.com: domain of devicetree-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=devicetree-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 S1731590AbgFOURK (ORCPT + 6 others); Mon, 15 Jun 2020 16:17:10 -0400 Received: from fllv0016.ext.ti.com ([198.47.19.142]:51584 "EHLO fllv0016.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1731549AbgFOURJ (ORCPT ); Mon, 15 Jun 2020 16:17:09 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by fllv0016.ext.ti.com (8.15.2/8.15.2) with ESMTP id 05FKH5Eh094652; Mon, 15 Jun 2020 15:17:05 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1592252225; bh=4Fus+1STo6fJcdmND8htjDFw0u7LkR/zKPWh9+ob2Js=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=sjA6pS3aFIjWIyJV1PSR5bsU912ZWZ+ZCvAGwZCxvg5TDAvTDwDrZzma6qvN6lC+T w/3bJEFYMiGzsHVeQzbcG+Nwhd3yKzjW21s3jJpziX7REZVXEbFEbO+3YFOLGld0Ti mfItwtN69qYfFsr5thgW5+2I0nQ2WqGI2HH/eb/Q= 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 05FKH5KS072465 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 15 Jun 2020 15:17:05 -0500 Received: from DLEE109.ent.ti.com (157.170.170.41) 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.1979.3; Mon, 15 Jun 2020 15:17:04 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE109.ent.ti.com (157.170.170.41) 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, 15 Jun 2020 15:17:04 -0500 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 05FKH46Z016154; Mon, 15 Jun 2020 15:17:04 -0500 From: Dan Murphy To: , , CC: , , , Dan Murphy Subject: [RESEND PATCH v27 15/15] leds: lp5523: Fix various formatting issues in the code Date: Mon, 15 Jun 2020 15:15:22 -0500 Message-ID: <20200615201522.19677-16-dmurphy@ti.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200615201522.19677-1-dmurphy@ti.com> References: <20200615201522.19677-1-dmurphy@ti.com> MIME-Version: 1.0 X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@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;