From: kernel test robot <lkp@intel.com>
To: Fenglin Wu <quic_fenglinw@quicinc.com>,
linux-arm-msm@vger.kernel.org, linux-kernel@vger.kernel.org,
krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org,
agross@kernel.org, andersson@kernel.org,
dmitry.baryshkov@linaro.org,
Konrad Dybcio <konrad.dybcio@linaro.org>,
Dmitry Torokhov <dmitry.torokhov@gmail.com>,
linux-input@vger.kernel.org
Cc: llvm@lists.linux.dev, oe-kbuild-all@lists.linux.dev,
quic_collinsd@quicinc.com, quic_subbaram@quicinc.com,
quic_fenglinw@quicinc.com, quic_kamalw@quicinc.com,
jestar@qti.qualcomm.com
Subject: Re: [PATCH v3 1/3] input: pm8xxx-vib: refactor to easily support new SPMI vibrator
Date: Tue, 25 Jul 2023 18:01:33 +0800 [thread overview]
Message-ID: <202307251741.PMtlVAgD-lkp@intel.com> (raw)
In-Reply-To: <20230725054138.129497-2-quic_fenglinw@quicinc.com>
Hi Fenglin,
kernel test robot noticed the following build warnings:
[auto build test WARNING on dtor-input/next]
[also build test WARNING on dtor-input/for-linus linus/master v6.5-rc3 next-20230725]
[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/Fenglin-Wu/input-pm8xxx-vib-refactor-to-easily-support-new-SPMI-vibrator/20230725-134504
base: https://git.kernel.org/pub/scm/linux/kernel/git/dtor/input.git next
patch link: https://lore.kernel.org/r/20230725054138.129497-2-quic_fenglinw%40quicinc.com
patch subject: [PATCH v3 1/3] input: pm8xxx-vib: refactor to easily support new SPMI vibrator
config: x86_64-buildonly-randconfig-r002-20230725 (https://download.01.org/0day-ci/archive/20230725/202307251741.PMtlVAgD-lkp@intel.com/config)
compiler: clang version 15.0.7 (https://github.com/llvm/llvm-project.git 8dfdcc7b7bf66834a761bd8de445840ef68e4d1a)
reproduce: (https://download.01.org/0day-ci/archive/20230725/202307251741.PMtlVAgD-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/202307251741.PMtlVAgD-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/input/misc/pm8xxx-vibrator.c:190:17: warning: cast to smaller integer type 'enum pm8xxx_vib_type' from 'const void *' [-Wvoid-pointer-to-enum-cast]
vib->hw_type = (enum pm8xxx_vib_type)of_device_get_match_data(dev);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 warning generated.
vim +190 drivers/input/misc/pm8xxx-vibrator.c
163
164 static int pm8xxx_vib_probe(struct platform_device *pdev)
165 {
166 struct pm8xxx_vib *vib;
167 struct input_dev *input_dev;
168 struct device *dev = &pdev->dev;
169 struct regmap *regmap;
170 struct reg_field *regs;
171 int error, i;
172 unsigned int val;
173 u32 reg_base;
174
175 vib = devm_kzalloc(dev, sizeof(*vib), GFP_KERNEL);
176 if (!vib)
177 return -ENOMEM;
178
179 regmap = dev_get_regmap(dev->parent, NULL);
180 if (!regmap)
181 return -ENODEV;
182
183 input_dev = devm_input_allocate_device(dev);
184 if (!input_dev)
185 return -ENOMEM;
186
187 INIT_WORK(&vib->work, pm8xxx_work_handler);
188 vib->vib_input_dev = input_dev;
189
> 190 vib->hw_type = (enum pm8xxx_vib_type)of_device_get_match_data(dev);
191
192 regs = ssbi_vib_regs;
193 if (vib->hw_type != SSBI_VIB) {
194 error = fwnode_property_read_u32(dev->fwnode, "reg", ®_base);
195 if (error < 0) {
196 dev_err(dev, "Failed to read reg address, rc=%d\n", error);
197 return error;
198 }
199
200 if (vib->hw_type == SPMI_VIB_GEN1)
201 regs = spmi_vib_gen1_regs;
202
203 for (i = 0; i < VIB_MAX_REG; i++)
204 if (regs[i].reg != 0)
205 regs[i].reg += reg_base;
206 }
207
208 error = devm_regmap_field_bulk_alloc(dev, regmap, vib->r_fields, regs, VIB_MAX_REG);
209 if (error < 0)
210 {
211 dev_err(dev, "Failed to allocate regmap failed, rc=%d\n", error);
212 return error;
213 }
214
215 error = regmap_field_read(vib->r_fields[VIB_DRV_REG], &val);
216 if (error < 0)
217 return error;
218
219 /* operate in manual mode */
220 if (vib->hw_type == SSBI_VIB) {
221 val &= SSBI_VIB_DRV_EN_MANUAL_MASK;
222 error = regmap_field_write(vib->r_fields[VIB_DRV_REG], val);
223 if (error < 0)
224 return error;
225 }
226
227 vib->reg_vib_drv = val;
228
229 input_dev->name = "pm8xxx_vib_ffmemless";
230 input_dev->id.version = 1;
231 input_dev->close = pm8xxx_vib_close;
232 input_set_drvdata(input_dev, vib);
233 input_set_capability(vib->vib_input_dev, EV_FF, FF_RUMBLE);
234
235 error = input_ff_create_memless(input_dev, NULL,
236 pm8xxx_vib_play_effect);
237 if (error) {
238 dev_err(dev, "couldn't register vibrator as FF device\n");
239 return error;
240 }
241
242 error = input_register_device(input_dev);
243 if (error) {
244 dev_err(dev, "couldn't register input device\n");
245 return error;
246 }
247
248 platform_set_drvdata(pdev, vib);
249 return 0;
250 }
251
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
next prev parent reply other threads:[~2023-07-25 10:03 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20230725054138.129497-1-quic_fenglinw@quicinc.com>
2023-07-25 5:41 ` [PATCH v3 1/3] input: pm8xxx-vib: refactor to easily support new SPMI vibrator Fenglin Wu
2023-07-25 5:52 ` Krzysztof Kozlowski
2023-07-25 6:16 ` Fenglin Wu
2023-07-27 7:07 ` Krzysztof Kozlowski
2023-07-27 7:43 ` Fenglin Wu
2023-07-27 9:22 ` Krzysztof Kozlowski
2023-07-27 9:40 ` Fenglin Wu
2023-07-25 10:01 ` kernel test robot [this message]
2023-07-27 7:07 ` Krzysztof Kozlowski
2023-07-25 5:41 ` [PATCH v3 2/3] dt-bindings: input: qcom,pm8xxx-vib: add new SPMI vibrator module Fenglin Wu
2023-07-25 5:53 ` Krzysztof Kozlowski
2023-07-25 6:26 ` Fenglin Wu
2023-07-27 7:09 ` Krzysztof Kozlowski
2023-07-25 5:41 ` [PATCH v3 3/3] input: pm8xxx-vibrator: add new SPMI vibrator support Fenglin Wu
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=202307251741.PMtlVAgD-lkp@intel.com \
--to=lkp@intel.com \
--cc=agross@kernel.org \
--cc=andersson@kernel.org \
--cc=dmitry.baryshkov@linaro.org \
--cc=dmitry.torokhov@gmail.com \
--cc=jestar@qti.qualcomm.com \
--cc=konrad.dybcio@linaro.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-input@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=llvm@lists.linux.dev \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=quic_collinsd@quicinc.com \
--cc=quic_fenglinw@quicinc.com \
--cc=quic_kamalw@quicinc.com \
--cc=quic_subbaram@quicinc.com \
--cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).