From patchwork Wed Jun 17 15:09:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 190877 Delivered-To: patch@linaro.org Received: by 2002:a92:cf06:0:0:0:0:0 with SMTP id c6csp539307ilo; Wed, 17 Jun 2020 08:10:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxouenVeDGY3xGhzE2rL1gmFyUGW4R5TquEoKN8ZrtNy/zmQtUt+1FDOHn3M0NRWuzK/ya8 X-Received: by 2002:aa7:c38f:: with SMTP id k15mr8081599edq.342.1592406654905; Wed, 17 Jun 2020 08:10:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592406654; cv=none; d=google.com; s=arc-20160816; b=OkJAftygR3mIFkHusGgiOb/IFg5TAQ7eOJSDpRuj2jb7ziYCpBWh6SMXQdXZDGgKHS 8Usb+0XCh/+ROUWq2yBrE5laXT+0aa/P4BUPF+LR6NVg8lJqGpNV5nsOqmjs6ylyf843 PB7QtVPmM1fPoU47iC2QM4yF6o9mz87FB2CCwn+1S0D04TTXjLYXBjMor3xR67um6FRV yx3F5vOAIFg2+ZCgsnCXjU/CmnOdsfNsxu8BJjFONPxQGamRdaxTrNb8+XpgU4Idolvl Xm3w36EbIQe7fBnabDRiCGILqz0my4UR/qXLU/VywUEINX3RFFTPe5+OFgtuLXcUfe4w uxyw== 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=stf3pXWk3+2PkiGJ2NPEZHmEHNeOu22b+BlhyAkWNTORtR8di3Nzp+ZitLamvINQG0 aNR9JQavQBHnX3qV5mIBD68yPzGIcSHYonbz7VsO2rmwWSiNjXcG7YU2XzqPuUDBEkx9 IE/h0zhTmLhYHmxckeYXf0VZVXiHvohSBxRyDOOAuFOSO0Pc6Oqxv9UJ7eA9o3DJGBUb otZYmR/ObEhyLLPEdkdaRSPs/eMkBjePdrV/ik+T+7MPPBzAfHXj5QHrh+0IqqdI+uDO qBbhQc1oRTW4+VpT4tvrv51iHbUaOR9kwThtmx7Ewo4H3ndMGGSu9pNPzY/cGBNJD/Fs IHxQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=gJR4GqFK; 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 du7si118386ejc.341.2020.06.17.08.10.54; Wed, 17 Jun 2020 08:10:54 -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=gJR4GqFK; 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 S1727051AbgFQPKo (ORCPT + 1 other); Wed, 17 Jun 2020 11:10:44 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:54592 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727097AbgFQPKn (ORCPT ); Wed, 17 Jun 2020 11:10:43 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 05HFAdYF004749; Wed, 17 Jun 2020 10:10:39 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1592406639; bh=4Fus+1STo6fJcdmND8htjDFw0u7LkR/zKPWh9+ob2Js=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=gJR4GqFKYZYMhkoam6gYQ6C6qacYrV/6tUJ1QRcZGSIho7zzYm4XJkGzRkUcPmbJ4 Q3w0TLusJcap1zfj/nKfZ2nMbj1A9mYQKrwPG4Iak4f4IJh6KaeluXd58ubcYt0UK7 wtzaynW8cMmeAeaRraAVRK6uWe9c+UEEcxQsLTx4= Received: from DLEE112.ent.ti.com (dlee112.ent.ti.com [157.170.170.23]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 05HFAdAH111001 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 17 Jun 2020 10:10:39 -0500 Received: from DLEE103.ent.ti.com (157.170.170.33) by DLEE112.ent.ti.com (157.170.170.23) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Wed, 17 Jun 2020 10:10:39 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DLEE103.ent.ti.com (157.170.170.33) 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; Wed, 17 Jun 2020 10:10:39 -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 05HFAdVx108887; Wed, 17 Jun 2020 10:10:39 -0500 From: Dan Murphy To: , , CC: , , , Dan Murphy Subject: [PATCH v28 15/15] leds: lp5523: Fix various formatting issues in the code Date: Wed, 17 Jun 2020 10:09:24 -0500 Message-ID: <20200617150924.12665-16-dmurphy@ti.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200617150924.12665-1-dmurphy@ti.com> References: <20200617150924.12665-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;