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: 9637357 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 7A17D60327 for ; Tue, 21 Mar 2017 18:43:37 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6F47D28304 for ; Tue, 21 Mar 2017 18:43:37 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 63EBE2830A; Tue, 21 Mar 2017 18:43:37 +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=-6.3 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DF0F62830A for ; Tue, 21 Mar 2017 18:43:36 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933106AbdCUSle (ORCPT ); Tue, 21 Mar 2017 14:41:34 -0400 Received: from mail-wm0-f53.google.com ([74.125.82.53]:38771 "EHLO mail-wm0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933071AbdCUSl0 (ORCPT ); Tue, 21 Mar 2017 14:41:26 -0400 Received: by mail-wm0-f53.google.com with SMTP id t189so19282945wmt.1 for ; Tue, 21 Mar 2017 11:41:25 -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=MQ+kKUEaGk4OEy5O604DBlFKEhs2sn1OXVentmLqOgn/Tc9nCXuIe85PzFUJp3Ei7H uH8YfrE4undhc4VzriclzT20Dj5rSgEkVKTlpTKuZqLlpFKHNQGA4k0TvEK7r0rR+iya ktQFITDdj9tlq3+nKyrOBklHAV0+OafFTlhNnLh4VYcmTzxnUBkNHVMC9J5jFW1FbPQZ zEkXMjxvDrrKPIHyy9AuAezX4rE4hHc11uZE14H4N8zXyj2MTreK5jblT9iuJLBC1TnZ ofiFgWEctp1/jS8rq4MwsY6JCvG2ExxQk/tyxA/p8MmpmBq+Ge4QfRHxTDvXq1LaX2Df dHxA== X-Gm-Message-State: AFeK/H0YoHnPsMva4cByICDwZISglZeE8gLGH0XaOfKqi1RGGvxpctsmwKRC0f8PN2fw6FZM 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 Cc: Jerome Brunet , linux-clk@vger.kernel.org, linux-amlogic@lists.infradead.org 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> Sender: linux-clk-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-clk@vger.kernel.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)