From patchwork Fri Oct 18 12:25:19 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 176803 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp787887ill; Fri, 18 Oct 2019 05:26:10 -0700 (PDT) X-Google-Smtp-Source: APXvYqwhjuw8c+DfpWsbSVxzgLwpRqYvcGM/35Or3HQiuGm4J3tuJca3EmGPZoI3NkeEIhsywR2+ X-Received: by 2002:aa7:d045:: with SMTP id n5mr9338060edo.24.1571401569983; Fri, 18 Oct 2019 05:26:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571401569; cv=none; d=google.com; s=arc-20160816; b=FPFkak060ANMlGwhcxNhQvfEQYfBVvm/K3WsEt5HFCVMRS/HrT0OD+Y5QYjnVDCsPK iWHJzMDcCgPbFiuWQ0A14QsJzwu7u7DOSLbjOSvDcZ7OOluN5Bo0QRPQRWy2H/N5jjgu SSFwekipC4Sj8mwKY/vs9D10z30NmgBLfSIBOKv73AM5WmHvrMmljqsjEC5omMpTJ0ew +gqWi5Goxw0sTnotVtL7a48/pb2nwhRafZuhq7znB3Qchf04aJP8dA+32s/BMwIXi/BS OcKI7wsuRQAu5JP9yGfWcAvs79KjZMSZYRkuCDBaJRHMwnXf7urY1bxK3u1hq/N+mF1X 9bFA== 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=qDaOFl9kJBrQcy3q+Sh7kCQfBP1CTBiTNSCx8KNh/Ks=; b=Vm3RoZ1wzdOhmAudwwQNdgFnIhSt1RetkIFXsH5Pm5NWe0teGYUjWrQtr0DLOyPkyy FKGv09Vcbyco5Tn+jq49cBND5jaupXiBJcVy02WnBA1ChHZKRAXiYwq1XbmGH1UYmI2m l9/tslZLRVdbP9FZB8FGb6c9eGeYsSfqjZ4slqUWw5TCj6P6F1dGmosS6G6Ypb+3YTRX fFwxq4Iy5Uua8psUOarTA1GOttFHnhgLX7DpZ2zeqHPhBZAGqM/SV5w/KN2Z8jk+fprT TDUdJS1r0OJ3OaAtSSyb4uUhy4sP1uJgrnfi5MpP2nomZPW5xLLGCF5KT+FjcA/8OhBO BP6g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=U6XXoPNj; 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 c26si3868240edx.353.2019.10.18.05.26.09; Fri, 18 Oct 2019 05:26:09 -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=U6XXoPNj; 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 S2633754AbfJRM0H (ORCPT + 26 others); Fri, 18 Oct 2019 08:26:07 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:45848 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2633690AbfJRM0B (ORCPT ); Fri, 18 Oct 2019 08:26:01 -0400 Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id x9ICPwNm087352; Fri, 18 Oct 2019 07:25:58 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1571401558; bh=qDaOFl9kJBrQcy3q+Sh7kCQfBP1CTBiTNSCx8KNh/Ks=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=U6XXoPNjSsLm+60krHP3gA0fIcIwx8d+9TbUHtwzIvck1XQFHSd51FJpAzEI2N3Yc TfbbkSMiHMMAe+HJzkwLfcL8OUafvvTakHIxlN9IfQTaDE0wn5msu27j6Rj+ToeDi8 /k37Y/XIkvtst+/aGNiytkIqUge5eGJO8Hpbbbr0= Received: from DLEE109.ent.ti.com (dlee109.ent.ti.com [157.170.170.41]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTP id x9ICPw1f091744; Fri, 18 Oct 2019 07:25:58 -0500 Received: from DLEE108.ent.ti.com (157.170.170.38) by DLEE109.ent.ti.com (157.170.170.41) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Fri, 18 Oct 2019 07:25:49 -0500 Received: from lelv0326.itg.ti.com (10.180.67.84) by DLEE108.ent.ti.com (157.170.170.38) 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; Fri, 18 Oct 2019 07:25:49 -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 x9ICPvEI012287; Fri, 18 Oct 2019 07:25:58 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v14 17/19] leds: lp5523: Fix checkpatch issues in the code Date: Fri, 18 Oct 2019 07:25:19 -0500 Message-ID: <20191018122521.6757-18-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20191018122521.6757-1-dmurphy@ti.com> References: <20191018122521.6757-1-dmurphy@ti.com> MIME-Version: 1.0 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(-) -- 2.22.0.214.g8dca754b1e diff --git a/drivers/leds/leds-lp5523.c b/drivers/leds/leds-lp5523.c index 287fc4756cd1..041b4e124855 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;