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: 9739471 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 0C59E6034C for ; Sun, 21 May 2017 22:00:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F1497285C9 for ; Sun, 21 May 2017 22:00:25 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id E61F2285F3; Sun, 21 May 2017 22:00: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=-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 43C98285C9 for ; Sun, 21 May 2017 22:00:25 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756987AbdEUWAZ (ORCPT ); Sun, 21 May 2017 18:00:25 -0400 Received: from mail-wm0-f54.google.com ([74.125.82.54]:38706 "EHLO mail-wm0-f54.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756970AbdEUWAY (ORCPT ); Sun, 21 May 2017 18:00:24 -0400 Received: by mail-wm0-f54.google.com with SMTP id e127so14802367wmg.1 for ; Sun, 21 May 2017 15:00:23 -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=Pfb3Dr5x6N2N/5jRa/V9i81s/RkEE3vkOQmJ6OpA5Lkwb+t9+MGDHAvXg0vLTddVJa 057mkVAH4jp1rz1q3rJjOpr8Y4bwiDRMIDLYOM8WLHYJip0t0RrxKb5C1OzEUAwqPb1g bYCq04S1Y9BVFLgY/Np8bMcvSEm3epxmunZcLgM8YjkUmX9Iiawe6CLtug4yJbeKeGTo lPyURpq5M8MezrjVSVjYloThqUkF4uUeeN/Wb+zgLQ6LkMf9LlRcKHiJ4LGWyMxTjz2A kZPQrCXBmfzI2NeISjWZggPJh6bzHMc6sSisn56qt05kkPXbH8HSwCdb6Vq6/QUh7cBd VwFA== X-Gm-Message-State: AODbwcBNPKXqpCoDOTE8n4L0KqtqjwAdawGgLISXk9Loq0zYcrWBWKmB sP4417zEEIab15jC 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 Cc: Jerome Brunet , linux-clk@vger.kernel.org, linux-amlogic@lists.infradead.org, Linus Walleij , Boris Brezillon 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> 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 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)