From patchwork Thu May 22 05:37:26 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 30558 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ve0-f197.google.com (mail-ve0-f197.google.com [209.85.128.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 01D1920675 for ; Thu, 22 May 2014 05:38:13 +0000 (UTC) Received: by mail-ve0-f197.google.com with SMTP id db11sf10576085veb.4 for ; Wed, 21 May 2014 22:38:13 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:from:to:cc:subject :date:message-id:in-reply-to:references:in-reply-to:references :sender:precedence:list-id:x-original-sender :x-original-authentication-results:mailing-list:list-post:list-help :list-archive:list-unsubscribe; bh=DPtLmkVa7tXztM91pDab2Xj1lEOPCH0MrZAymldiZps=; b=iVbU5saH1ZPijMae8Tpi8RuIjCkZExgYXeq5Ci0QaB85jNNj813AKSfpDJZRX++W6b mQLndLVJWs18yYCFk4iv+7LZc5pxQJpLpfndhnPL6RY8KUHrm07yy5J7JQy0loejl09g 7iZ6Xl5U1iMEGVZRxstfDutvHvOPUKmQHHuJyKUYtrtGUgIeeDQznBA0Edd55M+IOAu7 5NdxuEHaLhKgAXqvYRpvYBQILot+kUpRArskUYM6jSlAdQHQ4cBRHjD7ptqDiFrdeXgs RmcTMH3EF2A/isl3aUO/DX7NZnVaDEq+eis8oCRF03qKWz3ynGDl5ap80F+jweMw8+zt eCMQ== X-Gm-Message-State: ALoCoQmkytaqJCNrmPSMK/9E2XXsM7osBQyE0FZv0anJ3mii0VpFo3/MWbB7qylAfmfJo84eak85 X-Received: by 10.58.219.37 with SMTP id pl5mr1428858vec.8.1400737093791; Wed, 21 May 2014 22:38:13 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.89.104 with SMTP id u95ls787792qgd.5.gmail; Wed, 21 May 2014 22:38:13 -0700 (PDT) X-Received: by 10.221.58.144 with SMTP id wk16mr13908142vcb.23.1400737093704; Wed, 21 May 2014 22:38:13 -0700 (PDT) Received: from mail-vc0-f175.google.com (mail-vc0-f175.google.com [209.85.220.175]) by mx.google.com with ESMTPS id va3si1992952veb.77.2014.05.21.22.38.13 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 21 May 2014 22:38:13 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) client-ip=209.85.220.175; Received: by mail-vc0-f175.google.com with SMTP id id10so437116vcb.34 for ; Wed, 21 May 2014 22:38:13 -0700 (PDT) X-Received: by 10.58.211.229 with SMTP id nf5mr46416038vec.19.1400737093610; Wed, 21 May 2014 22:38:13 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.221.72 with SMTP id ib8csp169742vcb; Wed, 21 May 2014 22:38:13 -0700 (PDT) X-Received: by 10.68.237.67 with SMTP id va3mr13771784pbc.19.1400737092885; Wed, 21 May 2014 22:38:12 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id eq15si31992767pac.222.2014.05.21.22.38.12; Wed, 21 May 2014 22:38:12 -0700 (PDT) Received-SPF: none (google.com: linux-kernel-owner@vger.kernel.org does not designate permitted sender hosts) client-ip=209.132.180.67; Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753451AbaEVFiB (ORCPT + 27 others); Thu, 22 May 2014 01:38:01 -0400 Received: from mail-qg0-f53.google.com ([209.85.192.53]:64897 "EHLO mail-qg0-f53.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752810AbaEVFh6 (ORCPT ); Thu, 22 May 2014 01:37:58 -0400 Received: by mail-qg0-f53.google.com with SMTP id f51so4856071qge.40 for ; Wed, 21 May 2014 22:37:57 -0700 (PDT) X-Received: by 10.140.23.7 with SMTP id 7mr73814249qgo.0.1400737077762; Wed, 21 May 2014 22:37:57 -0700 (PDT) Received: from localhost (ec2-23-23-178-99.compute-1.amazonaws.com. [23.23.178.99]) by mx.google.com with ESMTPSA id o2sm5347672qag.47.2014.05.21.22.37.52 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Wed, 21 May 2014 22:37:57 -0700 (PDT) From: Viresh Kumar To: rjw@rjwysocki.net Cc: linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, arvind.chauhan@arm.com, inderpal.s@samsung.com, nm@ti.com, chander.kashyap@linaro.org, pavel@ucw.cz, len.brown@intel.com, sudeep.holla@arm.com, Viresh Kumar Subject: [PATCH V3 2/8] opp: of_init_opp_table(): return -ENOSYS when feature isn't implemented Date: Thu, 22 May 2014 11:07:26 +0530 Message-Id: <7ad59da5b28e8ed632e833fa5095129628bd8deb.1400736536.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.0.0.rc2 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: viresh.kumar@linaro.org X-Original-Authentication-Results: mx.google.com; spf=pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.220.175 as permitted sender) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , When none of CONFIG_PM_OPP or CONFIG_OF is enabled we use the dummy implementation of of_init_opp_table() routine, which returns -EINVAL currently. -EINVAL can confuse the callers a bit as it can have other meanings for the actual implementation of this routine. It is more appropriate to return -ENOSYS instead to avoid confusion at caller. Suggested-and-reviewed-by: Sudeep Holla Signed-off-by: Viresh Kumar --- include/linux/pm_opp.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/linux/pm_opp.h b/include/linux/pm_opp.h index 0330217..6668150 100644 --- a/include/linux/pm_opp.h +++ b/include/linux/pm_opp.h @@ -112,7 +112,7 @@ int of_init_opp_table(struct device *dev); #else static inline int of_init_opp_table(struct device *dev) { - return -EINVAL; + return -ENOSYS; } #endif