From patchwork Wed Sep 25 17:46:16 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dan Murphy X-Patchwork-Id: 174396 Delivered-To: patch@linaro.org Received: by 2002:a92:7e96:0:0:0:0:0 with SMTP id q22csp944900ill; Wed, 25 Sep 2019 10:42:09 -0700 (PDT) X-Google-Smtp-Source: APXvYqywelwm2fjAEAhDBACE9dxkxAOOCfqFqIlqbBaGZKgqdSSk4BwqczicHeLWB56vFPr535yY X-Received: by 2002:a50:918d:: with SMTP id g13mr4259205eda.64.1569433329011; Wed, 25 Sep 2019 10:42:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1569433329; cv=none; d=google.com; s=arc-20160816; b=GYigL1/0Bb5GCUfogL6dTlzVhzekLrIAqdgRh0HnC5ePCGwl1HOCSqhWLonDAKLtKA LOH601aezub6Lzd0XuNhQjIZb6QPZtoYM822eKAlMjs5Juce2ge27TA5YQ16sLxQNCWL lH5mMPnffZ73ctLPmPOToyVOrOpmSmH052hdkLQX77FxnQZH/wFKYxheh39tZT7FBm/S 8bg5r6xVG9ukUK55sVUj+xYHlHyOYZjBJPsxouyl+Xb7n1EIToBFQ7367FDvk6/oDE2C kNBdbvkqFzjIiPHAtw+g7uNh/rXmq9CiFfcqiXTe+fc/lFiZ37vnsd5kEmAD0/gW4/HR p9Uw== 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 x15si3838732eda.53.2019.09.25.10.42.08; Wed, 25 Sep 2019 10:42:08 -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 S2408379AbfIYRmH (ORCPT + 26 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 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 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;