From patchwork Tue Jul 22 11:11:17 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Lee Jones X-Patchwork-Id: 34075 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f198.google.com (mail-ie0-f198.google.com [209.85.223.198]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 88C7620540 for ; Tue, 22 Jul 2014 11:11:58 +0000 (UTC) Received: by mail-ie0-f198.google.com with SMTP id rl12sf69073618iec.1 for ; Tue, 22 Jul 2014 04:11:58 -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=dvG/ouusNbflTqC8lD4mE4u3v/2BqxiEi3uFenT1qvU=; b=mk6U27TcsPcEpO2fgQHQrv16XDJh6UzM994BsAYEJY2ZlUfaMA/OH3SZ6POjy6yywF FNVgKmEh0CFV3CLzwUXqbBxW0B1p7w/0N4rvmG/mOQePoT6XDrr6dkSyxBIy2yIue7W8 DOkvG/ZMYXwTIcQfe6HXJ+YYPc91mMyfOPjosgcE0yrX7U8oErwZZCjK5ZXci9MGAaDw xc53uJndA/JJ66E3gBeTZRW/naRR7yjAW8ALcaTAd3tHgTqGVg4Ggszmy4fb25Mrp4wT JfN+Pv7UXBFOZWCudi+MFWTEFUs7Xqi25oVwTeYfDb4ayq+xkO5c3SYsf/LJaUZoVB4i 1ZcQ== X-Gm-Message-State: ALoCoQn2XsckOk3rvGHYpKAVZQh5v2H27PIUZ8HsRulzeZ6SxKzGa2m4G/dufoOs2T7hVC1rh8/S X-Received: by 10.182.128.234 with SMTP id nr10mr16337053obb.0.1406027518080; Tue, 22 Jul 2014 04:11:58 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.96.38 with SMTP id j35ls1669983qge.89.gmail; Tue, 22 Jul 2014 04:11:57 -0700 (PDT) X-Received: by 10.52.99.106 with SMTP id ep10mr11566964vdb.73.1406027517958; Tue, 22 Jul 2014 04:11:57 -0700 (PDT) Received: from mail-vc0-f174.google.com (mail-vc0-f174.google.com [209.85.220.174]) by mx.google.com with ESMTPS id lq9si71118veb.106.2014.07.22.04.11.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Jul 2014 04:11:57 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.174 as permitted sender) client-ip=209.85.220.174; Received: by mail-vc0-f174.google.com with SMTP id la4so14546048vcb.33 for ; Tue, 22 Jul 2014 04:11:57 -0700 (PDT) X-Received: by 10.52.37.81 with SMTP id w17mr9695359vdj.95.1406027517890; Tue, 22 Jul 2014 04:11:57 -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 tc5csp186639vcb; Tue, 22 Jul 2014 04:11:57 -0700 (PDT) X-Received: by 10.42.70.9 with SMTP id d9mr13819265icj.92.1406027517371; Tue, 22 Jul 2014 04:11:57 -0700 (PDT) Received: from mail-ie0-f175.google.com (mail-ie0-f175.google.com [209.85.223.175]) by mx.google.com with ESMTPS id i11si1240210igf.37.2014.07.22.04.11.57 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Jul 2014 04:11:57 -0700 (PDT) Received-SPF: pass (google.com: domain of lee.jones@linaro.org designates 209.85.223.175 as permitted sender) client-ip=209.85.223.175; Received: by mail-ie0-f175.google.com with SMTP id x19so7680787ier.6 for ; Tue, 22 Jul 2014 04:11:57 -0700 (PDT) X-Received: by 10.50.56.38 with SMTP id x6mr15294190igp.30.1406027517126; Tue, 22 Jul 2014 04:11:57 -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.11.55 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 22 Jul 2014 04:11:56 -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 11/19] mfd: twl4030-irq: Fix style warnings relating to pr_warn() and sizeof() Date: Tue, 22 Jul 2014 12:11:17 +0100 Message-Id: <1406027485-15657-12-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.174 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: Prefer pr_warn(... to pr_warning(... + pr_warning("twl4030: I2C error %d reading PIH ISR\n", ret); WARNING: sizeof buf should be sizeof(buf) + memset(buf, 0xff, sizeof buf); WARNING: sizeof *agent should be sizeof(*agent) + agent = kzalloc(sizeof *agent, GFP_KERNEL); Signed-off-by: Lee Jones --- drivers/mfd/twl4030-irq.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mfd/twl4030-irq.c b/drivers/mfd/twl4030-irq.c index 596b1f6..b1dabba 100644 --- a/drivers/mfd/twl4030-irq.c +++ b/drivers/mfd/twl4030-irq.c @@ -297,7 +297,7 @@ static irqreturn_t handle_twl4030_pih(int irq, void *devid) ret = twl_i2c_read_u8(TWL_MODULE_PIH, &pih_isr, REG_PIH_ISR_P1); if (ret) { - pr_warning("twl4030: I2C error %d reading PIH ISR\n", ret); + pr_warn("twl4030: I2C error %d reading PIH ISR\n", ret); return IRQ_NONE; } @@ -338,7 +338,7 @@ static int twl4030_init_sih_modules(unsigned line) irq_line = line; /* disable all interrupts on our line */ - memset(buf, 0xff, sizeof buf); + memset(buf, 0xff, sizeof(buf)); sih = sih_modules; for (i = 0; i < nr_sih_modules; i++, sih++) { /* skip USB -- it's funky */ @@ -646,7 +646,7 @@ int twl4030_sih_setup(struct device *dev, int module, int irq_base) if (status < 0) return status; - agent = kzalloc(sizeof *agent, GFP_KERNEL); + agent = kzalloc(sizeof(*agent), GFP_KERNEL); if (!agent) return -ENOMEM;