From: kernel test robot <lkp@intel.com>
To: jasperwang@tencent.com, kaixuxia@tencent.com,
frankjpliu@tencent.com, kasong@tencent.com,
sagazchen@tencent.com, kernelxing@tencent.com,
aurelianliu@tencent.com, jason.zeng@intel.com,
wu.zheng@intel.com, yingbao.jia@intel.com, pei.p.jia@intel.com
Cc: oe-kbuild-all@lists.linux.dev
Subject: [opencloudos:linux-5.4/next 27252/27434] kernel/irq/manage.c:350:5: warning: no previous prototype for 'irq_update_affinity_desc'
Date: Tue, 5 Mar 2024 07:19:56 +0800 [thread overview]
Message-ID: <202403050757.ZDfe69e3-lkp@intel.com> (raw)
tree: https://gitee.com/OpenCloudOS/OpenCloudOS-Kernel.git linux-5.4/next
head: 0e88d1c26496999d1b2e37f3393b602d28b03faf
commit: 17568159e8f86e6ce059ca5b8d54fa54042d1bed [27252/27434] genirq: Export affinity setter for modules
config: arm64-allnoconfig (https://download.01.org/0day-ci/archive/20240305/202403050757.ZDfe69e3-lkp@intel.com/config)
compiler: aarch64-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240305/202403050757.ZDfe69e3-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/202403050757.ZDfe69e3-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> kernel/irq/manage.c:350:5: warning: no previous prototype for 'irq_update_affinity_desc' [-Wmissing-prototypes]
350 | int irq_update_affinity_desc(unsigned int irq,
| ^~~~~~~~~~~~~~~~~~~~~~~~
vim +/irq_update_affinity_desc +350 kernel/irq/manage.c
334
335 /**
336 * irq_update_affinity_desc - Update affinity management for an interrupt
337 * @irq: The interrupt number to update
338 * @affinity: Pointer to the affinity descriptor
339 *
340 * This interface can be used to configure the affinity management of
341 * interrupts which have been allocated already.
342 *
343 * There are certain limitations on when it may be used - attempts to use it
344 * for when the kernel is configured for generic IRQ reservation mode (in
345 * config GENERIC_IRQ_RESERVATION_MODE) will fail, as it may conflict with
346 * managed/non-managed interrupt accounting. In addition, attempts to use it on
347 * an interrupt which is already started or which has already been configured
348 * as managed will also fail, as these mean invalid init state or double init.
349 */
> 350 int irq_update_affinity_desc(unsigned int irq,
351 struct irq_affinity_desc *affinity)
352 {
353 struct irq_desc *desc;
354 unsigned long flags;
355 bool activated;
356 int ret = 0;
357
358 /*
359 * Supporting this with the reservation scheme used by x86 needs
360 * some more thought. Fail it for now.
361 */
362 if (IS_ENABLED(CONFIG_GENERIC_IRQ_RESERVATION_MODE))
363 return -EOPNOTSUPP;
364
365 desc = irq_get_desc_buslock(irq, &flags, 0);
366 if (!desc)
367 return -EINVAL;
368
369 /* Requires the interrupt to be shut down */
370 if (irqd_is_started(&desc->irq_data)) {
371 ret = -EBUSY;
372 goto out_unlock;
373 }
374
375 /* Interrupts which are already managed cannot be modified */
376 if (irqd_affinity_is_managed(&desc->irq_data)) {
377 ret = -EBUSY;
378 goto out_unlock;
379 }
380
381 /*
382 * Deactivate the interrupt. That's required to undo
383 * anything an earlier activation has established.
384 */
385 activated = irqd_is_activated(&desc->irq_data);
386 if (activated)
387 irq_domain_deactivate_irq(&desc->irq_data);
388
389 if (affinity->is_managed) {
390 irqd_set(&desc->irq_data, IRQD_AFFINITY_MANAGED);
391 irqd_set(&desc->irq_data, IRQD_MANAGED_SHUTDOWN);
392 }
393
394 cpumask_copy(desc->irq_common_data.affinity, &affinity->mask);
395
396 /* Restore the activation state */
397 if (activated)
398 irq_domain_activate_irq(&desc->irq_data, false);
399
400 out_unlock:
401 irq_put_desc_busunlock(desc, flags);
402 return ret;
403 }
404
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
reply other threads:[~2024-03-04 23:20 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=202403050757.ZDfe69e3-lkp@intel.com \
--to=lkp@intel.com \
--cc=aurelianliu@tencent.com \
--cc=frankjpliu@tencent.com \
--cc=jason.zeng@intel.com \
--cc=jasperwang@tencent.com \
--cc=kaixuxia@tencent.com \
--cc=kasong@tencent.com \
--cc=kernelxing@tencent.com \
--cc=oe-kbuild-all@lists.linux.dev \
--cc=pei.p.jia@intel.com \
--cc=sagazchen@tencent.com \
--cc=wu.zheng@intel.com \
--cc=yingbao.jia@intel.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.