Received: by 2002:a25:ef43:0:0:0:0:0 with SMTP id w3csp57374ybm; Tue, 26 May 2020 10:38:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyfcoMviXE7AQ2qqG+i/sMhQo7TGin/fi4l22uvCqWNQdaUlFV97FCuZo5/MZD2cQ/6lqG X-Received: by 2002:a17:906:a843:: with SMTP id dx3mr2000327ejb.396.1590514696195; Tue, 26 May 2020 10:38:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1590514696; cv=none; d=google.com; s=arc-20160816; b=PzY6Y0wwyZNVqFlcAlA78sr0jRu0JQ7eagHmTuWWdZzKJhyaoTZzxtF6uG8p7qQr1U Cah7ixe7oGpx48zn9/np4NJQ0jBI/TE8P5HX09D27qegEdwtaX3BZVwUSd1hqnRVxNw2 KdSDcTGfi6LjpNLCXfLq/NvioJaMomxwFLwn9abZJS8ZdRgS2RHPFvTMMZTnA42kqirg VnDWr0BgBU8Yjx6Mmj3wORHVdfu9Qcsrk6FGJ6hYciFQjzXiwFSDVedQvV+NPKnzYYPj 2CkuUlxLTYcn0wom3U0RIFIX/nMd+7Xmsz9Z+R3jckNwHPz42/Usa8w6+5oeNm9N3RG3 4Wag== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:references :in-reply-to:message-id:date:subject:cc:to:from; bh=qhRmzFr84GgPOygAL2f1ksCqPWqgYGh8we2PoN3ePIg=; b=fpJH8xGJuMPku19T9ehBhyWJRah2i3/TcPEQzxUeb3JX89A2BR1k1X/vp1ZD6C/KhJ 8HkcUYtQLP898GPjJDqRSr7aGN+mq5XaBNwMH1ONieTWjpfwU/9aUx9uEw0sxyVYf6kV cI7eO7h4nVrbzYLfjm5kxg4Izwqep0YyuPZJnlmYr0Ku3V3934mD4/Yx1o3Pa82quoM6 9GcnrAegJyjrtLqCwjSF4M0hooOVvFOVOWeUYX790wdhV7mgazhUz5Zp45aHSEXrll6n rShLgBl47+jxv25sorr5EJGhDJxplet7n4OPLcrjr15XlV8Me0OsaiLKM+8UhTTGRgQR LqzA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o16si279855ejx.200.2020.05.26.10.37.52; Tue, 26 May 2020 10:38:16 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2389260AbgEZRfr (ORCPT + 99 others); Tue, 26 May 2020 13:35:47 -0400 Received: from alexa-out-sd-02.qualcomm.com ([199.106.114.39]:5422 "EHLO alexa-out-sd-02.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2388770AbgEZRfP (ORCPT ); Tue, 26 May 2020 13:35:15 -0400 Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by alexa-out-sd-02.qualcomm.com with ESMTP; 26 May 2020 10:35:14 -0700 Received: from gurus-linux.qualcomm.com ([10.46.162.81]) by ironmsg02-sd.qualcomm.com with ESMTP; 26 May 2020 10:35:13 -0700 Received: by gurus-linux.qualcomm.com (Postfix, from userid 383780) id 2F3234C9C; Tue, 26 May 2020 10:35:13 -0700 (PDT) From: Guru Das Srinagesh To: linux-pwm@vger.kernel.org, Thierry Reding , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= Cc: Subbaraman Narayanamurthy , David Collins , linux-kernel@vger.kernel.org, Joe Perches , Stephen Boyd , Lee Jones , Arnd Bergmann , Geert Uytterhoeven , Guenter Roeck , Daniel Thompson , Dan Carpenter , linux-arm-kernel@lists.infradead.org, Guru Das Srinagesh Subject: [PATCH v15 02/11] hwmon: pwm-fan: Use 64-bit division macro Date: Tue, 26 May 2020 10:35:02 -0700 Message-Id: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Since the PWM framework is switching struct pwm_args.period's datatype to u64, prepare for this transition by using DIV_ROUND_UP_ULL to handle a 64-bit dividend. Signed-off-by: Guru Das Srinagesh Acked-by: Guenter Roeck --- drivers/hwmon/pwm-fan.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/hwmon/pwm-fan.c b/drivers/hwmon/pwm-fan.c index 30b7b3e..17bb642 100644 --- a/drivers/hwmon/pwm-fan.c +++ b/drivers/hwmon/pwm-fan.c @@ -447,7 +447,7 @@ static int pwm_fan_resume(struct device *dev) return 0; pwm_get_args(ctx->pwm, &pargs); - duty = DIV_ROUND_UP(ctx->pwm_value * (pargs.period - 1), MAX_PWM); + duty = DIV_ROUND_UP_ULL(ctx->pwm_value * (pargs.period - 1), MAX_PWM); ret = pwm_config(ctx->pwm, duty, pargs.period); if (ret) return ret; -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum, a Linux Foundation Collaborative Project