From patchwork Tue May 27 11:50:50 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 30960 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f69.google.com (mail-pb0-f69.google.com [209.85.160.69]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 49292203C3 for ; Tue, 27 May 2014 11:52:35 +0000 (UTC) Received: by mail-pb0-f69.google.com with SMTP id uo5sf43365236pbc.8 for ; Tue, 27 May 2014 04:52:34 -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=+mareOVPJ4hVmy8Q84TwC5NW/F+KsXf147bceIAixlo=; b=L8mM9+liOjqbGd4tSOFj2Yt7piKzZcVmeO5idxRMxTJL4ZWORZZhPa6v4ib7ePxQU3 Sj2XbJQq5qn7lWzLeqN8AlDYqJ1/cHtVHiCWf+dYxCcVWy9DuFf/5eMRsFHvbcYC3HUG UKLbxN3yVxg5xjGHtVtPIxTxPJAFpann3TALVRCunVeCdZmgHufGQ9ta5uml6fcy+Afa Zs9IPw6i5Ys1yXVtntfvhMkbYHmzoYRFEHmF4YZGm4l6wh1QDvjAU7zn7fXCMuXaGU0f bdP9MztLEwQu/ARLJiRgBDj2rw04CYtvRDAbPJX2WNfCIpPYTkqLdKNfKYqVR9Ec3UGQ 7vMw== X-Gm-Message-State: ALoCoQmmFTyMUIilUadBoB1Z5qBuzWN51OAKzagl///unENOecTB/4QYkTL0p4xFbFhYq5aXG+rP X-Received: by 10.66.222.129 with SMTP id qm1mr12706309pac.6.1401191554629; Tue, 27 May 2014 04:52:34 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.101.4 with SMTP id t4ls2964441qge.1.gmail; Tue, 27 May 2014 04:52:34 -0700 (PDT) X-Received: by 10.58.76.163 with SMTP id l3mr6003vew.74.1401191554455; Tue, 27 May 2014 04:52:34 -0700 (PDT) Received: from mail-ve0-f174.google.com (mail-ve0-f174.google.com [209.85.128.174]) by mx.google.com with ESMTPS id fr1si7919141vdc.68.2014.05.27.04.52.34 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 27 May 2014 04:52:34 -0700 (PDT) Received-SPF: pass (google.com: domain of patch+caf_=patchwork-forward=linaro.org@linaro.org designates 209.85.128.174 as permitted sender) client-ip=209.85.128.174; Received: by mail-ve0-f174.google.com with SMTP id jw12so10565084veb.33 for ; Tue, 27 May 2014 04:52:34 -0700 (PDT) X-Received: by 10.220.195.196 with SMTP id ed4mr384736vcb.42.1401191554370; Tue, 27 May 2014 04:52:34 -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 ib8csp112553vcb; Tue, 27 May 2014 04:52:33 -0700 (PDT) X-Received: by 10.68.135.42 with SMTP id pp10mr35985185pbb.58.1401191553618; Tue, 27 May 2014 04:52:33 -0700 (PDT) Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id ed1si18436312pbb.2.2014.05.27.04.52.33; Tue, 27 May 2014 04:52:33 -0700 (PDT) Received-SPF: none (google.com: linux-pm-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 S1751742AbaE0Lw3 (ORCPT + 12 others); Tue, 27 May 2014 07:52:29 -0400 Received: from mail-pb0-f47.google.com ([209.85.160.47]:63517 "EHLO mail-pb0-f47.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751779AbaE0Lw1 (ORCPT ); Tue, 27 May 2014 07:52:27 -0400 Received: by mail-pb0-f47.google.com with SMTP id rp16so9145217pbb.34 for ; Tue, 27 May 2014 04:52:26 -0700 (PDT) X-Received: by 10.66.189.226 with SMTP id gl2mr35691667pac.65.1401191546658; Tue, 27 May 2014 04:52:26 -0700 (PDT) Received: from localhost ([223.227.245.64]) by mx.google.com with ESMTPSA id av4sm72531349pac.8.2014.05.27.04.52.21 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Tue, 27 May 2014 04:52:25 -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 V4 1/8] opp: of_init_opp_table(): return -ENOSYS when feature isn't implemented Date: Tue, 27 May 2014 17:20:50 +0530 Message-Id: <231be85cd01bcdc00a0a7936cd9ba57ccba52749.1401191054.git.viresh.kumar@linaro.org> X-Mailer: git-send-email 2.0.0.rc2 In-Reply-To: References: In-Reply-To: References: Sender: linux-pm-owner@vger.kernel.org Precedence: list List-ID: X-Mailing-List: linux-pm@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.128.174 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 Acked-by: Nishanth Menon --- 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