From patchwork Mon Jun 22 18:59:19 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 191374 Delivered-To: patch@linaro.org Received: by 2002:a54:3249:0:0:0:0:0 with SMTP id g9csp422357ecs; Mon, 22 Jun 2020 12:00:18 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzgP7s1gnfq/2v+injcp3xAxp9GYYUH2T/Q3lH+J3dUK1HQqslsd1GUZe+fcG50Mmpq4wCE X-Received: by 2002:a17:906:c10f:: with SMTP id do15mr17821236ejc.249.1592852418244; Mon, 22 Jun 2020 12:00:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592852418; cv=none; d=google.com; s=arc-20160816; b=PnUqERsLpGQSBdJfxxq251p6sdlOMlfEN8cstOPH6E5kpWl55FLrrDhmj1867DQXvo MNzyCe8hHBslfy7DiSFEJAiGH9SP2tsdS4x+ERMH5j2pvwWqoZysUTPyqSvntffCKhix JjXx6uKI6dgOCXHqdj0WBukLXuVNK3WLsB+HD6XLN8Leee6HO2r8lvqxQVudMlMT3WRB qfGmqARuXnom/eSM2Vsdd8rbSmRtDbcD/m/fF/21AezOV0B/LaaQGhsHu4LKpdsmg9gv 1b7z9VqLFYlEkbeGu/HjywBdGjsml7pIrfo6FVERCzn6wzYumDra1CxjOwrs/chv48tF zF1g== 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=gpkhP2yBT6cfG1lUAuN++tFzDAz/8ZrD1HwveTC8+6CTIsNtJtY+miQlxeHd71sZOJ KNkjmNP7OFoEpoUOU3QanAxrkoRSX3GKAqXDSShQzMHdCVOeeB4GMip742dcLvbyVm7E x+6rhOgh+FtnVfQAnct6tBeAxyRp5ghRlgg3IwnIPsvqp1j4KUGudJOCwQ93rchEo6NI 7KsPjsoIB6dczHhU0Uxh1vihS13Co2MCZHwp9PFsfy6HbVfEgc5x8BipE+WjML83mbmP 0OlGXnKmuDKVqh/aNtOXg1zHD3B+lN3tDrN0/jYTieXNVNykFzHV85RmBL9l3cj/UPs2 H1gg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=qyg3tID1; 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 z13si1244664edr.106.2020.06.22.12.00.18; Mon, 22 Jun 2020 12:00:18 -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=qyg3tID1; 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 S1730455AbgFVS7r (ORCPT + 6 others); Mon, 22 Jun 2020 14:59:47 -0400 Received: from lelv0143.ext.ti.com ([198.47.23.248]:53998 "EHLO lelv0143.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730439AbgFVS7r (ORCPT ); Mon, 22 Jun 2020 14:59:47 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0143.ext.ti.com (8.15.2/8.15.2) with ESMTP id 05MIxWCa102688; Mon, 22 Jun 2020 13:59:32 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1592852372; bh=4Fus+1STo6fJcdmND8htjDFw0u7LkR/zKPWh9+ob2Js=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=qyg3tID1vrJyNSQsdOx4SLEYJiWxEaKzFXGiYYAaUVOdbogChUdwYEkuueZ5rxEpj G73bxoNwoynr6vZ7mQi0HVmEPJaXltuJy09Gzj5rF1qUk2kxtpEiFURoDXTxsbXgOh rcYL2WQ+rfsAgb2hhXfRDaNAJAEddkru+evl57r8= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 05MIxW7D038101 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 22 Jun 2020 13:59:32 -0500 Received: from DLEE107.ent.ti.com (157.170.170.37) 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, 22 Jun 2020 13:59:32 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE107.ent.ti.com (157.170.170.37) 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, 22 Jun 2020 13:59:32 -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 05MIxWM0113512; Mon, 22 Jun 2020 13:59:32 -0500 From: Dan Murphy To: , , CC: , , , , Dan Murphy Subject: [PATCH v29 16/16] leds: lp5523: Fix various formatting issues in the code Date: Mon, 22 Jun 2020 13:59:19 -0500 Message-ID: <20200622185919.2131-17-dmurphy@ti.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200622185919.2131-1-dmurphy@ti.com> References: <20200622185919.2131-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;