From patchwork Sun Aug 28 07:04:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 74871 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp1090269qga; Sun, 28 Aug 2016 00:05:49 -0700 (PDT) X-Received: by 10.66.250.196 with SMTP id ze4mr21274157pac.86.1472367949028; Sun, 28 Aug 2016 00:05:49 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id m18si31773299pfg.123.2016.08.28.00.05.48; Sun, 28 Aug 2016 00:05:49 -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=@linaro.org; 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=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932375AbcH1HFn (ORCPT + 27 others); Sun, 28 Aug 2016 03:05:43 -0400 Received: from mail-pf0-f179.google.com ([209.85.192.179]:36277 "EHLO mail-pf0-f179.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932281AbcH1HFm (ORCPT ); Sun, 28 Aug 2016 03:05:42 -0400 Received: by mail-pf0-f179.google.com with SMTP id h186so41479890pfg.3 for ; Sun, 28 Aug 2016 00:04:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=from:to:cc:subject:date:message-id; bh=5ICKM2ei/X+w/v87U+TBTnsqs5QqW33A80t6BSWh8hQ=; b=AFDFwQhXLPTpUwOlpItRH9I2RGEGNX/ekuNn3Ogj4GZRxHiGM4+NX34hJ5czFxfHjU VsYjdOTjd5yp9WQqd9E82tHAC7FK/+S49qSEqwtUKdbEpMrafynKQPvHz4sRf8UWctXv FL8JEk1F28TFswpWCl0cQ4MmUENVhpo7g7dlg= 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; bh=5ICKM2ei/X+w/v87U+TBTnsqs5QqW33A80t6BSWh8hQ=; b=MaKg0rnCT3Yi6SH/SA9GN7qlQk42uzbfFsclu6dDuzJvP1ZMo/+Bo1BFL43Ttwv3P3 XIc7iD5iwrItm/uTHxNHzsUrOqLxWMn3Q1TknU+AwzwcDm6O3kvMUNTdJw27B7y5FFFh 9jyjBp0HJunGlCLKy/VisUK6QWrO84dhbiM/3p3mOimNRVBOkLXl0edtOnW1Ri7DY/pF Zda4DAfe+/Ghn0L7hZxGHcrTZgGik2g1xxyX+WsA9U0t3cr3kOFwDXJ0tBI5v3vAoG9g UTy2DqDVUISrsPeu94CbCs0OVQil9BCRPoVuffWYXpAgCKK+EycQMnynBYWQDme9dQfG vPUg== X-Gm-Message-State: AE9vXwMWiyi+uN3Esc40GKVrOIWVtTlfAI2r4SDv09wC0vodaEnZhjxN+P+9PHHj7OsEsR2s X-Received: by 10.98.213.130 with SMTP id d124mr21296051pfg.118.1472367890203; Sun, 28 Aug 2016 00:04:50 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.142]) by smtp.gmail.com with ESMTPSA id k9sm40048404pfj.63.2016.08.28.00.04.34 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Sun, 28 Aug 2016 00:04:49 -0700 (PDT) From: Baoyou Xie To: jic23@kernel.org, lars@metafoo.de, pmeerw@pmeerw.net Cc: linus.walleij@linaro.org, rob@kernel.org, maitysanchayan@gmail.com, baoyou.xie@linaro.org, leonard.crestez@intel.com, gregor.boirie@parrot.com, linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org, arnd@linaro.org, xie.baoyou@zte.com.cn Subject: [PATCH v2] fix:iio:common:st_sensors:st_sensors_trigger:mark symbols static where possible Date: Sun, 28 Aug 2016 15:04:11 +0800 Message-Id: <1472367851-14762-1-git-send-email-baoyou.xie@linaro.org> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org We get 2 warnings when biuld kernel with W=1: drivers/iio/common/st_sensors/st_sensors_trigger.c:69:13: warning: no previous prototype for 'st_sensors_irq_handler' [-Wmissing-prototypes] drivers/iio/common/st_sensors/st_sensors_trigger.c:85:13: warning: no previous prototype for 'st_sensors_irq_thread' [-Wmissing-prototypes] In fact, these functions are only used in the file in which they are declared and don't need a declaration, but can be made static. so this patch marks these functions with 'static'. Signed-off-by: Baoyou Xie Reviewed-by: Linus Walleij --- drivers/iio/common/st_sensors/st_sensors_trigger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 diff --git a/drivers/iio/common/st_sensors/st_sensors_trigger.c b/drivers/iio/common/st_sensors/st_sensors_trigger.c index e66f12e..fa73e67 100644 --- a/drivers/iio/common/st_sensors/st_sensors_trigger.c +++ b/drivers/iio/common/st_sensors/st_sensors_trigger.c @@ -66,7 +66,7 @@ static int st_sensors_new_samples_available(struct iio_dev *indio_dev, * @irq: irq number * @p: private handler data */ -irqreturn_t st_sensors_irq_handler(int irq, void *p) +static irqreturn_t st_sensors_irq_handler(int irq, void *p) { struct iio_trigger *trig = p; struct iio_dev *indio_dev = iio_trigger_get_drvdata(trig); @@ -82,7 +82,7 @@ irqreturn_t st_sensors_irq_handler(int irq, void *p) * @irq: irq number * @p: private handler data */ -irqreturn_t st_sensors_irq_thread(int irq, void *p) +static irqreturn_t st_sensors_irq_thread(int irq, void *p) { struct iio_trigger *trig = p; struct iio_dev *indio_dev = iio_trigger_get_drvdata(trig);