From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933007AbbGJPOf (ORCPT ); Fri, 10 Jul 2015 11:14:35 -0400 Received: from eu-smtp-delivery-143.mimecast.com ([146.101.78.143]:26995 "EHLO eu-smtp-delivery-143.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932524AbbGJPO2 convert rfc822-to-8bit (ORCPT ); Fri, 10 Jul 2015 11:14:28 -0400 Message-ID: <559FE151.2030305@arm.com> Date: Fri, 10 Jul 2015 16:14:25 +0100 From: "Suzuki K. Poulose" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Mark Brown CC: "sfr@canb.auug.org.au" , "linux-next@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "paul@pwsan.com" , "treding@nvidia.com" , Liam Girdwood Subject: Re: [PATCH] regulators: Add missing dummy definition for regulator_list_voltage References: <558D2FB3.1060209@arm.com> <1435316810-8634-1-git-send-email-suzuki.poulose@arm.com> <20150707123838.GF2887@sirena.org.uk> In-Reply-To: <20150707123838.GF2887@sirena.org.uk> X-OriginalArrivalTime: 10 Jul 2015 15:14:25.0230 (UTC) FILETIME=[1B6FB6E0:01D0BB23] X-MC-Unique: Q5g3EGdfR5G9zW9QNCSdEA-1 Content-Type: text/plain; charset=WINDOWS-1252; format=flowed Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 07/07/15 13:38, Mark Brown wrote: > On Fri, Jun 26, 2015 at 12:06:50PM +0100, Suzuki K. Poulose wrote: > >> +static inline int regulator_list_voltage(struct regulator *regulator, unsigned selector) >> +{ >> + return 0; >> +} > > I'd expect this stub to return -EINVAL since the voltage count should be > zero for !REGULATOR (since we obviously can't count the number of > voltages). > You are right, -EINVAL suites better. There are some users of the API who consider 0 as invalid, but -EINVAL sounds better and covers all the existing uses. Will resend the patch. Thanks Suzuki