From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gofer.mess.org (gofer.mess.org [88.97.38.141]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 787072C81 for ; Wed, 27 Oct 2021 12:49:02 +0000 (UTC) Received: by gofer.mess.org (Postfix, from userid 1000) id 00696C63A3; Wed, 27 Oct 2021 13:48:59 +0100 (BST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=mess.org; s=2020; t=1635338940; bh=e5phXM1J44gIrmBY104P/Z08rUN8SJnDxfNLQ7YhK9I=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=fXwpmhdz1XnLnKj4zPrYJ6JGcQZJmmNFwe1OFjLEXDsEx2s/3vGxAHZq/7RD51477 b6OfiEW3+eZH4+Y8TPyWzeFkwAah6q+oQEPwTYsfUUiwSpZv/1WNyv2RVsGrtFIc/Q PJASj0OOsIwi3mvZo2NNc+wcjrle60lGtMO8HvUOoKThrWLx9AQjQ2qv4U383oY28H b+OKnCFBAHHi3Tg+PF9KHUqXsuIATctW8QJiuHskKMQ6Mz43zTvMwckj/ZZZWOm1JU kytwA8tGjTZ85qy3/h5Ck2ppu8HN6LdSR2EaKGm371M3ytRmp/kjsuA5873mqPHE37 hgYCFqUv88PYA== Date: Wed, 27 Oct 2021 13:48:59 +0100 From: Sean Young To: =?iso-8859-1?Q?Ma=EDra?= Canal Cc: Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , kernel test robot , mchehab@kernel.org, thierry.reding@gmail.com, Lee Jones , llvm@lists.linux.dev, kbuild-all@lists.01.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, linux-pwm@vger.kernel.org Subject: Re: [PATCH v3] media: rc: pwm-ir-tx: Switch to atomic PWM API Message-ID: <20211027124859.GA6320@gofer.mess.org> References: <202110271450.Z8JPybLg-lkp@intel.com> <20211027061552.bb4fczniqp6b7amh@pengutronix.de> <20211027073204.GA3978@gofer.mess.org> Precedence: bulk X-Mailing-List: llvm@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) Hi Maíra, On Wed, Oct 27, 2021 at 09:43:47AM -0300, Maíra Canal wrote: > [resend it in Plain Text] > Thank you for the feedback! I appreciate that! I'm new at the kernel > and I got a little confused about how to send the new patch. Should I > send a v4 of this patch or just send a new patch fixing this issue? > I'm sorry about the question and thank you for your attention. Please send out a v4 with the problem fixed. Also top-posting is deprecated on linux mailing lists. Thanks, Sean > > Em qua., 27 de out. de 2021 às 04:32, Sean Young escreveu: > >> > >> On Wed, Oct 27, 2021 at 08:15:52AM +0200, Uwe Kleine-König wrote: > >> > On Wed, Oct 27, 2021 at 02:07:19PM +0800, kernel test robot wrote: > >> > > If you fix the issue, kindly add following tag as appropriate > >> > > Reported-by: kernel test robot > >> > > > >> > > All errors (new ones prefixed by >>, old ones prefixed by <<): > >> > > > >> > > >> ERROR: modpost: "__udivdi3" [drivers/media/rc/pwm-ir-tx.ko] undefined! > >> > > >> > This comes from the line: > >> > > >> > state.duty_cycle = DIV_ROUND_CLOSEST(pwm_ir->duty_cycle * state.period, 100); > >> > > >> > where DIV_ROUND_CLOSEST expands to a normal division but state.period is > >> > a u64. So this should use DIV64_U64_ROUND_CLOSEST I guess. > >> > >> DIV64_U64_ROUND_CLOSEST is for dividing a u64 with a u64. We're dividing > >> by 100 here so this is not necessary. > >> > >> It should use DIV_ROUND_CLOSEST_ULL, however it might be nicer to use: > >> > >> pwm_set_relative_duty_cycle(&state, pwm_ir->duty_cycle, 100); > >> > >> Thanks > >> > >> Sean From mboxrd@z Thu Jan 1 00:00:00 1970 Content-Type: multipart/mixed; boundary="===============0507771196467023242==" MIME-Version: 1.0 From: Sean Young To: kbuild-all@lists.01.org Subject: Re: [PATCH v3] media: rc: pwm-ir-tx: Switch to atomic PWM API Date: Wed, 27 Oct 2021 13:48:59 +0100 Message-ID: <20211027124859.GA6320@gofer.mess.org> In-Reply-To: List-Id: --===============0507771196467023242== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Hi Ma=C3=ADra, On Wed, Oct 27, 2021 at 09:43:47AM -0300, Ma=C3=ADra Canal wrote: > [resend it in Plain Text] > Thank you for the feedback! I appreciate that! I'm new at the kernel > and I got a little confused about how to send the new patch. Should I > send a v4 of this patch or just send a new patch fixing this issue? > I'm sorry about the question and thank you for your attention. Please send out a v4 with the problem fixed. Also top-posting is deprecated on linux mailing lists. Thanks, Sean > > Em qua., 27 de out. de 2021 =C3=A0s 04:32, Sean Young = escreveu: > >> > >> On Wed, Oct 27, 2021 at 08:15:52AM +0200, Uwe Kleine-K=C3=B6nig wrote: > >> > On Wed, Oct 27, 2021 at 02:07:19PM +0800, kernel test robot wrote: > >> > > If you fix the issue, kindly add following tag as appropriate > >> > > Reported-by: kernel test robot > >> > > > >> > > All errors (new ones prefixed by >>, old ones prefixed by <<): > >> > > > >> > > >> ERROR: modpost: "__udivdi3" [drivers/media/rc/pwm-ir-tx.ko] und= efined! > >> > > >> > This comes from the line: > >> > > >> > state.duty_cycle =3D DIV_ROUND_CLOSEST(pwm_ir->duty_cycle * st= ate.period, 100); > >> > > >> > where DIV_ROUND_CLOSEST expands to a normal division but state.perio= d is > >> > a u64. So this should use DIV64_U64_ROUND_CLOSEST I guess. > >> > >> DIV64_U64_ROUND_CLOSEST is for dividing a u64 with a u64. We're dividi= ng > >> by 100 here so this is not necessary. > >> > >> It should use DIV_ROUND_CLOSEST_ULL, however it might be nicer to use: > >> > >> pwm_set_relative_duty_cycle(&state, pwm_ir->duty_cycle, 100); > >> > >> Thanks > >> > >> Sean --===============0507771196467023242==--