Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757452AbcK2LaT (ORCPT ); Tue, 29 Nov 2016 06:30:19 -0500 Received: from mx0b-001ae601.pphosted.com ([67.231.152.168]:53908 "EHLO mx0b-001ae601.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1757455AbcK2L3z (ORCPT ); Tue, 29 Nov 2016 06:29:55 -0500 Authentication-Results: ppops.net; spf=none smtp.mailfrom=ckeepax@opensource.wolfsonmicro.com From: Charles Keepax To: CC: , , Subject: [PATCH 1/2] regulator: core: Correct type of mode in regulator_mode_constrain Date: Tue, 29 Nov 2016 11:30:44 +0000 Message-ID: <1480419045-2275-1-git-send-email-ckeepax@opensource.wolfsonmicro.com> X-Mailer: git-send-email 2.1.4 MIME-Version: 1.0 Content-Type: text/plain X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611290197 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 999 Lines: 27 Every function handling the mode within the regulator core uses an unsigned int for mode, except for regulator_mode_constrain. This patch changes the type of mode within regulator_mode_constrain which fixes several instances where we are passing pointers to unsigned ints then treating them as an int within this function. Signed-off-by: Charles Keepax --- drivers/regulator/core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index cd864a7..b3417ac 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -293,7 +293,8 @@ static int regulator_check_current_limit(struct regulator_dev *rdev, } /* operating mode constraint check */ -static int regulator_mode_constrain(struct regulator_dev *rdev, int *mode) +static int regulator_mode_constrain(struct regulator_dev *rdev, + unsigned int *mode) { switch (*mode) { case REGULATOR_MODE_FAST: -- 2.1.4