From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 75C16C43331 for ; Mon, 30 Mar 2020 19:30:11 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 4237820714 for ; Mon, 30 Mar 2020 19:30:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728345AbgC3TaK (ORCPT ); Mon, 30 Mar 2020 15:30:10 -0400 Received: from alexa-out-sd-01.qualcomm.com ([199.106.114.38]:56673 "EHLO alexa-out-sd-01.qualcomm.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727437AbgC3TaJ (ORCPT ); Mon, 30 Mar 2020 15:30:09 -0400 Received: from unknown (HELO ironmsg05-sd.qualcomm.com) ([10.53.140.145]) by alexa-out-sd-01.qualcomm.com with ESMTP; 30 Mar 2020 12:30:09 -0700 Received: from gurus-linux.qualcomm.com ([10.46.162.81]) by ironmsg05-sd.qualcomm.com with ESMTP; 30 Mar 2020 12:30:08 -0700 Received: by gurus-linux.qualcomm.com (Postfix, from userid 383780) id A28B34BC4; Mon, 30 Mar 2020 12:30:08 -0700 (PDT) Date: Mon, 30 Mar 2020 12:30:08 -0700 From: Guru Das Srinagesh To: Joe Perches Cc: linux-pwm@vger.kernel.org, Thierry Reding , Uwe =?utf-8?Q?Kleine-K=C3=B6nig?= , Subbaraman Narayanamurthy , linux-kernel@vger.kernel.org, Fabrice Gasnier , Maxime Coquelin , Alexandre Torgue Subject: Re: [PATCH v11 08/12] pwm: stm32-lp: Use %llu format specifier for period Message-ID: <20200330193008.GA5107@codeaurora.org> References: <5ea1fa27dd036ce732c1c7a1a5d84362752a911f.1584667964.git.gurus@codeaurora.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 20, 2020 at 03:45:35AM -0700, Joe Perches wrote: > On Thu, 2020-03-19 at 18:41 -0700, Guru Das Srinagesh wrote: > > Since the PWM framework is switching struct pwm_args.period's > > datatype to u64, prepare for this transition by using the right > > specifier for printing a 64-bit value. > [] > > diff --git a/drivers/pwm/pwm-stm32-lp.c b/drivers/pwm/pwm-stm32-lp.c > [] > > @@ -61,7 +61,7 @@ static int stm32_pwm_lp_apply(struct pwm_chip *chip, struct pwm_device *pwm, > > do_div(div, NSEC_PER_SEC); > > if (!div) { > > /* Clock is too slow to achieve requested period. */ > > - dev_dbg(priv->chip.dev, "Can't reach %u ns\n", state->period); > > + dev_dbg(priv->chip.dev, "Can't reach %llu ns\n", state->period); > > return -EINVAL; > > } > > Doesn't this introduce a warning now without the > actual change to the type of state->period? You're right, it does. > Likely these patches should either not be separated > or this should also use a cast to avoid introducing > intermediate compilation warnings. Only this patch has this specific issue, so I'll squish it with the final patch in this series ("pwm: core: Convert period and duty cycle to u64") that modifies the framework structs. Thanks for pointing this out. Thank you. Guru Das.