From: kernel test robot <lkp@intel.com>
To: "Uwe Kleine-König" <u.kleine-koenig@baylibre.com>,
"Michael Hennerich" <michael.hennerich@analog.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Trevor Gamblin" <tgamblin@baylibre.com>
Cc: oe-kbuild-all@lists.linux.dev, linux-pwm@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH] pwm: axi-pwmgen: Create a dedicated function for getting driver data from a chip
Date: Wed, 25 Sep 2024 23:47:56 +0800 [thread overview]
Message-ID: <202409252352.YzA5pFp7-lkp@intel.com> (raw)
In-Reply-To: <20240923125418.16558-2-u.kleine-koenig@baylibre.com>
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@intel.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
prev parent reply other threads:[~2024-09-25 15:48 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-23 12:54 Uwe Kleine-König
2024-09-23 12:56 ` Trevor Gamblin
2024-09-24 7:07 ` Nuno Sá
2024-09-25 12:41 ` kernel test robot
2024-09-25 15:00 ` Uwe Kleine-König
2024-09-25 15:24 ` Uwe Kleine-König
2024-09-25 15:47 ` kernel test robot [this message]
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=202409252352.YzA5pFp7-lkp@intel.com \
--to=lkp@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pwm@vger.kernel.org \
--cc=michael.hennerich@analog.com \
--cc=nuno.sa@analog.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=tgamblin@baylibre.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®