public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Ciprian Costea <ciprianmarian.costea@oss.nxp.com>,
	Alexandre Belloni <alexandre.belloni@bootlin.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Catalin Marinas <catalin.marinas@arm.com>,
	Will Deacon <will@kernel.org>
Cc: oe-kbuild-all@lists.linux.dev, linux-rtc@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	NXP S32 Linux Team <s32@nxp.com>,
	Christophe Lizzi <clizzi@redhat.com>,
	Alberto Ruiz <aruizrui@redhat.com>,
	Enric Balletbo <eballetb@redhat.com>,
	Ciprian Marian Costea <ciprianmarian.costea@oss.nxp.com>,
	Bogdan Hamciuc <bogdan.hamciuc@nxp.com>,
	Ghennadi Procopciuc <Ghennadi.Procopciuc@nxp.com>
Subject: Re: [PATCH v2 2/4] rtc: s32g: add NXP S32G2/S32G3 SoC support
Date: Sat, 19 Oct 2024 17:43:51 +0800	[thread overview]
Message-ID: <202410191711.oc5s2ZYc-lkp@intel.com> (raw)
In-Reply-To: <20241015105133.656360-3-ciprianmarian.costea@oss.nxp.com>

Hi Ciprian,

kernel test robot noticed the following build warnings:

[auto build test WARNING on abelloni/rtc-next]
[also build test WARNING on robh/for-next arm64/for-next/core linus/master v6.12-rc3 next-20241018]
[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/Ciprian-Costea/dt-bindings-rtc-add-schema-for-NXP-S32G2-S32G3-SoCs/20241015-185302
base:   https://git.kernel.org/pub/scm/linux/kernel/git/abelloni/linux.git rtc-next
patch link:    https://lore.kernel.org/r/20241015105133.656360-3-ciprianmarian.costea%40oss.nxp.com
patch subject: [PATCH v2 2/4] rtc: s32g: add NXP S32G2/S32G3 SoC support
config: alpha-randconfig-r071-20241019 (https://download.01.org/0day-ci/archive/20241019/202410191711.oc5s2ZYc-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.3.0

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/202410191711.oc5s2ZYc-lkp@intel.com/

smatch warnings:
drivers/rtc/rtc-s32g.c:221 s32g_rtc_read_time() warn: unsigned 'sec' is never less than zero.
drivers/rtc/rtc-s32g.c:221 s32g_rtc_read_time() warn: error code type promoted to positive: 'sec'
drivers/rtc/rtc-s32g.c:239 s32g_rtc_read_alarm() warn: unsigned 'sec' is never less than zero.
drivers/rtc/rtc-s32g.c:239 s32g_rtc_read_alarm() warn: error code type promoted to positive: 'sec'

vim +/sec +221 drivers/rtc/rtc-s32g.c

   210	
   211	static int s32g_rtc_read_time(struct device *dev,
   212				      struct rtc_time *tm)
   213	{
   214		struct rtc_priv *priv = dev_get_drvdata(dev);
   215		u64 sec;
   216	
   217		if (!tm)
   218			return -EINVAL;
   219	
   220		sec = s32g_rtc_get_time_or_alrm(priv, RTCCNT_OFFSET);
 > 221		if (sec < 0)
   222			return -EINVAL;
   223	
   224		rtc_time64_to_tm(sec, tm);
   225	
   226		return 0;
   227	}
   228	
   229	static int s32g_rtc_read_alarm(struct device *dev, struct rtc_wkalrm *alrm)
   230	{
   231		struct rtc_priv *priv = dev_get_drvdata(dev);
   232		u32 rtcc, sec_left;
   233		u64 sec;
   234	
   235		if (!alrm)
   236			return -EINVAL;
   237	
   238		sec = s32g_rtc_get_time_or_alrm(priv, RTCVAL_OFFSET);
 > 239		if (sec < 0)
   240			return -EINVAL;
   241	
   242		rtc_time64_to_tm(sec, &alrm->time);
   243	
   244		rtcc = ioread32(priv->rtc_base + RTCC_OFFSET);
   245		alrm->enabled = sec && (rtcc & RTCC_RTCIE);
   246	
   247		alrm->pending = 0;
   248		if (alrm->enabled && !get_time_left(dev, priv, &sec_left))
   249			alrm->pending = !!sec_left;
   250	
   251		return 0;
   252	}
   253	

-- 
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki

  parent reply	other threads:[~2024-10-19  9:44 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-10-15 10:51 [PATCH v2 0/4] add NXP RTC driver support for S32G2/S32G3 SoCs Ciprian Costea
2024-10-15 10:51 ` [PATCH v2 1/4] dt-bindings: rtc: add schema for NXP " Ciprian Costea
2024-10-15 21:15   ` Rob Herring
2024-10-15 21:27     ` Rob Herring
2024-10-16 16:08       ` Alexandre Belloni
2024-10-18  8:54         ` Ciprian Marian Costea
2024-11-04 15:29         ` Rob Herring
2024-11-04 15:37           ` Ciprian Marian Costea
2024-10-15 10:51 ` [PATCH v2 2/4] rtc: s32g: add NXP S32G2/S32G3 SoC support Ciprian Costea
2024-10-15 21:04   ` Rob Herring
2024-10-18  8:45     ` Ciprian Marian Costea
2024-10-16  9:42   ` Uwe Kleine-König
2024-10-18  8:46     ` Ciprian Marian Costea
2024-10-17  8:34   ` Nobuhiro Iwamatsu
2024-10-18  8:45     ` Ciprian Marian Costea
2024-10-19  9:43   ` kernel test robot [this message]
2024-10-19 10:36   ` kernel test robot
2024-10-19 14:12   ` kernel test robot
2024-10-15 10:51 ` [PATCH v2 3/4] arm64: defconfig: add S32G RTC module support Ciprian Costea
2024-10-15 10:51 ` [PATCH v2 4/4] MAINTAINERS: add NXP S32G RTC driver Ciprian Costea

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=202410191711.oc5s2ZYc-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=Ghennadi.Procopciuc@nxp.com \
    --cc=alexandre.belloni@bootlin.com \
    --cc=aruizrui@redhat.com \
    --cc=bogdan.hamciuc@nxp.com \
    --cc=catalin.marinas@arm.com \
    --cc=ciprianmarian.costea@oss.nxp.com \
    --cc=clizzi@redhat.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=eballetb@redhat.com \
    --cc=krzk@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=robh@kernel.org \
    --cc=s32@nxp.com \
    --cc=will@kernel.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