From patchwork Tue Jul 22 11:11:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 34079 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ig0-f200.google.com (mail-ig0-f200.google.com [209.85.213.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id DDFF620540 for ; Tue, 22 Jul 2014 11:12:05 +0000 (UTC) Received: by mail-ig0-f200.google.com with SMTP id uq10sf392389igb.7 for ; Tue, 22 Jul 2014 04:12:05 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-unsubscribe; bh=G+sJ2tjpavc1OxjYnCu4q2Gz1VtlHYzXlRTv95YrsI4=; b=YZfDGWejKmuQaSnETOl897gUWBw19z5TG4lMvLFIcAqPWbyDRXhCzn4UoTDQhakdk8 szwltQeRZkBvnSgTsQXbvB6WqEmtMPMeiKXdKJK0twoxVV/QGdkWB2fX2/SduUNCtglu LrTmMl5yNwxIwzXWD5BfZu7w0Ifb9wMTgWTQ3uDxWIw6Q2u0TKUJ6FJIj8ofXzPwke94 Gj6kwcwHDynrCQkCWpPMYG2EMchro6QLCiIr8ZsHBfESz4FnI6eHklbm4pUrn9cGRqKe arm35Z3+hBg+xrmvgi+rtNbPCz97HPrjgeLieCLCWtnaYTtzUGbakkuKJ/0BNlTO+REq bDLw== X-Gm-Message-State: ALoCoQkJ0LcZmMDp5qDkfMMnz7RfYGnaKClnVzvRyTPDr45TubjQsk+7ClU8/IEWv3YDSXkkjaYJ X-Received: by 10.42.109.148 with SMTP id l20mr12216262icp.0.1406027525455; Tue, 22 Jul 2014 04:12:05 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.91.80 with SMTP id y74ls2393547qgd.0.gmail; Tue, 22 Jul 2014 04:12:05 -0700 (PDT) X-Received: by 10.52.163.229 with SMTP id yl5mr11421382vdb.79.1406027525305; Tue, 22 Jul 2014 04:12:05 -0700 (PDT) Received: from mail-vc0-f181.google.com (mail-vc0-f181.google.com [209.85.220.181]) by mx.google.com with ESMTPS id wm5si80234vdb.83.2014.07.22.04.12.05 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Jul 2014 04:12:05 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.181 as permitted sender) client-ip=209.85.220.181; Received: by mail-vc0-f181.google.com with SMTP id lf12so14382078vcb.12 for ; Tue, 22 Jul 2014 04:12:05 -0700 (PDT) X-Received: by 10.52.129.200 with SMTP id ny8mr2524183vdb.27.1406027525118; Tue, 22 Jul 2014 04:12:05 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patches@linaro.org Received: by 10.221.37.5 with SMTP id tc5csp186655vcb; Tue, 22 Jul 2014 04:12:04 -0700 (PDT) X-Received: by 10.50.61.140 with SMTP id p12mr15093121igr.41.1406027524567; Tue, 22 Jul 2014 04:12:04 -0700 (PDT) Received: from mail-ie0-f178.google.com (mail-ie0-f178.google.com [209.85.223.178]) by mx.google.com with ESMTPS id bt7si1179855icb.70.2014.07.22.04.12.04 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Jul 2014 04:12:04 -0700 (PDT) Received-SPF: pass (google.com: domain of lee.jones@linaro.org designates 209.85.223.178 as permitted sender) client-ip=209.85.223.178; Received: by mail-ie0-f178.google.com with SMTP id tp5so7979471ieb.9 for ; Tue, 22 Jul 2014 04:12:04 -0700 (PDT) X-Received: by 10.50.221.99 with SMTP id qd3mr15238980igc.3.1406027524357; Tue, 22 Jul 2014 04:12:04 -0700 (PDT) Received: from localhost.localdomain (host109-148-232-149.range109-148.btcentralplus.com. [109.148.232.149]) by mx.google.com with ESMTPSA id lo3sm1302829igb.22.2014.07.22.04.12.02 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Jul 2014 04:12:03 -0700 (PDT) From: Lee Jones To: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Cc: sameo@linux.intel.com, Lee Jones Subject: [PATCH 15/19] mfd: tc6387xb: Remove unnecessary braces and correct style warnings Date: Tue, 22 Jul 2014 12:11:21 +0100 Message-Id: <1406027485-15657-16-git-send-email-lee.jones@linaro.org> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1406027485-15657-1-git-send-email-lee.jones@linaro.org> References: <1406027485-15657-1-git-send-email-lee.jones@linaro.org> X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: lee.jones@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.181 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Precedence: list Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org List-ID: X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , This is part of an effort to clean-up the MFD subsystem. WARNING: braces {} are not necessary for single statement blocks + if (!iomem) { + return -EINVAL; + } WARNING: sizeof *tc6387xb should be sizeof(*tc6387xb) + tc6387xb = kzalloc(sizeof *tc6387xb, GFP_KERNEL); WARNING: Prefer [subsystem eg: netdev]_info([subsystem]dev, ... then dev_info(dev, ... then pr_info(... to printk(KERN_INFO ... + printk(KERN_INFO "Toshiba tc6387xb initialised\n"); total: 0 errors, 3 warnings, 242 lines checked Signed-off-by: Lee Jones --- drivers/mfd/tc6387xb.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/mfd/tc6387xb.c b/drivers/mfd/tc6387xb.c index 591a331..e71f880 100644 --- a/drivers/mfd/tc6387xb.c +++ b/drivers/mfd/tc6387xb.c @@ -147,11 +147,10 @@ static int tc6387xb_probe(struct platform_device *dev) int irq, ret; iomem = platform_get_resource(dev, IORESOURCE_MEM, 0); - if (!iomem) { + if (!iomem) return -EINVAL; - } - tc6387xb = kzalloc(sizeof *tc6387xb, GFP_KERNEL); + tc6387xb = kzalloc(sizeof(*tc6387xb), GFP_KERNEL); if (!tc6387xb) return -ENOMEM; @@ -189,7 +188,7 @@ static int tc6387xb_probe(struct platform_device *dev) if (pdata && pdata->enable) pdata->enable(dev); - printk(KERN_INFO "Toshiba tc6387xb initialised\n"); + dev_info(&dev->dev, "Toshiba tc6387xb initialised\n"); ret = mfd_add_devices(&dev->dev, dev->id, tc6387xb_cells, ARRAY_SIZE(tc6387xb_cells), iomem, irq, NULL);