From: kernel test robot <lkp@intel.com>
To: Aleksandr Shubin <privatesub2@gmail.com>, linux-kernel@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
"Aleksandr Shubin" <privatesub2@gmail.com>,
"Brandon Cheo Fusi" <fusibrandon13@gmail.com>,
"Uwe Kleine-König" <u.kleine-koenig@pengutronix.de>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzk@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Chen-Yu Tsai" <wens@csie.org>,
"Jernej Skrabec" <jernej.skrabec@gmail.com>,
"Samuel Holland" <samuel@sholland.org>,
"Paul Walmsley" <paul.walmsley@sifive.com>,
"Palmer Dabbelt" <palmer@dabbelt.com>,
"Albert Ou" <aou@eecs.berkeley.edu>,
"Philipp Zabel" <p.zabel@pengutronix.de>,
"Cristian Ciocaltea" <cristian.ciocaltea@collabora.com>,
"John Watts" <contact@jookia.org>,
"Marc Kleine-Budde" <mkl@pengutronix.de>,
"Maksim Kiselev" <bigunclemax@gmail.com>,
linux-pwm@vger.kernel.org, devicetree@vger.kernel.org,
linux-arm-kernel@lists.infradead.org,
linux-sunxi@lists.linux.dev, linux-riscv@lists.infradead.org
Subject: Re: [PATCH v8 2/3] pwm: Add Allwinner's D1/T113-S3/R329 SoCs PWM support
Date: Sat, 3 Feb 2024 23:04:47 +0800 [thread overview]
Message-ID: <202402032222.BiIrD3g4-lkp@intel.com> (raw)
In-Reply-To: <20240131125920.2879433-3-privatesub2@gmail.com>
Hi Aleksandr,
kernel test robot noticed the following build warnings:
[auto build test WARNING on robh/for-next]
[also build test WARNING on sunxi/sunxi/for-next linus/master v6.8-rc2 next-20240202]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch#_base_tree_information]
url: https://github.com/intel-lab-lkp/linux/commits/Aleksandr-Shubin/dt-bindings-pwm-Add-binding-for-Allwinner-D1-T113-S3-R329-PWM-controller/20240131-210313
base: https://git.kernel.org/pub/scm/linux/kernel/git/robh/linux.git for-next
patch link: https://lore.kernel.org/r/20240131125920.2879433-3-privatesub2%40gmail.com
patch subject: [PATCH v8 2/3] pwm: Add Allwinner's D1/T113-S3/R329 SoCs PWM support
config: x86_64-allyesconfig (https://download.01.org/0day-ci/archive/20240203/202402032222.BiIrD3g4-lkp@intel.com/config)
compiler: clang version 17.0.6 (https://github.com/llvm/llvm-project 6009708b4367171ccdbf4b5905cb6a803753fe18)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240203/202402032222.BiIrD3g4-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202402032222.BiIrD3g4-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/pwm/pwm-sun20i.c:47: warning: This comment starts with '/**', but isn't a kernel-doc comment. Refer Documentation/doc-guide/kernel-doc.rst
* SUN20I_PWM_MAGIC is used to quickly compute the values of the clock dividers
vim +47 drivers/pwm/pwm-sun20i.c
45
46 /**
> 47 * SUN20I_PWM_MAGIC is used to quickly compute the values of the clock dividers
48 * div_m (SUN20I_PWM_CLK_CFG_DIV_M) & prescale_k (SUN20I_PWM_CTL_PRESCAL_K)
49 * without using a loop. These dividers limit the # of cycles in a period
50 * to SUN20I_PWM_PCNTR_SIZE by applying a scaling factor of
51 * 1/(div_m * (prescale_k + 1)) to the clock source.
52 *
53 * SUN20I_PWM_MAGIC is derived by solving for div_m and prescale_k
54 * such that for a given requested period,
55 *
56 * i) div_m is minimized for any prescale_k ≤ SUN20I_PWM_CTL_PRESCAL_K_MAX,
57 * ii) prescale_k is minimized.
58 *
59 * The derivation proceeds as follows, with val = # of cycles for reqested
60 * period:
61 *
62 * for a given value of div_m we want the smallest prescale_k such that
63 *
64 * (val >> div_m) // (prescale_k + 1) ≤ 65536 (SUN20I_PWM_PCNTR_SIZE)
65 *
66 * This is equivalent to:
67 *
68 * (val >> div_m) ≤ 65536 * (prescale_k + 1) + prescale_k
69 * ⟺ (val >> div_m) ≤ 65537 * prescale_k + 65536
70 * ⟺ (val >> div_m) - 65536 ≤ 65537 * prescale_k
71 * ⟺ ((val >> div_m) - 65536) / 65537 ≤ prescale_k
72 *
73 * As prescale_k is integer, this becomes
74 *
75 * ((val >> div_m) - 65536) // 65537 ≤ prescale_k
76 *
77 * And is minimized at
78 *
79 * ((val >> div_m) - 65536) // 65537
80 *
81 * Now we pick the smallest div_m that satifies prescale_k ≤ 255
82 * (i.e SUN20I_PWM_CTL_PRESCAL_K_MAX),
83 *
84 * ((val >> div_m) - 65536) // 65537 ≤ 255
85 * ⟺ (val >> div_m) - 65536 ≤ 255 * 65537 + 65536
86 * ⟺ val >> div_m ≤ 255 * 65537 + 2 * 65536
87 * ⟺ val >> div_m < (255 * 65537 + 2 * 65536 + 1)
88 * ⟺ div_m = fls((val) / (255 * 65537 + 2 * 65536 + 1))
89 *
90 * Suggested by Uwe Kleine-König
91 */
92 #define SUN20I_PWM_MAGIC (255 * 65537 + 2 * 65536 + 1)
93
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next prev parent reply other threads:[~2024-02-03 15:06 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 12:59 [PATCH v8 0/3] Add support for Allwinner PWM on D1/T113s/R329 SoCs Aleksandr Shubin
2024-01-31 12:59 ` [PATCH v8 1/3] dt-bindings: pwm: Add binding for Allwinner D1/T113-S3/R329 PWM controller Aleksandr Shubin
2024-01-31 14:52 ` Andre Przywara
2024-01-31 21:22 ` Conor Dooley
2024-02-01 17:48 ` Andre Przywara
2024-02-01 18:59 ` Conor Dooley
2024-01-31 16:34 ` Maxim Kiselev
2024-05-09 20:32 ` Chris Morgan
2024-01-31 12:59 ` [PATCH v8 2/3] pwm: Add Allwinner's D1/T113-S3/R329 SoCs PWM support Aleksandr Shubin
2024-01-31 13:41 ` Philipp Zabel
2024-02-01 8:49 ` Uwe Kleine-König
2024-02-02 17:32 ` Brandon Cheo Fusi
2024-02-03 15:04 ` kernel test robot [this message]
2024-05-01 5:42 ` John Watts
2024-01-31 12:59 ` [PATCH v8 3/3] riscv: dts: allwinner: d1: Add pwm node Aleksandr Shubin
2024-01-31 14:50 ` Andre Przywara
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=202402032222.BiIrD3g4-lkp@intel.com \
--to=lkp@intel.com \
--cc=aou@eecs.berkeley.edu \
--cc=bigunclemax@gmail.com \
--cc=conor+dt@kernel.org \
--cc=contact@jookia.org \
--cc=cristian.ciocaltea@collabora.com \
--cc=devicetree@vger.kernel.org \
--cc=fusibrandon13@gmail.com \
--cc=jernej.skrabec@gmail.com \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-sunxi@lists.linux.dev \
--cc=llvm@lists.linux.dev \
--cc=mkl@pengutronix.de \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=p.zabel@pengutronix.de \
--cc=palmer@dabbelt.com \
--cc=paul.walmsley@sifive.com \
--cc=privatesub2@gmail.com \
--cc=robh+dt@kernel.org \
--cc=samuel@sholland.org \
--cc=u.kleine-koenig@pengutronix.de \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).