From patchwork Wed Jan 27 15:57:19 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Arnd Bergmann X-Patchwork-Id: 101064 Delivered-To: patch@linaro.org Received: by 10.112.130.2 with SMTP id oa2csp2663977lbb; Wed, 27 Jan 2016 07:59:29 -0800 (PST) X-Received: by 10.98.44.66 with SMTP id s63mr43808690pfs.2.1453910368908; Wed, 27 Jan 2016 07:59:28 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id vw1si10249562pab.74.2016.01.27.07.59.28; Wed, 27 Jan 2016 07:59:28 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754793AbcA0P70 (ORCPT + 30 others); Wed, 27 Jan 2016 10:59:26 -0500 Received: from mout.kundenserver.de ([212.227.17.13]:58313 "EHLO mout.kundenserver.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754761AbcA0P7X (ORCPT ); Wed, 27 Jan 2016 10:59:23 -0500 Received: from wuerfel.lan. ([78.42.132.4]) by mrelayeu.kundenserver.de (mreue102) with ESMTPA (Nemesis) id 0LrsPm-1ZxGgv1Y5u-013gq7; Wed, 27 Jan 2016 16:58:43 +0100 From: Arnd Bergmann To: "Martin K. Petersen" , James.Bottomley@HansenPartnership.com Cc: linux-arm-kernel@lists.infradead.org, Arnd Bergmann , linux-scsi@vger.kernel.org, "James E.J. Bottomley" , Russell King , linux-kernel@vger.kernel.org Subject: [PATCH 3/7] scsi: acornscsi: mark calc_sync_xfer as __maybe_unused Date: Wed, 27 Jan 2016 16:57:19 +0100 Message-Id: <1453910247-3447628-4-git-send-email-arnd@arndb.de> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1453910247-3447628-1-git-send-email-arnd@arndb.de> References: <1453910247-3447628-1-git-send-email-arnd@arndb.de> X-Provags-ID: V03:K0:PaXOkvslz/EPwVqBbl9Bw4Bythq/Qp2QsDuvCUejtlJXJQSRfp0 Rao6ohvJHDHg5Rp7g5hdiIcp9anSnSQbJ+icnXPi/4oX5TYAuWAVn/0m6+5k2WSavzcKIZw MGNhVhpgwhCIUZo05xAdJsGz9zWOYxFysWUNrDm8G4UWy9v7OkEO6XCxc6uen7ZefizBUoo Z9CjwWiAIEGfoMMN0FwgA== X-UI-Out-Filterresults: notjunk:1; V01:K0:FEYiRIa7unI=:Iidx6PxtbWS/rDCVNlV0B/ 81rvJUE0hXSnxOWQtfhXwJZa1L+PFh7r8q3GrQgHLp3R9e8/GC0oMDnypdQrifz9L9kHvVXhC pDGmwPqYYthxuXWUfJMt5plTWRbBpn4yL3uLEC3wJEqCbP6Mb/fYDvxMXnzsiKW5ruOj97NGT GTQb/Uw0YGAkS+A55KiGfEXeQQVjaQPgXL8ksmShlATCsM+ohqj4XiJu+eYqhvPrfT4sIDNAO hgopkPHMVGny9O4RaR+RcY6H6u/6ZuO5Ijt+sknslEm18P7ZwWVcF7O5g2sMevTopKB2w50oY DpXhftvDdA0dFtZkQcRIku/0uCzsaTnGaVZf2pyqzYK4Q0GEeNaipnOF9aP0AGCNCWHyzsZXG aE22mHNpjLg0PNQemhYV1FD9Zw6njM1KjaexhPcqser2u8wZbkeVzOaSxKpUrzy384B9K6GWg il/8aXA7FkNX+J9qLiwt+SMPGOC7Gd8HUbaqMKiEIXcncZ73ICSJN4Giba4XA9rm3EV+DN/5A wLWvzXYUdFOR/rrZY6p6phQR6awELryMXtYeOaY25z5BPQuRYCGEy6VKhwc2eRS2f/W/cyOg7 Z5iYaJqcRS3Vc3qtW/pbzvT5u2+i5JijBlii/RszwZfRddA70xCpfplUrZdfLkTuTjYkDqj+e i43OxRkW/FTxE8gZ38642qY6wu5ubPwjT7gfVL32IDHLZV0d2rz3PqKl89YTvxlSq7ag= Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The calc_sync_xfer function is only used if CONFIG_SCSI_ACORNSCSI_SYNC is set, otherwise we get a compiler warning: scsi/arm/acornscsi.c:680:15: warning: 'calc_sync_xfer' defined but not used [-Wunused-function] unsigned char calc_sync_xfer(unsigned int period, unsigned int offset) This marks the function as __maybe_unused to shut up the warning and silently drop the function in the object code when there is no caller. Signed-off-by: Arnd Bergmann --- drivers/scsi/arm/acornscsi.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -- 2.7.0 diff --git a/drivers/scsi/arm/acornscsi.c b/drivers/scsi/arm/acornscsi.c index deaaf84989cd..12b88294d667 100644 --- a/drivers/scsi/arm/acornscsi.c +++ b/drivers/scsi/arm/acornscsi.c @@ -677,7 +677,8 @@ int round_period(unsigned int period) * Copyright: Copyright (c) 1996 John Shifflett, GeoLog Consulting */ static -unsigned char calc_sync_xfer(unsigned int period, unsigned int offset) +unsigned char __maybe_unused calc_sync_xfer(unsigned int period, + unsigned int offset) { return sync_xfer_table[round_period(period)].reg_value | ((offset < SDTR_SIZE) ? offset : SDTR_SIZE);