Received: by 2002:a25:824b:0:0:0:0:0 with SMTP id d11csp1829179ybn; Thu, 26 Sep 2019 02:52:54 -0700 (PDT) X-Google-Smtp-Source: APXvYqyQTvtDomBnQEZhuF2cK++lNFIl1iG5QUe4i1xS7IasVAcDYiDEW3R67g3NM92PysYMeJL0 X-Received: by 2002:a17:906:f08:: with SMTP id z8mr2304198eji.18.1569491574423; Thu, 26 Sep 2019 02:52:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569491574; cv=none; d=google.com; s=arc-20160816; b=yX0pHp1LGVwpU/gpKlLxpEoAWGkkJEfDfFWOJr0FxYjRlSY41bqivvBbERdAiyTliE QkibcNCmgByVcCuAsVQrKxHuQWXmKNlZhHUQJ6Ynt8V4/AClOgrkIORX8o+XSkmUkXnc XxfyBgKDI3KqISkjiGsC825uFUkFxOIwT1bUFJJz27R9tDIun9xgYZtZriQebjv8FjQ1 eq29zGZEIJsv1E81N4bhgkgLi8ZxVhCnSZgqMc8Mij0QtE75cLFsq3ZTmqXwQEZVM4aH FHkfhx20pKevYQdECQni8/uzVt2PWpf9wXRI5IhJNl8qxKvnYKYX1FH0iHIsh0jZZvUt UTDw== 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=qZXobCQEdxdBf8db4ptHqKRRbgiuP+MZ7ubiK/z5XQY=; b=pql0ZuQmMKiKRpsyk6qflbKcsWmUcFfVLTYBq3aWPRRkkVJrFSPtTi52WRbWIETUXc FADhgzAZjKp5T/YsoARXvTFydzGb/3LSS027Eudr0jbX2x3uPIYoNnE8ZsG0Z++nA4jI 4lhBZ3trUhdLTRfxz3s0yt/MhGoi6UIjU0eM4yBa6kn6AuHb0BBnY67+wgO/7E0YxSG+ gsUp6UxFbx05rsUlEQRQGuempiYoHDHz70xbiD231HTu5VU/jX2cfv8O6dzpdYwMeVe+ H2p3gXVGMHieAW5WKO4AY+3CTk9eCB0LkLlE41wFZpSMJvEjtc7WIiBxIsvJvlc0VQ9T MONw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=ZaN1oH2b; 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 p1si980753eda.406.2019.09.26.02.52.31; Thu, 26 Sep 2019 02:52:54 -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=ZaN1oH2b; 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 S2408341AbfIYRmH (ORCPT + 99 others); Wed, 25 Sep 2019 13:42:07 -0400 Received: from lelv0142.ext.ti.com ([198.47.23.249]:50752 "EHLO lelv0142.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2437639AbfIYRlV (ORCPT ); Wed, 25 Sep 2019 13:41:21 -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 x8PHfI39029475; Wed, 25 Sep 2019 12:41:18 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1569433278; bh=qZXobCQEdxdBf8db4ptHqKRRbgiuP+MZ7ubiK/z5XQY=; h=From:To:CC:Subject:Date:In-Reply-To:References; b=ZaN1oH2bQ2F4YwUSmH6sYGXLP/CBdmiwbyucge/XV0QFyUIrcyGOm/2NN7xQpxumz /eiC2cNnBNavJDyB9U4U1ZybT2891kKEFeXBrMuKyCwonEYRHETMeyG6nhaRbQxgyD Vo3em8WkXqFnAB6hguz2kuyDgNBQsCDyi368KDsE= Received: from DFLE115.ent.ti.com (dfle115.ent.ti.com [10.64.6.36]) by lelv0266.itg.ti.com (8.15.2/8.15.2) with ESMTPS id x8PHfIGR000378 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 25 Sep 2019 12:41:18 -0500 Received: from DFLE107.ent.ti.com (10.64.6.28) by DFLE115.ent.ti.com (10.64.6.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.1713.5; Wed, 25 Sep 2019 12:41:11 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DFLE107.ent.ti.com (10.64.6.28) 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; Wed, 25 Sep 2019 12:41:10 -0500 Received: from localhost (ileax41-snat.itg.ti.com [10.172.224.153]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id x8PHfHr3045690; Wed, 25 Sep 2019 12:41:17 -0500 From: Dan Murphy To: , CC: , , Dan Murphy Subject: [PATCH v9 15/15] leds: lp5523: Fix checkpatch issues in the code Date: Wed, 25 Sep 2019 12:46:16 -0500 Message-ID: <20190925174616.3714-16-dmurphy@ti.com> X-Mailer: git-send-email 2.22.0.214.g8dca754b1e In-Reply-To: <20190925174616.3714-1-dmurphy@ti.com> References: <20190925174616.3714-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 8b2cdb98fed6..c4a94903f8c4 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