From: kernel test robot <lkp@intel.com>
To: Min Li <min.li.xe@renesas.com>
Cc: kbuild-all@lists.01.org, linux-kernel@vger.kernel.org
Subject: drivers/ptp/ptp_idt82p33.c:469:9: warning: Identical condition 'err', second condition is always false
Date: Sat, 8 Aug 2020 04:21:58 +0800 [thread overview]
Message-ID: <202008080456.41pcA6ua%lkp@intel.com> (raw)
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 5631c5e0eb9035d92ceb20fcd9cdb7779a3f5cc7
commit: 57a10d8c1123068e3cb06434fbc9634f945d3062 ptp: Add a ptp clock driver for IDT 82P33 SMU.
date: 6 months ago
compiler: powerpc64-linux-gcc (GCC) 9.3.0
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
cppcheck warnings: (new ones prefixed by >>)
>> drivers/ptp/ptp_idt82p33.c:469:9: warning: Identical condition 'err', second condition is always false [identicalConditionAfterEarlyExit]
return err;
^
drivers/ptp/ptp_idt82p33.c:462:6: note: first condition
if (err)
^
drivers/ptp/ptp_idt82p33.c:469:9: note: second condition
return err;
^
vim +/err +469 drivers/ptp/ptp_idt82p33.c
440
441 static int idt82p33_measure_tod_write_overhead(struct idt82p33_channel *channel)
442 {
443 s64 trailing_overhead_ns, one_byte_write_ns, gap_ns;
444 struct idt82p33 *idt82p33 = channel->idt82p33;
445 int err;
446
447 idt82p33->tod_write_overhead_ns = 0;
448
449 err = idt82p33_measure_settime_gettime_gap_overhead(channel, &gap_ns);
450
451 if (err)
452 return err;
453
454 err = idt82p33_measure_one_byte_write_overhead(channel,
455 &one_byte_write_ns);
456
457 if (err)
458 return err;
459
460 err = idt82p33_measure_tod_write_9_byte_overhead(channel);
461
462 if (err)
463 return err;
464
465 trailing_overhead_ns = gap_ns - (2 * one_byte_write_ns);
466
467 idt82p33->tod_write_overhead_ns -= trailing_overhead_ns;
468
> 469 return err;
470 }
471
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
reply other threads:[~2020-08-07 20:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202008080456.41pcA6ua%lkp@intel.com \
--to=lkp@intel.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-kernel@vger.kernel.org \
--cc=min.li.xe@renesas.com \
/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).