From patchwork Sat Aug 27 06:26:30 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Baoyou Xie X-Patchwork-Id: 74856 Delivered-To: patch@linaro.org Received: by 10.140.29.52 with SMTP id a49csp706328qga; Fri, 26 Aug 2016 23:27:09 -0700 (PDT) X-Received: by 10.66.135.13 with SMTP id po13mr12767100pab.113.1472279228996; Fri, 26 Aug 2016 23:27:08 -0700 (PDT) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id b132si25628123pfb.196.2016.08.26.23.27.08; Fri, 26 Aug 2016 23:27: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=@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 S1754225AbcH0G1D (ORCPT + 27 others); Sat, 27 Aug 2016 02:27:03 -0400 Received: from mail-pf0-f169.google.com ([209.85.192.169]:34896 "EHLO mail-pf0-f169.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750825AbcH0G1B (ORCPT ); Sat, 27 Aug 2016 02:27:01 -0400 Received: by mail-pf0-f169.google.com with SMTP id x72so35204533pfd.2 for ; Fri, 26 Aug 2016 23:27:01 -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=G/8ABZWOHzBMMNS1kJq5Inoe8h3/KmhrwXkydocOBBM=; b=gbbZjjgL/3E+HvqzW3F7gppJElXnxrhSEt5QwSE6iJnAz/ioLRrt90z2p8PMSrWyPh ZqN8PIWiv1nKOoJp/IhSdnu2eRyzXOpKu1B+e8+mUP358gGtfvXmZNposOQEGhWOQVbs oxo7MgIlzgnJIxVKROySHYxXJm9cOgFDn7Wdo= 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=G/8ABZWOHzBMMNS1kJq5Inoe8h3/KmhrwXkydocOBBM=; b=CXF+PmYJvQ0WxaIeY2r3zuDnOjVkNRCVLeXaduF+OV+tvS9m09T5MP9PQ3UuxO92sR 4/e6+kqk5a5ZOiUXWeEiNMyootL/DQXPtaAQQGCoCwd4HVB/cs0war4aIUUtBWY8MtxX alixOSx+8R4iRd1TN9UOJnus/cXGLPYj3kN6EZcBCng9VFaK2LamX3oYo2KN+/Aq8WoR 24ZAs2mExBvoBHRhLna+VCmvSrJ7Cv3bUIIF++WIG9jajQILGvkS5yIQ5Ze0HYaW4kpv fIAmh4vg/sX93mttph7o1ttejH3Rb5SBzmWQ88jOxvQn2ehDEoQwSXlDSlbT8KHF8Xjq DW0w== X-Gm-Message-State: AE9vXwPtzE3yFQr/AT1ngXCobVCk9NAyNN4BQqsMmDLqcWHpl5lgMe0TeP3HhmlPlJmyF0Vn X-Received: by 10.98.144.144 with SMTP id q16mr12614373pfk.98.1472279220905; Fri, 26 Aug 2016 23:27:00 -0700 (PDT) Received: from localhost.localdomain ([104.237.91.59]) by smtp.gmail.com with ESMTPSA id j2sm33098902paa.46.2016.08.26.23.26.53 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 26 Aug 2016 23:27:00 -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] fix:iio:common:st_sensors:st_sensors_trigger:mark symbols static where possible Date: Sat, 27 Aug 2016 14:26:30 +0800 Message-Id: <1472279190-23169-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 --- drivers/iio/common/st_sensors/st_sensors_trigger.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) -- 2.7.4 Reviewed-by: Linus Walleij 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);