From patchwork Sun May 21 21:59:56 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 9739485 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 03A1D6034C for ; Sun, 21 May 2017 22:00:57 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E8E68285C9 for ; Sun, 21 May 2017 22:00:56 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DD8C3285F3; Sun, 21 May 2017 22:00:56 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID 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 72CB3285C9 for ; Sun, 21 May 2017 22:00:56 +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=P/5k6jWQJgmCY3I4WbrM76S+rcJTlmAwydgmTaZtnJs=; b=Y5lH8LX0gzIr+9Fp6ChuwZTTBp 5ShLNgUGTFPv5/g/i+lqcRw2lBJKsPNBz8JDvIHevypR5wdmtqoiL47TaZe8NPLkKeyTzbMh+ldxw jJM60FOtrz16FsQqUQefhagFbXlvJwMEm1BUxwJyvIy3xeP3WxNB5jwrnvVhL2+72MfaB5OeREHXI 0TqaWtQNocF/IVNsKBeySRxKQBqdZc6Yq9BVAMe1ckq03uEmOQpw5MpTpiLshuhvou6342Wctvfzl tFbdGdsscxNoqECSn7n2wfdhnGl45ULF1tfTJKqK28IKTu806G532DNSEMVjsUPpqkBBjJEWxa2DK gsNaveIg==; 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 1dCYu8-0002XN-Nl; Sun, 21 May 2017 22:00:48 +0000 Received: from mail-wm0-x235.google.com ([2a00:1450:400c:c09::235]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dCYtz-0002MA-E1 for linux-amlogic@lists.infradead.org; Sun, 21 May 2017 22:00:42 +0000 Received: by mail-wm0-x235.google.com with SMTP id d127so130114163wmf.0 for ; Sun, 21 May 2017 15:00:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=a6Oa8UIKx/oy3UCrr/1Kaf7fr2l9tDY1q3a9wgdFj8U=; b=hrV60yk+bX9gE8/6XW80u6Me8OBdYV6FKp3wxRBxLfLs/HUipEVlrI0KkPG3ta0G07 Ofu3VJROcRjoGSe077Pwc/dgIsfDoZsut3j/WFTzZGHxVIH+6kNctN9Xx3yRP1pkMWVn aW8DJ8Zretaj7iCsZiG2KyiVCWm3kxptunBdeDWA6V/tXjA+GaHKO6Tamr4qcl3ofaV3 1sNTaJlOpY4lR4tLSn8gQMAO979+NBCvFQ1oE/rKxbibp+1dZk1FLJjuwCFThb7iiRnE +J0qas01EByiJfrL3TdASv7I9VpgCPrakwUGC0Fns1KtzLivC/0JTNtn4FAKPcSiGBuT ABgw== 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=a6Oa8UIKx/oy3UCrr/1Kaf7fr2l9tDY1q3a9wgdFj8U=; b=UDXCWOAs2hRLAK9FA9q7vmRQOmt0Dllrr9VnWeGIVrrmNmlUMeHImG4Jh5mEKvbhy7 ISEzN7QnUGjSCVO2WNCByNBYguNigzjI9EN7nuJ6/dc7hCWl2hTa/y5oBzFEsixtCewc tr2YfzCSEkcny8PE8C+D75szkVgp7Dd58ddYIPtfzQoz7Z8nXzKj9Oy8KkRZGpGHBzSZ /t38kOeNzbG8ZXlue5FCrCVK9TEZr+L3oifInQWxxy5MBfv4cSXCfTavPB/1onIX95sg MiUYxTnaWuRRTE2OK3qnim9NCEveJU7b2cwqob1a6MTtrTpjbC7CSjzeSujF4/YweAYE FRsg== X-Gm-Message-State: AODbwcAGdauCS0en4VDLSxqGWOFd30B/MArQm6qsP80ejucH6ldMx9yv e7gfE1GIa07x5ymy X-Received: by 10.223.130.15 with SMTP id 15mr10834979wrb.59.1495404023043; Sun, 21 May 2017 15:00:23 -0700 (PDT) Received: from localhost.localdomain (cag06-3-82-243-161-21.fbx.proxad.net. [82.243.161.21]) by smtp.googlemail.com with ESMTPSA id a73sm12812579wrc.58.2017.05.21.15.00.21 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 21 May 2017 15:00:22 -0700 (PDT) From: Jerome Brunet To: Michael Turquette , Stephen Boyd , Kevin Hilman Subject: [PATCH v2 09/11] clk: fix incorrect usage of ENOSYS Date: Sun, 21 May 2017 23:59:56 +0200 Message-Id: <20170521215958.19743-10-jbrunet@baylibre.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170521215958.19743-1-jbrunet@baylibre.com> References: <20170521215958.19743-1-jbrunet@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170521_150039_682290_0A329AB2 X-CRM114-Status: GOOD ( 10.96 ) X-BeenThere: linux-amlogic@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: linux-amlogic@lists.infradead.org, Linus Walleij , Boris Brezillon , linux-clk@vger.kernel.org, Jerome Brunet MIME-Version: 1.0 Sender: "linux-amlogic" Errors-To: linux-amlogic-bounces+patchwork-linux-amlogic=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP ENOSYS is special and should only be used for incorrect syscall number. It does not seem to be the case here. Reported by checkpatch.pl while working on clock protection. Signed-off-by: Jerome Brunet --- drivers/clk/clk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 955dae044f11..01306191133c 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -2032,7 +2032,7 @@ static int clk_core_set_parent_nolock(struct clk_core *core, /* verify ops for for multi-parent clks */ if ((core->num_parents > 1) && (!core->ops->set_parent)) - return -ENOSYS; + return -EPERM; /* check that we are allowed to re-parent if the clock is in use */ if ((core->flags & CLK_SET_PARENT_GATE) && core->prepare_count)