From patchwork Tue Nov 14 08:52:38 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Benjamin Gaignard X-Patchwork-Id: 10057191 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 087D5601D3 for ; Tue, 14 Nov 2017 08:54:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1116929081 for ; Tue, 14 Nov 2017 08:54:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 0591829084; Tue, 14 Nov 2017 08:54:05 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 8BEB529081 for ; Tue, 14 Nov 2017 08:54:04 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=JRcS2xaya2Ob1YO+K91tamncxbDQyYn8Nf9T38n6gyU=; b=k9QBJIQ1qfJRy1AqKUBvj2vM04 wdzyFvMeetiogKPOLNdaHn0grVVmBKTqiRA27Ifiw4JXmoXxZB2U3pUA3iqyuE4ZiLTzYFkGJdXwe nBm2aHexkvlnDeXYP4Y0PhxPgEU59UzVsYdwJ0ufGwsy8kbB8MpxbOXkiw9Vtwi40jguI0m95zGjI /3QB7g7yxFQ5y5uKUhzj67g0hKw9Y2OSFrgX0e3nIL+R/LIrOQgtJ4OPqf5EusEjfcagTaka2ucAQ gMmIaH5Q59CXInQNYJeGe/3RjH1HRzv68fJyQQesNNMEHTZF1HwSUthnUjJCfjG3tbXMRIwTZePiK 4PbsHDHg==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1eEWyp-0000WZ-Qg; Tue, 14 Nov 2017 08:54:03 +0000 Received: from mail-wr0-x243.google.com ([2a00:1450:400c:c0c::243]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1eEWyT-0000BB-63 for linux-arm-kernel@lists.infradead.org; Tue, 14 Nov 2017 08:53:43 +0000 Received: by mail-wr0-x243.google.com with SMTP id 15so16776280wrb.5 for ; Tue, 14 Nov 2017 00:53:20 -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=GlBilOK4xrPCZn69luv1A0oG1iUpeKmAhROpfSnoqIA=; b=UKeJb7F53lhIEzK0WisHVYW7a+3xsQbxb/OvveUUQK0tiYvpUeiFfViCWaz2D+CAs+ srbVOjElp94NgmY/wR+LkXTlHnxPWL1ke5EXaP8nNp/1aW4DplW2sIKEV9wH5TF0pAwL Luukaq3MPOXEwyMRXSWeqPyfgmeLt4Fq7UYH0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=GlBilOK4xrPCZn69luv1A0oG1iUpeKmAhROpfSnoqIA=; b=mVwAL56BlPDVcFjyG8GScE0uiS5U5LTo5ceSXJ9sXrstCV8xSxghpYIYGuaYpdFYQv dgYqyUAuTIJUGDXcHU1BqF9Pwp08ezw6ruR4f4A/A1G7I00mQQ/He3/+W3reHhm9lv+M +yaMdGPQMJ/2CIKYCgFeIDsk2J0+TpHrB9Er7kDxvE8+jSoMPSp0SgMTy6ejAMCSUj2t +v1QzEaiF5Fl35L+5PAzcvmPN07aUJ65TzuJrnaw9WWSCfo+dewjTF/d7tCE00GPM2aB PVeZrM6iWXsY/wghAPcOEAoQrCzGkj1bteuze9YUsM7tfStj+6QM1Md70AbmyC9MhAeB LELg== X-Gm-Message-State: AJaThX5AFKYXR455SVsUl0Zsb6owzvavVkWpJf8/ZmZxe+moMs4nZ34A qMujBtadUP1UC9mCiMG66+slnA== X-Google-Smtp-Source: AGs4zMb2laGYvR65hIHO8lZRd/Ox3XaqIWlNFf64hkciqHhreTzsIMXIq0MpeDTX+PW6iVKXl1tzkQ== X-Received: by 10.223.185.33 with SMTP id k30mr9537203wrf.40.1510649599459; Tue, 14 Nov 2017 00:53:19 -0800 (PST) Received: from lmecxl0911.lme.st.com ([80.215.205.30]) by smtp.gmail.com with ESMTPSA id g28sm22894551wra.31.2017.11.14.00.53.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 14 Nov 2017 00:53:18 -0800 (PST) From: Benjamin Gaignard To: robh+dt@kernel.org, mark.rutland@arm.com, linux@armlinux.org.uk, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, daniel.lezcano@linaro.org, tglx@linutronix.de, ludovic.barre@st.com, julien.thierry@arm.com, sudeep.holla@arm.com, arnd@arndb.de Subject: [PATCH v8 1/6] clocksource: timer_of: rename timer_of_exit to timer_of_cleanup Date: Tue, 14 Nov 2017 09:52:38 +0100 Message-Id: <1510649563-22975-2-git-send-email-benjamin.gaignard@linaro.org> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1510649563-22975-1-git-send-email-benjamin.gaignard@linaro.org> References: <1510649563-22975-1-git-send-email-benjamin.gaignard@linaro.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20171114_005341_377293_483C2845 X-CRM114-Status: GOOD ( 12.36 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, Benjamin Gaignard , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP Change function name to something more explicit since it is only used in init error cases. Add __init annotation and description about the function usage. Signed-off-by: Benjamin Gaignard --- drivers/clocksource/timer-of.c | 9 ++++++++- drivers/clocksource/timer-of.h | 2 +- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/clocksource/timer-of.c b/drivers/clocksource/timer-of.c index 7c64a5c1..a319904 100644 --- a/drivers/clocksource/timer-of.c +++ b/drivers/clocksource/timer-of.c @@ -177,7 +177,14 @@ int __init timer_of_init(struct device_node *np, struct timer_of *to) return ret; } -void timer_of_exit(struct timer_of *to) +/** + * timer_of_cleanup - release timer_of ressources + * @to: timer_of structure + * + * Release the ressources that has been used in timer_of_init(). + * This function should be called in init error cases + */ +void __init timer_of_cleanup(struct timer_of *to) { if (to->flags & TIMER_OF_IRQ) timer_irq_exit(&to->of_irq); diff --git a/drivers/clocksource/timer-of.h b/drivers/clocksource/timer-of.h index 44f57e0..f521477 100644 --- a/drivers/clocksource/timer-of.h +++ b/drivers/clocksource/timer-of.h @@ -67,6 +67,6 @@ static inline unsigned long timer_of_period(struct timer_of *to) extern int __init timer_of_init(struct device_node *np, struct timer_of *to); -extern void timer_of_exit(struct timer_of *to); +extern void __init timer_of_cleanup(struct timer_of *to); #endif