From patchwork Thu May 18 16:38:02 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 9734789 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 710A7601C8 for ; Thu, 18 May 2017 16:38:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 3DF3C28775 for ; Thu, 18 May 2017 16:38:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 325AA2883C; Thu, 18 May 2017 16:38:19 +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 8A4E828775 for ; Thu, 18 May 2017 16:38:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932525AbdERQiR (ORCPT ); Thu, 18 May 2017 12:38:17 -0400 Received: from mail-wm0-f50.google.com ([74.125.82.50]:37897 "EHLO mail-wm0-f50.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756641AbdERQiQ (ORCPT ); Thu, 18 May 2017 12:38:16 -0400 Received: by mail-wm0-f50.google.com with SMTP id v15so58897024wmv.1 for ; Thu, 18 May 2017 09:38:15 -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=LlMRbrnWiWKicHxvlk5a96sLbi/+F+VZNeGO0/XHEd4=; b=g710mRUNhet/dq6tzUB+ZaOYi7bOvYBLSgX7aTNyak4X3ZQPRhaSA+7k4yDVph8NGf y9RSnHI5uVf/a0SQiYEMeP4zIxCKi+nam8MDj6UEzT/34joi9A66s6mditSzU7nWo3h7 YSB8XnmjZrDF/PiDcU+IOirhj9BwrcdT+sza8+2Bq+YFcYVgUYlUnUoXr464J6mfoEmp lf/UOJr5Iv2KChti4F6ZzrRozv03Ez5A9QIz3h7U6Oj5p4psC685OwP9F6aFfGwBCYAi 0+DnXOV5Ec+xuXq3TwD7DbNg5uMOO64WbLX1jSLqPn9R4aWLlD6AYWvfCUrK06CxEy9E QBGw== 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=LlMRbrnWiWKicHxvlk5a96sLbi/+F+VZNeGO0/XHEd4=; b=H6+Yndad+IO7lt3UNpt3nBAu+fbchJLM+ytu9v+VFSCiODqhmuHb/uJILG0VCwSPr3 3pzAQeQH8GvHZGpiUiKQx0A8lmKUxMGbnyfMkc4n0gtOnRkWe2d/OedhZZg4achuQfuL pCvUmaH9out1umHqggq47wk7HQlgzvzTuTpO6iUPJCVZU6U6+dbWRLL2MazfkMCQ/lFG FQ1/7F6zjbhh4H6JnXJZ8RQpSGhW+UnhWdnsk8FAAJ3gCKgeodV4To+eptZ3VM9S52XZ bRBcqPOes5Eh287jy9LbWGSnOj4a+vX+XlP7fmQt4QpMqCiNSlxs+M6QfWeKdMU9PHiR EndQ== X-Gm-Message-State: AODbwcDsOf54UddhVvEFDURLahRsVXUEe3M45BifOCBwbzVuzAM6MLP0 5uQi6F9FRlXMQ6x/1Gc= X-Received: by 10.28.191.89 with SMTP id p86mr3408196wmf.27.1495125494753; Thu, 18 May 2017 09:38:14 -0700 (PDT) Received: from localhost.localdomain ([90.63.244.31]) by smtp.googlemail.com with ESMTPSA id 4sm7357655wrv.33.2017.05.18.09.38.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 May 2017 09:38:14 -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: [PATCH 08/10] clk: fix incorrect usage of ENOSYS Date: Thu, 18 May 2017 18:38:02 +0200 Message-Id: <20170518163804.14123-9-jbrunet@baylibre.com> X-Mailer: git-send-email 2.9.4 In-Reply-To: <20170518163804.14123-1-jbrunet@baylibre.com> References: <20170518163804.14123-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 e60d86d7c082..5980080a86c0 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -2004,7 +2004,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)