From patchwork Thu Feb 18 00:51:43 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mathieu Poirier X-Patchwork-Id: 62134 Delivered-To: patch@linaro.org Received: by 10.112.43.199 with SMTP id y7csp308050lbl; Wed, 17 Feb 2016 16:52:19 -0800 (PST) X-Received: by 10.66.63.67 with SMTP id e3mr6145081pas.141.1455756739090; Wed, 17 Feb 2016 16:52:19 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 21si5394558pfj.62.2016.02.17.16.52.18; Wed, 17 Feb 2016 16:52:19 -0800 (PST) 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; 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; dkim=pass header.i=@linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1162005AbcBRAwQ (ORCPT + 30 others); Wed, 17 Feb 2016 19:52:16 -0500 Received: from mail-ob0-f175.google.com ([209.85.214.175]:33459 "EHLO mail-ob0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965331AbcBRAwK (ORCPT ); Wed, 17 Feb 2016 19:52:10 -0500 Received: by mail-ob0-f175.google.com with SMTP id jq7so42635926obb.0 for ; Wed, 17 Feb 2016 16:52:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=/Yl6GBJxETMRTWV0N962yuywKcSXr4EVLVkbLsnwRzI=; b=jBCeL/ZQSqZcOuxHCU5/3lKKtpQTajTslmmESGbQmShb009pJ6J6IRpZVCxJAPrODM pqmx95p0opnKrt+QFkIIK6JCFlLjCfhYQRgUce7csITHrDuQZHUAqEXqpZW+GEt85h/8 9NIamKoq1cJ/J+hjfK0sq0EHngYBxVL4bkyN8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=/Yl6GBJxETMRTWV0N962yuywKcSXr4EVLVkbLsnwRzI=; b=bcaNSYteMBMSKDWJOkQfAo7rSntgLtACnzbST7xCa78jOSNxcflAwPRPyJbitLHOs0 dUJh3sE/xSuYHdOC1C0ku4a6NgB4MG9Trfiu54JDerbVz48N0rGAnBkY1zBW5r4e/WDm kmgsyj1+kRFUhdJCJeAlxRCtzcu4KdRgYQaJ3UEQk6Ml2F/uP/Ybbq+5xlOk0BW6JBRR 4TdVKMrjjf01B2Tb9mzjMfQdOULEF2VP2HF8nGjEcKoTD/ikKDnlOanfCTt2jofKS3EI /SQsVcRAr8mKZVS/hmEhZoe66jCKcaxl+irUglfgWsaaVLBhVGTOcpwG/dULwNSqluq1 FWyA== X-Gm-Message-State: AG10YORlKd64uLuG1OgUol00gpAFOzIw5HolBtoPO2zvurz/IP/2/4OVxGQbXKa1XI4jCHAF X-Received: by 10.202.193.10 with SMTP id r10mr3711955oif.126.1455756729958; Wed, 17 Feb 2016 16:52:09 -0800 (PST) Received: from t430.globalsuite.net (h58.159.185.173.static.ip.windstream.net. [173.185.159.58]) by smtp.gmail.com with ESMTPSA id gi5sm2357650obb.6.2016.02.17.16.52.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 17 Feb 2016 16:52:09 -0800 (PST) From: Mathieu Poirier To: gregkh@linuxfoundation.org Cc: linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH 01/21] coresight: "DEVICE_ATTR_RO" should defined as static. Date: Wed, 17 Feb 2016 17:51:43 -0700 Message-Id: <1455756723-8456-2-git-send-email-mathieu.poirier@linaro.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1455756723-8456-1-git-send-email-mathieu.poirier@linaro.org> References: <1455756723-8456-1-git-send-email-mathieu.poirier@linaro.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Eric Long "DEVICE_ATTR_RO(name)" should be defined as static. And there is an unnecessary space at the front of the code. The sparse tool output logs as the following: coresight-etm4x.c:2224:1: warning: symbol 'dev_attr_trcoslsr' was not declared. Should it be static? coresight-etm4x.c:2225:1: warning: symbol 'dev_attr_trcpdcr' was not declared. Should it be static? coresight-etm4x.c:2226:1: warning: symbol 'dev_attr_trcpdsr' was not declared. Should it be static? And the smatch tool output logs as the following: of_coresight.c:89 of_coresight_alloc_memory() warn: inconsistent indenting Signed-off-by: Eric Long Signed-off-by: Mathieu Poirier --- drivers/hwtracing/coresight/coresight-etm4x.c | 2 +- drivers/hwtracing/coresight/of_coresight.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) -- 2.1.4 diff --git a/drivers/hwtracing/coresight/coresight-etm4x.c b/drivers/hwtracing/coresight/coresight-etm4x.c index b6ae9cb6ff57..d6a92c6d3a66 100644 --- a/drivers/hwtracing/coresight/coresight-etm4x.c +++ b/drivers/hwtracing/coresight/coresight-etm4x.c @@ -2227,7 +2227,7 @@ static ssize_t name##_show(struct device *_dev, \ return scnprintf(buf, PAGE_SIZE, "0x%x\n", \ readl_relaxed(drvdata->base + offset)); \ } \ -DEVICE_ATTR_RO(name) +static DEVICE_ATTR_RO(name) coresight_simple_func(trcoslsr, TRCOSLSR); coresight_simple_func(trcpdcr, TRCPDCR); diff --git a/drivers/hwtracing/coresight/of_coresight.c b/drivers/hwtracing/coresight/of_coresight.c index b0973617826f..3cc57c1e3b5d 100644 --- a/drivers/hwtracing/coresight/of_coresight.c +++ b/drivers/hwtracing/coresight/of_coresight.c @@ -86,7 +86,7 @@ static int of_coresight_alloc_memory(struct device *dev, return -ENOMEM; /* Children connected to this component via @outports */ - pdata->child_names = devm_kzalloc(dev, pdata->nr_outport * + pdata->child_names = devm_kzalloc(dev, pdata->nr_outport * sizeof(*pdata->child_names), GFP_KERNEL); if (!pdata->child_names)