From patchwork Tue Mar 21 18:33:30 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 9637333 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 9A5C66020B for ; Tue, 21 Mar 2017 18:34:25 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9138328304 for ; Tue, 21 Mar 2017 18:34:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 85FB42840E; Tue, 21 Mar 2017 18:34:25 +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 1FDB328304 for ; Tue, 21 Mar 2017 18:34:25 +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=yitMTnzTtBUOfI4h1o6u9WONMUpWSNm88iOCE+wKycQ=; b=S4NHW+Jb0N71OHiLhaGWPbaN15 Z/eosUnngOe4Bi0kZIkekLs09OYTPK90W/hRyiIcY+itbfTyAA0wFVBHsBsjjgWyzERYdoLe+w/FV fYUnQn6BIRu6vOx69ixfGq0ru5SD1ADv9FgSVXcLZa3dMrBc4rIwUHGU3v/VR1S6EBsVA+JM7kUTn U0cggvMTcZqtcUW2OahGf2UmbMbLHY3NLsqK54tcrF4hEI33pHf/h8bzBnVAgtEIPhg2Q4SwbdQmW Cdac/vaorsks27mOfssaKu18lQfS9FQXy8sQ96TbohOjeLY0Zuoh4yF9QiE2TS8pfv9E8oND/DA9W 6KqZf/tQ==; 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 1cqObr-0000XH-Ki; Tue, 21 Mar 2017 18:34:19 +0000 Received: from mail-wm0-x22a.google.com ([2a00:1450:400c:c09::22a]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1cqObb-00006j-El for linux-amlogic@lists.infradead.org; Tue, 21 Mar 2017 18:34:07 +0000 Received: by mail-wm0-x22a.google.com with SMTP id t189so19139850wmt.1 for ; Tue, 21 Mar 2017 11:33:42 -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=uNlgtRdlwgmworbKflT0z3StG9yhg0oysun62b676bo=; b=mKLTfny4/LN0ZHE+NIzStVnYF5A0WW1WQ4iid5ObI4FhsXYNjj9UQMSFo6NFLJi/79 ffWPTUB6XDG+aHSwaAdp014ariQtL0YsqzCbdHt+n18dMWv6vRA47jLm7yllN4sa8yNU 0ZqAutMevBOF6GwJWZKTh3426YWbMVMbpZvzEmsnAvjpPsrvOP0zrozDVFPCrU7UhWU2 mzEysXP329/DMnl3advDMbaDUvF/TOno9iOjkSjOCzL4ULThJL0glj8dZgp6uQDPbb++ IwzLvLi54UPYb7pHIGWtMMLM0Wt+PtLXAQdglCmlT0r/7iUyi5Lj64mzH0petDscg6th 2uLg== 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=uNlgtRdlwgmworbKflT0z3StG9yhg0oysun62b676bo=; b=WRmv9BInV5B+Du4Ckv7m/qsRL7vVvl+XB00r2KiGBYebZI3Dw8JY6dUv0g3GUMSfwM y66MxM78yj/lqGo3aA+ZKuNEG1GVXKd95CEu9K78Pj2eJXc41ySJ1piSwjdHqteB76k6 XEYAjY1bQ92w5v50m1gqP0b/cjv6HSxNIzdHBb5bpO8KYkoB+xnvt68EjhpCF8N+uzNE Nbhx7fcNe11ouMMExIE/Wni6Bz5cBj2WMhi6sXuJgz1soyfIgtdEvE5qYf0801t4J+sS l2FZED00l2YVJEf5fBaDkO5T2fVoi0RZ+bsQIHh5I3ufUCJVIcc9CnhksqgT5zKZwSIZ D9Ew== X-Gm-Message-State: AFeK/H3sWJD2GyN6v4KoK3H2shf9Pwz3GJ9/US/SmK+cKfM+04epNRynom7+uQ3m9PeVPgvZ X-Received: by 10.28.159.73 with SMTP id i70mr4206886wme.78.1490121221434; Tue, 21 Mar 2017 11:33:41 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id q12sm18667504wmd.8.2017.03.21.11.33.40 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 21 Mar 2017 11:33:40 -0700 (PDT) From: Jerome Brunet To: Michael Turquette , Stephen Boyd , Kevin Hilman Subject: [RFC 7/7] clk: fix incorrect usage of ENOSYS Date: Tue, 21 Mar 2017 19:33:30 +0100 Message-Id: <20170321183330.26722-8-jbrunet@baylibre.com> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170321183330.26722-1-jbrunet@baylibre.com> References: <20170321183330.26722-1-jbrunet@baylibre.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170321_113403_840403_BDEB6717 X-CRM114-Status: GOOD ( 10.67 ) 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, 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 ec6d57e97bac..377d5301348b 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -1926,7 +1926,7 @@ static int clk_core_set_parent(struct clk_core *core, struct clk_core *parent) /* 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)