Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1026980ybz; Wed, 29 Apr 2020 13:40:24 -0700 (PDT) X-Google-Smtp-Source: APiQypL1asVxRi9ijcKLqVk08pZd2pPESr1GwwLqZg8loNlCxKwbrIUbHWjhTuQnwEDMRBggP0fA X-Received: by 2002:a50:cf05:: with SMTP id c5mr4211933edk.330.1588192823876; Wed, 29 Apr 2020 13:40:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588192823; cv=none; d=google.com; s=arc-20160816; b=VahZVpsBSOCB9l+zwM/vfDTthtn5AItEwx50Y4We17cWV6O/DES95ikU0YsbFlFokP /zToptgqjzpc1S3ihSotDpg+sYOSeBGfP+KtW/LUCugavvlhlHv1chQcKuU3u7waUKtk MxR7kxqwZfWjWbKTnRWhyAh2cyDaW3acxFWRCL9g5UzDGmc0zt2zoJeigeGWvi/eANJN iWxjrAAkzZ493zaDkB+pj6bo5wR9I/uyEx0BKThBQK2h0qUK94HEIObhcFxQtyOY5Wbz yK+USFc+V6WpFw1EkKWHZch5bjCp11CxGXeeYGbaKKUXHYQZDQP40u5ib+XUAazYd1sD 1jNg== 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=bmBuG9jt62UFiiDsKieHCLET4q0si6GpPuir0KvUPKA=; b=mbFL+WZmvDqHJa9RORYMZEn9yDzI6EgN4gRlvp94lmOJ+qFV6AMAXv/x9kDN37qsgQ RH26KuECz1IRlzJU2SMmp9xJYuCQkzxwZ73bP1MDLVJF90uzsCseHKiuBk7CGbPZanPg lugvovnIlE6Jma+LvE0c1UEMmjYO+3s42eBGFPk2Bo4T9G1nW8eXBjKo9q4uU+TC6xzk 5tVFSGOYYZCdwmQfarWgLYI8yOudJN7x2U4PW+Q66zLygIvnSKqnMyvuIWmSWaUxgP4X OXBc5Sd85CF/a5hrzReau0hYJPS0jch9yyXTmjotvycKQ2h7NOk9R3Z3oOBDPexbJnmv SN6w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=Oc50Te19; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 s28si4306810eds.186.2020.04.29.13.40.00; Wed, 29 Apr 2020 13:40:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-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=Oc50Te19; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-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 S1727983AbgD2Uhf (ORCPT + 99 others); Wed, 29 Apr 2020 16:37:35 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:47854 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727856AbgD2UhM (ORCPT ); Wed, 29 Apr 2020 16:37:12 -0400 Received: from fllv0034.itg.ti.com ([10.64.40.246]) by fllv0015.ext.ti.com (8.15.2/8.15.2) with ESMTP id 03TKbAJR061891; Wed, 29 Apr 2020 15:37:10 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1588192630; bh=bmBuG9jt62UFiiDsKieHCLET4q0si6GpPuir0KvUPKA=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=Oc50Te19Jrj3v5yGEakZFjB1gxxM6bnpJuVxpjbweaE/ycFbGIN7hYEQv9inJ3Zod tIEErm3GBY5MnQBouDFYxcPVqe1bLJvhpM9vq3Lg2wfLrsZQmQ9c0a0SX17+Sa3aY3 7OsZ9YbpSQqfEjOOLrdNrzUB7PHS1cbCrDPpl6r8= Received: from DFLE114.ent.ti.com (dfle114.ent.ti.com [10.64.6.35]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 03TKbA5J057693 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 29 Apr 2020 15:37:10 -0500 Received: from DFLE111.ent.ti.com (10.64.6.32) by DFLE114.ent.ti.com (10.64.6.35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1979.3; Wed, 29 Apr 2020 15:37:09 -0500 Received: from lelv0327.itg.ti.com (10.180.67.183) by DFLE111.ent.ti.com (10.64.6.32) 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, 29 Apr 2020 15:37:09 -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 03TKb9x4120457; Wed, 29 Apr 2020 15:37:09 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v23 15/16] leds: lp5523: Fix checkpatch issues in the code Date: Wed, 29 Apr 2020 15:28:15 -0500 Message-ID: <20200429202816.26501-16-dmurphy@ti.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200429202816.26501-1-dmurphy@ti.com> References: <20200429202816.26501-1-dmurphy@ti.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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(-) 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; -- 2.25.1