linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH -next] media: dvb-frontends: use DIV_ROUND_UP to calculate timeout
@ 2020-12-22 13:32 Zheng Yongjun
  2020-12-29  5:10 ` kernel test robot
  2020-12-29  5:10 ` [PATCH] media: dvb-frontends: fix semicolon.cocci warnings kernel test robot
  0 siblings, 2 replies; 3+ messages in thread
From: Zheng Yongjun @ 2020-12-22 13:32 UTC (permalink / raw)
  To: mchehab, linux-media, linux-kernel; +Cc: Zheng Yongjun

Don't open-code DIV_ROUND_UP() kernel macro.

Signed-off-by: Zheng Yongjun <zhengyongjun3@huawei.com>
---
 drivers/media/dvb-frontends/cxd2841er.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/media/dvb-frontends/cxd2841er.c b/drivers/media/dvb-frontends/cxd2841er.c
index 758c95bc3b11..ed21d51e16e4 100644
--- a/drivers/media/dvb-frontends/cxd2841er.c
+++ b/drivers/media/dvb-frontends/cxd2841er.c
@@ -3338,7 +3338,7 @@ static int cxd2841er_set_frontend_s(struct dvb_frontend *fe)
 		cxd2841er_tuner_set(fe);
 
 	cxd2841er_tune_done(priv);
-	timeout = ((3000000 + (symbol_rate - 1)) / symbol_rate) + 150;
+	timeout = DIV_ROUND_UP(3000000, symbol_rate) + 150;;
 
 	i = 0;
 	do {
-- 
2.22.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH -next] media: dvb-frontends: use DIV_ROUND_UP to calculate timeout
  2020-12-22 13:32 [PATCH -next] media: dvb-frontends: use DIV_ROUND_UP to calculate timeout Zheng Yongjun
@ 2020-12-29  5:10 ` kernel test robot
  2020-12-29  5:10 ` [PATCH] media: dvb-frontends: fix semicolon.cocci warnings kernel test robot
  1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-12-29  5:10 UTC (permalink / raw)
  To: Zheng Yongjun, mchehab, linux-media, linux-kernel
  Cc: kbuild-all, Zheng Yongjun

[-- Attachment #1: Type: text/plain, Size: 800 bytes --]

Hi Zheng,

Thank you for the patch! Perhaps something to improve:

[auto build test WARNING on next-20201222]

url:    https://github.com/0day-ci/linux/commits/Zheng-Yongjun/media-dvb-frontends-use-DIV_ROUND_UP-to-calculate-timeout/20201222-213524
base:    6c3eb1b174c07bcaa927003e8bc91e81ab1d5a9e
config: i386-randconfig-c001-20201221 (attached as .config)
compiler: gcc-9 (Debian 9.3.0-15) 9.3.0

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>


"coccinelle warnings: (new ones prefixed by >>)"
>> drivers/media/dvb-frontends/cxd2841er.c:3341:52-53: Unneeded semicolon

Please review and possibly fold the followup patch.

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org

[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 34785 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH] media: dvb-frontends: fix semicolon.cocci warnings
  2020-12-22 13:32 [PATCH -next] media: dvb-frontends: use DIV_ROUND_UP to calculate timeout Zheng Yongjun
  2020-12-29  5:10 ` kernel test robot
@ 2020-12-29  5:10 ` kernel test robot
  1 sibling, 0 replies; 3+ messages in thread
From: kernel test robot @ 2020-12-29  5:10 UTC (permalink / raw)
  To: Zheng Yongjun, mchehab, linux-media, linux-kernel
  Cc: kbuild-all, Zheng Yongjun

From: kernel test robot <lkp@intel.com>

drivers/media/dvb-frontends/cxd2841er.c:3341:52-53: Unneeded semicolon


 Remove unneeded semicolon.

Generated by: scripts/coccinelle/misc/semicolon.cocci

CC: Zheng Yongjun <zhengyongjun3@huawei.com>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: kernel test robot <lkp@intel.com>
---

url:    https://github.com/0day-ci/linux/commits/Zheng-Yongjun/media-dvb-frontends-use-DIV_ROUND_UP-to-calculate-timeout/20201222-213524
base:    6c3eb1b174c07bcaa927003e8bc91e81ab1d5a9e

 cxd2841er.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/drivers/media/dvb-frontends/cxd2841er.c
+++ b/drivers/media/dvb-frontends/cxd2841er.c
@@ -3338,7 +3338,7 @@ static int cxd2841er_set_frontend_s(stru
 		cxd2841er_tuner_set(fe);
 
 	cxd2841er_tune_done(priv);
-	timeout = DIV_ROUND_UP(3000000, symbol_rate) + 150;;
+	timeout = DIV_ROUND_UP(3000000, symbol_rate) + 150;
 
 	i = 0;
 	do {

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-12-29  5:11 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-12-22 13:32 [PATCH -next] media: dvb-frontends: use DIV_ROUND_UP to calculate timeout Zheng Yongjun
2020-12-29  5:10 ` kernel test robot
2020-12-29  5:10 ` [PATCH] media: dvb-frontends: fix semicolon.cocci warnings kernel test robot

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).