Received: by 2002:a25:d7c1:0:0:0:0:0 with SMTP id o184csp3562127ybg; Mon, 28 Oct 2019 15:01:34 -0700 (PDT) X-Google-Smtp-Source: APXvYqyLtPKJb2MUA7W39Ora0OWlR1vpFRg9CCwZLrwVstdSTAdqd6tNC6h4XWJinz/9fxsJR+LA X-Received: by 2002:a17:906:2ada:: with SMTP id m26mr72400eje.87.1572300094816; Mon, 28 Oct 2019 15:01:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1572300094; cv=none; d=google.com; s=arc-20160816; b=nh1MsLXxNLNyU45sOmOvKo2XQmEW+PBJ8xrnAy2sd+QnIIXBCe7/xwYyF3dP7EuCu5 iWev5JYDWHNlNsogE4Ysm2kAuv6208P61KfdU11G7i4LYAnusQWMzFayv7f6EYH4XEJL 8DjWRXydX1fOLkoQpNm3W+x5YcT/w10exFeDatSrUTvkAhZ+HVmte/yCLEr6BEbQ+mor +nV13WiuWx5OTX3DEQ/UK9DKfo5lZrrycCHva4KEo7Wg51rSgxHp5zMRvgvYRGFSmFWQ Fx4HNqrxATF4jONXeFrsr+HfZo7+LetE1eBu4U6FsB6eOQo62RmdVc5DWCkiabR5nVww mmkg== 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=NQIDcyaqyTtBOLVrg500yyWcRWTyZF2LrgrP3Wcd470=; b=uSC5+Z2vKOMTbl1KOml4BTbZJ2VQFGVzMCkKcYQyxRLNU2GomOdjpyikh8nkamgrWu MAE8+snt9Hfaoxf64ATGRKoY+M7AIcYhjLVbyzDQZ8YKU7moUUbPJXxi5FNB/wtIK3qd LPOecW9TNqGJEhMhC3x8Rr0kijgRYEmLCJLAkYZFIPuzxrfn61nolXTpG8sol2fOdnaT Dv7OhuNWF4Epr+Bfeg+cNev8UIYVzs5YXfBG3KoC3wJYVIjYD5iRIJgTgfIl84syfVi0 u3s5B+TSTFvqDMUbwXGCzfAcgwKzwJ1FA+o/Uyb/CucciutdOYOlji7/IMVFMzpHxnZq M3JQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="jm/MYWSo"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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. [209.132.180.67]) by mx.google.com with ESMTP id q44si6533014eda.242.2019.10.28.15.01.11; Mon, 28 Oct 2019 15:01:34 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b="jm/MYWSo"; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 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 S1728142AbfJ1Si5 (ORCPT + 99 others); Mon, 28 Oct 2019 14:38:57 -0400 Received: from fllv0015.ext.ti.com ([198.47.19.141]:57468 "EHLO fllv0015.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727034AbfJ1Si4 (ORCPT ); Mon, 28 Oct 2019 14:38:56 -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 x9SIcs2i035107; Mon, 28 Oct 2019 13:38:54 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1572287934; bh=NQIDcyaqyTtBOLVrg500yyWcRWTyZF2LrgrP3Wcd470=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=jm/MYWSoAe/dq6XUEpobGSEzbhwD2pCr+YK8H5vsa0aRSxZ0iFGneKYxvLVA9EWQP WzQ1iqu9Se9NZ4OHHyLZGDiA37FHZDjOYMtKrvuXp1EVF2aDL+4+ditmAmZ9YbgBz9 Jx5L2MZEx0RpH352rwpuPmQNJnUElDQ9ybugVcyk= Received: from DLEE115.ent.ti.com (dlee115.ent.ti.com [157.170.170.26]) by fllv0034.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x9SIcrDO104912 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 28 Oct 2019 13:38:53 -0500 Received: from DLEE115.ent.ti.com (157.170.170.26) 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.1713.5; Mon, 28 Oct 2019 13:38:53 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) 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.1713.5 via Frontend Transport; Mon, 28 Oct 2019 13:38:53 -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 x9SIcrFj058023; Mon, 28 Oct 2019 13:38:53 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v15 17/19] leds: lp5523: Fix checkpatch issues in the code Date: Mon, 28 Oct 2019 13:36:27 -0500 Message-ID: <20191028183629.11779-18-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191028183629.11779-1-dmurphy@ti.com> References: <20191028183629.11779-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. 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 609288077917..cb402b5b4495 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.22.0.214.g8dca754b1e