All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>
Cc: oe-kbuild-all@lists.linux.dev
Subject: [ukleinek:pwm/for-next 17/18] drivers/pwm/pwm-rcar.c:114:19: error: implicit declaration of function 'FIELD_MAX'
Date: Thu, 3 Apr 2025 13:30:12 +0800	[thread overview]
Message-ID: <202504031354.VJtxScP5-lkp@intel.com> (raw)

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/ukleinek/linux.git pwm/for-next
head:   4fe924e43a5aabe586ab696651c483c25a8a3abb
commit: edd549f4956be84ebd6a3900975544adeb0f3b50 [17/18] pwm: rcar: Improve register calculation
config: arc-randconfig-002-20250403 (https://download.01.org/0day-ci/archive/20250403/202504031354.VJtxScP5-lkp@intel.com/config)
compiler: arc-linux-gcc (GCC) 12.4.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250403/202504031354.VJtxScP5-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/202504031354.VJtxScP5-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/pwm/pwm-rcar.c: In function 'rcar_pwm_set_counter':
>> drivers/pwm/pwm-rcar.c:114:19: error: implicit declaration of function 'FIELD_MAX' [-Werror=implicit-function-declaration]
     114 |         if (tmp > FIELD_MAX(RCAR_PWMCNT_CYC0_MASK))
         |                   ^~~~~~~~~
>> drivers/pwm/pwm-rcar.c:117:15: error: implicit declaration of function 'FIELD_PREP' [-Werror=implicit-function-declaration]
     117 |         cyc = FIELD_PREP(RCAR_PWMCNT_CYC0_MASK, tmp);
         |               ^~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/FIELD_MAX +114 drivers/pwm/pwm-rcar.c

   104	
   105	static int rcar_pwm_set_counter(struct rcar_pwm_chip *rp, int div, u64 duty_ns,
   106					u64 period_ns)
   107	{
   108		unsigned long long tmp;
   109		unsigned long clk_rate = clk_get_rate(rp->clk);
   110		u32 cyc, ph;
   111	
   112		/* div <= 24 == RCAR_PWM_MAX_DIVISION, so the shift doesn't overflow. */
   113		tmp = mul_u64_u64_div_u64(period_ns, clk_rate, (u64)NSEC_PER_SEC << div);
 > 114		if (tmp > FIELD_MAX(RCAR_PWMCNT_CYC0_MASK))
   115			tmp = FIELD_MAX(RCAR_PWMCNT_CYC0_MASK);
   116	
 > 117		cyc = FIELD_PREP(RCAR_PWMCNT_CYC0_MASK, tmp);
   118	
   119		tmp = mul_u64_u64_div_u64(duty_ns, clk_rate, (u64)NSEC_PER_SEC << div);
   120		if (tmp > FIELD_MAX(RCAR_PWMCNT_PH0_MASK))
   121			tmp = FIELD_MAX(RCAR_PWMCNT_PH0_MASK);
   122		ph = FIELD_PREP(RCAR_PWMCNT_PH0_MASK, tmp);
   123	
   124		/* Avoid prohibited setting */
   125		if (cyc == 0 || ph == 0)
   126			return -EINVAL;
   127	
   128		rcar_pwm_write(rp, cyc | ph, RCAR_PWMCNT);
   129	
   130		return 0;
   131	}
   132	

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

             reply	other threads:[~2025-04-03  5:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-03  5:30 kernel test robot [this message]
2025-04-03  5:49 ` [ukleinek:pwm/for-next 17/18] drivers/pwm/pwm-rcar.c:114:19: error: implicit declaration of function 'FIELD_MAX' Uwe Kleine-König

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=202504031354.VJtxScP5-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=u.kleine-koenig@baylibre.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.