lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <202409252352.YzA5pFp7-lkp@intel.com>
Date: Wed, 25 Sep 2024 23:47:56 +0800
From: kernel test robot <lkp@...el.com>
To: Uwe Kleine-König <u.kleine-koenig@...libre.com>,
	Michael Hennerich <michael.hennerich@...log.com>,
	Nuno Sá <nuno.sa@...log.com>,
	Trevor Gamblin <tgamblin@...libre.com>
Cc: oe-kbuild-all@...ts.linux.dev, linux-pwm@...r.kernel.org,
	linux-kernel@...r.kernel.org
Subject: Re: [PATCH] pwm: axi-pwmgen: Create a dedicated function for getting
 driver data from a chip

Hi Uwe,

kernel test robot noticed the following build errors:

[auto build test ERROR on 62f92d634458a1e308bb699986b9147a6d670457]

url:    https://github.com/intel-lab-lkp/linux/commits/Uwe-Kleine-K-nig/pwm-axi-pwmgen-Create-a-dedicated-function-for-getting-driver-data-from-a-chip/20240923-205606
base:   62f92d634458a1e308bb699986b9147a6d670457
patch link:    https://lore.kernel.org/r/20240923125418.16558-2-u.kleine-koenig%40baylibre.com
patch subject: [PATCH] pwm: axi-pwmgen: Create a dedicated function for getting driver data from a chip
config: s390-allyesconfig (https://download.01.org/0day-ci/archive/20240925/202409252352.YzA5pFp7-lkp@intel.com/config)
compiler: s390-linux-gcc (GCC) 14.1.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240925/202409252352.YzA5pFp7-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@...el.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202409252352.YzA5pFp7-lkp@intel.com/

All errors (new ones prefixed by >>):

   drivers/pwm/pwm-axi-pwmgen.c: In function 'axi_pwmgen_ddata_from_chip':
>> drivers/pwm/pwm-axi-pwmgen.c:58:16: error: incompatible types when returning type 'void *' but 'struct axi_pwmgen_ddata' was expected
      58 |         return pwmchip_get_drvdata(chip);
         |                ^~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pwm/pwm-axi-pwmgen.c: In function 'axi_pwmgen_apply':
>> drivers/pwm/pwm-axi-pwmgen.c:64:42: error: incompatible types when initializing type 'struct axi_pwmgen_ddata *' using type 'struct axi_pwmgen_ddata'
      64 |         struct axi_pwmgen_ddata *ddata = axi_pwmgen_ddata_from_chip(chip);
         |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~
   drivers/pwm/pwm-axi-pwmgen.c: In function 'axi_pwmgen_get_state':
   drivers/pwm/pwm-axi-pwmgen.c:108:42: error: incompatible types when initializing type 'struct axi_pwmgen_ddata *' using type 'struct axi_pwmgen_ddata'
     108 |         struct axi_pwmgen_ddata *ddata = axi_pwmgen_ddata_from_chip(chip);
         |                                          ^~~~~~~~~~~~~~~~~~~~~~~~~~

Kconfig warnings: (for reference only)
   WARNING: unmet direct dependencies detected for OMAP2PLUS_MBOX
   Depends on [n]: MAILBOX [=y] && (ARCH_OMAP2PLUS || ARCH_K3)
   Selected by [y]:
   - TI_K3_M4_REMOTEPROC [=y] && REMOTEPROC [=y] && (ARCH_K3 || COMPILE_TEST [=y])


vim +58 drivers/pwm/pwm-axi-pwmgen.c

    55	
    56	static struct axi_pwmgen_ddata axi_pwmgen_ddata_from_chip(struct pwm_chip *chip)
    57	{
  > 58		return pwmchip_get_drvdata(chip);
    59	}
    60	
    61	static int axi_pwmgen_apply(struct pwm_chip *chip, struct pwm_device *pwm,
    62				    const struct pwm_state *state)
    63	{
  > 64		struct axi_pwmgen_ddata *ddata = axi_pwmgen_ddata_from_chip(chip);
    65		unsigned int ch = pwm->hwpwm;
    66		struct regmap *regmap = ddata->regmap;
    67		u64 period_cnt, duty_cnt;
    68		int ret;
    69	
    70		if (state->polarity != PWM_POLARITY_NORMAL)
    71			return -EINVAL;
    72	
    73		if (state->enabled) {
    74			period_cnt = mul_u64_u64_div_u64(state->period, ddata->clk_rate_hz, NSEC_PER_SEC);
    75			if (period_cnt > UINT_MAX)
    76				period_cnt = UINT_MAX;
    77	
    78			if (period_cnt == 0)
    79				return -EINVAL;
    80	
    81			ret = regmap_write(regmap, AXI_PWMGEN_CHX_PERIOD(ch), period_cnt);
    82			if (ret)
    83				return ret;
    84	
    85			duty_cnt = mul_u64_u64_div_u64(state->duty_cycle, ddata->clk_rate_hz, NSEC_PER_SEC);
    86			if (duty_cnt > UINT_MAX)
    87				duty_cnt = UINT_MAX;
    88	
    89			ret = regmap_write(regmap, AXI_PWMGEN_CHX_DUTY(ch), duty_cnt);
    90			if (ret)
    91				return ret;
    92		} else {
    93			ret = regmap_write(regmap, AXI_PWMGEN_CHX_PERIOD(ch), 0);
    94			if (ret)
    95				return ret;
    96	
    97			ret = regmap_write(regmap, AXI_PWMGEN_CHX_DUTY(ch), 0);
    98			if (ret)
    99				return ret;
   100		}
   101	
   102		return regmap_write(regmap, AXI_PWMGEN_REG_CONFIG, AXI_PWMGEN_LOAD_CONFIG);
   103	}
   104	

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ