From patchwork Sat Nov 17 03:19:30 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Brown X-Patchwork-Id: 151395 Delivered-To: patch@linaro.org Received: by 2002:a2e:299d:0:0:0:0:0 with SMTP id p29-v6csp110408ljp; Fri, 16 Nov 2018 19:23:02 -0800 (PST) X-Google-Smtp-Source: AJdET5es/C/Tf6Cbd4xr0IKdR5ehgJUS2Ui3GKRsYym1F8UZMclKsFEFmhTGc1U84a7kNj4ynwQ3 X-Received: by 2002:a62:3a04:: with SMTP id h4mr13726255pfa.119.1542424982059; Fri, 16 Nov 2018 19:23:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542424982; cv=none; d=google.com; s=arc-20160816; b=0BBEs/mro1fXmDLdGjYVUaAi7x8nEIHCg7jrZWoO8B+NFaeuLTZuO/1G987FMWbR2T sz1XKm5/natJ+yeDUvyJ3pCaIUXqq019EcLc7c5mzRTHzp9HQhBFMs1cX0i9ZGLUeZUw xeXEe5rstiSBr89my6E9XW0Nl/5qAoOPyign5JUEczQvq1VL4/Sb/xXzZ9wOv8E3S3Sy TWgoMa9XLWTi5OjCwSYxiRluymLJnyljN896SsMwWayNtoZN9oLuYhURO6vL/nPHoQd0 bk8eYsMlU+W7RVS6XuzhVgBiUO0AwW1ynRkghrecVr3KfmtBKHGIujAnjvxtgIn2QWRT mqHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=aTTDnzEKE6nV1laYZS5GhuPFT85qHsIoi1RhDgVk1Zc=; b=v41jRFERkM2f+Z5tKsaY8tLK34RmowxiXYP9twqF5F+wRkpESX3WvN6QP0EShyVNpp TGkT3b+Nrt++YSxoKgqi8PzZ9+4xwBgWAkPtL5SkqmtM0jALCbyvMJy5Kk/4sAXU8/8P a4YYn3L5/24D4mGdMTXP+/cGrYYKby3LzPv5qSCwTHoVyAGV4XJ1bx6yn8DeH9smEBME vrbT7z0szfmgMsV8QW5rDXYAxr8kj8phEunSRCEA/GeBBOyHDFM+Spm55KhAZxjIlk+Y m3rIISUnQtws9cyW/9Ya42SxstZ+xquqLQNUuRT/0xzQEnZv9tZInVFvAgmiGpVPX0Jf cd0Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=hCYfz+nd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id q201-v6si39430295pfq.14.2018.11.16.19.23.01; Fri, 16 Nov 2018 19:23:02 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=fail header.i=@sirena.org.uk header.s=20170815-heliosphere header.b=hCYfz+nd; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730300AbeKQNer (ORCPT + 32 others); Sat, 17 Nov 2018 08:34:47 -0500 Received: from heliosphere.sirena.org.uk ([172.104.155.198]:42830 "EHLO heliosphere.sirena.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729714AbeKQNer (ORCPT ); Sat, 17 Nov 2018 08:34:47 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sirena.org.uk; s=20170815-heliosphere; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=aTTDnzEKE6nV1laYZS5GhuPFT85qHsIoi1RhDgVk1Zc=; b=hCYfz+ndUPuIoeouTgaBU4G2R BA6oCGBIIaSsrs31G4AMr7X0B2xsWyTqhCr56b+uo6fzg6J0sFZY2D4Pg85hbuKsSLo/rXjOZCQA9 UY9d0tPR0sK5x0rJ4Pr29A3ogAtUcDO43onW9ah3eCoiT/TK6n4JnJ81fNyh1uxjp41fE=; Received: from [204.239.253.216] (helo=finisterre.ee.mobilebroadband) by heliosphere.sirena.org.uk with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1gNr91-0008La-8I; Sat, 17 Nov 2018 03:19:39 +0000 Received: by finisterre.ee.mobilebroadband (Postfix, from userid 1000) id A4AB9440078; Sat, 17 Nov 2018 03:19:32 +0000 (GMT) From: Mark Brown To: Cheng-Yi Chiang Cc: Liam Girdwood , linux-kernel@vger.kernel.org, Mark Brown Subject: [PATCH] regulator: Fix return value of _set_load() stub Date: Fri, 16 Nov 2018 19:19:30 -0800 Message-Id: <20181117031930.24011-1-broonie@kernel.org> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The stub implementation of _set_load() returns a mode value which is within the bounds of valid return codes for success (the documentation just says that failures are negative error codes) but not sensible or what the actual implementation does. Fix it to just return 0. Reported-by: Cheng-Yi Chiang Signed-off-by: Mark Brown --- include/linux/regulator/consumer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) -- 2.19.1 Reviewed-by: Douglas Anderson diff --git a/include/linux/regulator/consumer.h b/include/linux/regulator/consumer.h index 25602afd4844..f3f76051e8b0 100644 --- a/include/linux/regulator/consumer.h +++ b/include/linux/regulator/consumer.h @@ -508,7 +508,7 @@ static inline int regulator_get_error_flags(struct regulator *regulator, static inline int regulator_set_load(struct regulator *regulator, int load_uA) { - return REGULATOR_MODE_NORMAL; + return 0; } static inline int regulator_allow_bypass(struct regulator *regulator,