From patchwork Mon Jun 12 19:44:37 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 9782685 X-Patchwork-Delegate: sboyd@codeaurora.org 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 12490602DA for ; Mon, 12 Jun 2017 19:45:03 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 04E71284F1 for ; Mon, 12 Jun 2017 19:45:03 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EDC5E286C8; Mon, 12 Jun 2017 19:45:02 +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.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,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 176EC284F1 for ; Mon, 12 Jun 2017 19:45:02 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752704AbdFLTpB (ORCPT ); Mon, 12 Jun 2017 15:45:01 -0400 Received: from mail-wr0-f175.google.com ([209.85.128.175]:32971 "EHLO mail-wr0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752694AbdFLTpB (ORCPT ); Mon, 12 Jun 2017 15:45:01 -0400 Received: by mail-wr0-f175.google.com with SMTP id v104so108344450wrb.0 for ; Mon, 12 Jun 2017 12:45:00 -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=iVo+54UL56h8RogSOybmVQInVzMLF4Iau0TZuWBd4GQ=; b=yaRLlVKPLzWrozIxD8VzLmzBHqKL+wViFBahdap2MZfDKnKAyxLr7fdnLTBGS6N+LK E2uwJTg2Aaamf9Ys0i2TjomaGOP1buJYDrjniAbeI0SlUwo2YedqZkd7jx9UbrmJsjtp x/Rx3niOMyEVCye3hi+wlLAp/YR/djWVzBilm0IQcP1BGHEQeKeDydo7joBd4Q9FyeMf Ba8vnhUKcWCwDV7qU8hhB6BrTQHp0dS8dppAs/9CUvk5U2DdUeZ+idDygfsgJIsKp43H kwGJz2Rs3jHPK6WYXK1gpf3UqviiRFPblb2LVvCsS7LQ57qvzoJGeKT8zKHgKhh9aQog AeWQ== 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=iVo+54UL56h8RogSOybmVQInVzMLF4Iau0TZuWBd4GQ=; b=jwbfVGVMD3jsLl/rLkerHsPz9Pax5aUFYTdWDy/Y+AIjnR0LPntlVlF/k+n2AKIkd6 L5QA6VX63vkBcaHXmfIgcTbITeTpZccdnlQPQYYanRRpREic66htb4W0vo7z2Boehpc9 nU8Fsa9+qfz7MYNvbKQSdOE3PEtNhSx7MITBqubX74h/Sm+3gecEGTQE/JZ6KjUO4ljS DRlCBU01LauvkDMR6KCUaKFaE1Kjxw9dw68UJ9b+nX2a9tlgLpCWgvrWCqDdy2f6r3i9 BlRo9x1SDkzaGUSDnI+QWNFLPyplsl02WWBoUIu9xjcVX/42vfgxKjHC+kxQLtr5pmJc Wv0A== X-Gm-Message-State: AKS2vOz+1DFCgQnFKHENK1piKI4r4A4uGyblJPDWf8Fn7yk4t0pvf+wu h+fcQU4kleAjhTxM X-Received: by 10.28.74.80 with SMTP id x77mr345564wma.81.1497296698529; Mon, 12 Jun 2017 12:44:58 -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 70sm13250797wmu.28.2017.06.12.12.44.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 12 Jun 2017 12:44:58 -0700 (PDT) From: Jerome Brunet To: Michael Turquette , Stephen Boyd , linux-clk@vger.kernel.org Cc: Jerome Brunet , Kevin Hilman , linux-amlogic@lists.infradead.org, Russell King , Linus Walleij , Boris Brezillon Subject: [PATCH v3 09/10] clk: fix incorrect usage of ENOSYS Date: Mon, 12 Jun 2017 21:44:37 +0200 Message-Id: <20170612194438.12298-10-jbrunet@baylibre.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170612194438.12298-1-jbrunet@baylibre.com> References: <20170612194438.12298-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 8d57e130c4e0..5d545954c48f 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)