From patchwork Mon Jul 13 15:45:30 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 235469 Delivered-To: patch@linaro.org Received: by 2002:a92:d244:0:0:0:0:0 with SMTP id v4csp2951856ilg; Mon, 13 Jul 2020 08:46:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwnKlAkL3Vm3Fq4V355HxdKwIklUTNmwTWrB5+I5Upk0vceDoNfh97L0NqhG4r8qOkvHjja X-Received: by 2002:aa7:d297:: with SMTP id w23mr28052edq.49.1594655215437; Mon, 13 Jul 2020 08:46:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594655215; cv=none; d=google.com; s=arc-20160816; b=YsMvfT3nfvWPnWuXFZoc3GLf9yZeon6UGi4kgY36gIqorj0SldfL3J8nApccLXK9/A YFhZAtWC6s+L1v5TKihH2E0tFdQt0TYP6pQt+b8N9tYoq0X7wqPXAoxnjM4NI0O5EYP+ psgalb+qmnbMYuiI1qdru3MgnVIfRSg8WCT+2yOXZAMKcCIowqWtxPwac8vJKfDo2bXX ej+gRCSLRNCApWR5qQRkOBeK1PS3ecwqBiB2ee9ptJQqzfmcgb/T+VyujqHcUmDIB2W0 Wc6daCy75CIYtKW+jWL3ePPTqGS8WcfM34kqmXrR62DgOWsRPQPjU08wd+sG76Smc11e 1tQg== 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=Ft/vpKavegaSOwgXdMXU+We4iz7JjFR+3FyWfDhdY4Y=; b=tjrIlczG9i3w2+iAzMu4nclXstxmF/B+d66hpHxVM+2ilU9hhwz6+R3yP/WW5gdMOI m0nIsVs8rhmhovxtyxoof2T0uuBBHE71qP0uvN8Mg40CBXNwIhtQphAOvBgtO6/bl1/h F9EevwsqSma45dLoK9p27Lfj3spca4F4ab19SkElOClWclx9v6tSyIK/mCHO/pjwyNps MZFTQzYKJ7TiCEYxVn0UVHiYPjmS4egdBrwEf07sv1zfOwoDfvjye9Qq+ralBTQLkAOb mBCepQsBxWTMr7a2j2isEBMUJhHII8qwsMPy0YPLXZoqX5MfUJsdHcVF6aMdbrRYKs3+ jwgg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=P6+mPopc; 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 f12si9430221ejb.397.2020.07.13.08.46.55; Mon, 13 Jul 2020 08:46:55 -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=P6+mPopc; 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 S1730098AbgGMPqI (ORCPT + 1 other); Mon, 13 Jul 2020 11:46:08 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:55498 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729703AbgGMPqH (ORCPT ); Mon, 13 Jul 2020 11:46:07 -0400 Received: from lelv0266.itg.ti.com ([10.180.67.225]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 06DFjue7018926; Mon, 13 Jul 2020 10:45:56 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1594655156; bh=Ft/vpKavegaSOwgXdMXU+We4iz7JjFR+3FyWfDhdY4Y=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=P6+mPopc2QZwnRdtEfd8Koa8jkbmJJ23L7P92KDWOj8C3V1lEa0WF3HCO1ZUQ++NK vh/8u9Q87PdR2DVBVYFYHV9St9ZcEDhrzz9qiIp2qX64Ktnoon9/DjaN3SyoI1xAw/ PzqgWLPAHvFsdJx0DU94wiJINSzNOCWXg+/3Ygdw= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 06DFjurW058381 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 13 Jul 2020 10:45:56 -0500 Received: from DLEE105.ent.ti.com (157.170.170.35) 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.1979.3; Mon, 13 Jul 2020 10:45:56 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE105.ent.ti.com (157.170.170.35) 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, 13 Jul 2020 10:45:56 -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 06DFjucK032964; Mon, 13 Jul 2020 10:45:56 -0500 From: Dan Murphy To: , , , CC: , , , , Dan Murphy Subject: [PATCH v30 02/16] leds: lp5523: Fix various formatting issues in the code Date: Mon, 13 Jul 2020 10:45:30 -0500 Message-ID: <20200713154544.1683-3-dmurphy@ti.com> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200713154544.1683-1-dmurphy@ti.com> References: <20200713154544.1683-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.27.0 diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c index d0b931a136b9..8518de957b48 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;