From: kernel test robot <lkp@intel.com>
To: Jude Shih <shenshih@amd.com>
Cc: llvm@lists.linux.dev, kbuild-all@lists.01.org,
Linux Memory Management List <linux-mm@kvack.org>,
Alex Deucher <alexander.deucher@amd.com>,
Nicholas Kazlauskas <Nicholas.Kazlauskas@amd.com>
Subject: [linux-next:master 11329/11721] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:764:6: warning: format specifies type 'long' but the argument has type 'unsigned int'
Date: Sun, 5 Sep 2021 08:23:49 +0800 [thread overview]
Message-ID: <202109050841.flKJSE2w-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 6281 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 14c6345e6e6ca0570f3897214f24748ef6009761
commit: e27c41d5b0681c597ac1894f4e02cf626e062250 [11329/11721] drm/amd/display: Support for DMUB HPD interrupt handling
config: i386-randconfig-r021-20210904 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6fe2beba7d2a41964af658c8c59dd172683ef739)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=e27c41d5b0681c597ac1894f4e02cf626e062250
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout e27c41d5b0681c597ac1894f4e02cf626e062250
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:632:6: warning: no previous prototype for function 'dmub_aux_setconfig_callback' [-Wmissing-prototypes]
void dmub_aux_setconfig_callback(struct amdgpu_device *adev, struct dmub_notification *notify)
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:632:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void dmub_aux_setconfig_callback(struct amdgpu_device *adev, struct dmub_notification *notify)
^
static
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:648:6: warning: no previous prototype for function 'dmub_hpd_callback' [-Wmissing-prototypes]
void dmub_hpd_callback(struct amdgpu_device *adev, struct dmub_notification *notify)
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:648:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void dmub_hpd_callback(struct amdgpu_device *adev, struct dmub_notification *notify)
^
static
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:702:6: warning: no previous prototype for function 'register_dmub_notify_callback' [-Wmissing-prototypes]
bool register_dmub_notify_callback(struct amdgpu_device *adev, enum dmub_notification_type type,
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:702:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool register_dmub_notify_callback(struct amdgpu_device *adev, enum dmub_notification_type type,
^
static
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:764:6: warning: format specifies type 'long' but the argument has type 'unsigned int' [-Wformat]
ARRAY_SIZE(dm->dmub_thread_offload));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/drm/drm_print.h:498:19: note: expanded from macro 'DRM_ERROR'
__drm_err(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/kernel.h:44:25: note: expanded from macro 'ARRAY_SIZE'
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 warnings generated.
vim +764 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
732
733 #define DMUB_TRACE_MAX_READ 64
734 /**
735 * dm_dmub_outbox1_low_irq() - Handles Outbox interrupt
736 * @interrupt_params: used for determining the Outbox instance
737 *
738 * Handles the Outbox Interrupt
739 * event handler.
740 */
741 static void dm_dmub_outbox1_low_irq(void *interrupt_params)
742 {
743 struct dmub_notification notify;
744 struct common_irq_params *irq_params = interrupt_params;
745 struct amdgpu_device *adev = irq_params->adev;
746 struct amdgpu_display_manager *dm = &adev->dm;
747 struct dmcub_trace_buf_entry entry = { 0 };
748 uint32_t count = 0;
749 struct dmub_hpd_work *dmub_hpd_wrk;
750
751 if (dc_enable_dmub_notifications(adev->dm.dc)) {
752 dmub_hpd_wrk = kzalloc(sizeof(*dmub_hpd_wrk), GFP_ATOMIC);
753 if (!dmub_hpd_wrk) {
754 DRM_ERROR("Failed to allocate dmub_hpd_wrk");
755 return;
756 }
757 INIT_WORK(&dmub_hpd_wrk->handle_hpd_work, dm_handle_hpd_work);
758
759 if (irq_params->irq_src == DC_IRQ_SOURCE_DMCUB_OUTBOX) {
760 do {
761 dc_stat_get_dmub_notification(adev->dm.dc, ¬ify);
762 if (notify.type > ARRAY_SIZE(dm->dmub_thread_offload)) {
763 DRM_ERROR("DM: notify type %d larger than the array size %ld !", notify.type,
> 764 ARRAY_SIZE(dm->dmub_thread_offload));
765 continue;
766 }
767 if (dm->dmub_thread_offload[notify.type] == true) {
768 dmub_hpd_wrk->dmub_notify = ¬ify;
769 dmub_hpd_wrk->adev = adev;
770 queue_work(adev->dm.delayed_hpd_wq, &dmub_hpd_wrk->handle_hpd_work);
771 } else {
772 dm->dmub_callback[notify.type](adev, ¬ify);
773 }
774
775 } while (notify.pending_notification);
776
777 } else {
778 DRM_ERROR("DM: Failed to receive correct outbox IRQ !");
779 }
780 }
781
782
783 do {
784 if (dc_dmub_srv_get_dmub_outbox0_msg(dm->dc, &entry)) {
785 trace_amdgpu_dmub_trace_high_irq(entry.trace_code, entry.tick_count,
786 entry.param0, entry.param1);
787
788 DRM_DEBUG_DRIVER("trace_code:%u, tick_count:%u, param0:%u, param1:%u\n",
789 entry.trace_code, entry.tick_count, entry.param0, entry.param1);
790 } else
791 break;
792
793 count++;
794
795 } while (count <= DMUB_TRACE_MAX_READ);
796
797 ASSERT(count <= DMUB_TRACE_MAX_READ);
798 }
799 #endif
800
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: .config.gz --]
[-- Type: application/gzip, Size: 40404 bytes --]
WARNING: multiple messages have this Message-ID (diff)
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: [linux-next:master 11329/11721] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:764:6: warning: format specifies type 'long' but the argument has type 'unsigned int'
Date: Sun, 05 Sep 2021 08:23:49 +0800 [thread overview]
Message-ID: <202109050841.flKJSE2w-lkp@intel.com> (raw)
[-- Attachment #1: Type: text/plain, Size: 6409 bytes --]
tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master
head: 14c6345e6e6ca0570f3897214f24748ef6009761
commit: e27c41d5b0681c597ac1894f4e02cf626e062250 [11329/11721] drm/amd/display: Support for DMUB HPD interrupt handling
config: i386-randconfig-r021-20210904 (attached as .config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 6fe2beba7d2a41964af658c8c59dd172683ef739)
reproduce (this is a W=1 build):
wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
chmod +x ~/bin/make.cross
# https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=e27c41d5b0681c597ac1894f4e02cf626e062250
git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git
git fetch --no-tags linux-next master
git checkout e27c41d5b0681c597ac1894f4e02cf626e062250
# save the attached .config to linux build tree
COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=i386
If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@intel.com>
All warnings (new ones prefixed by >>):
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:632:6: warning: no previous prototype for function 'dmub_aux_setconfig_callback' [-Wmissing-prototypes]
void dmub_aux_setconfig_callback(struct amdgpu_device *adev, struct dmub_notification *notify)
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:632:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void dmub_aux_setconfig_callback(struct amdgpu_device *adev, struct dmub_notification *notify)
^
static
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:648:6: warning: no previous prototype for function 'dmub_hpd_callback' [-Wmissing-prototypes]
void dmub_hpd_callback(struct amdgpu_device *adev, struct dmub_notification *notify)
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:648:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
void dmub_hpd_callback(struct amdgpu_device *adev, struct dmub_notification *notify)
^
static
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:702:6: warning: no previous prototype for function 'register_dmub_notify_callback' [-Wmissing-prototypes]
bool register_dmub_notify_callback(struct amdgpu_device *adev, enum dmub_notification_type type,
^
drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:702:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
bool register_dmub_notify_callback(struct amdgpu_device *adev, enum dmub_notification_type type,
^
static
>> drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:764:6: warning: format specifies type 'long' but the argument has type 'unsigned int' [-Wformat]
ARRAY_SIZE(dm->dmub_thread_offload));
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
include/drm/drm_print.h:498:19: note: expanded from macro 'DRM_ERROR'
__drm_err(fmt, ##__VA_ARGS__)
~~~ ^~~~~~~~~~~
include/linux/kernel.h:44:25: note: expanded from macro 'ARRAY_SIZE'
#define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]) + __must_be_array(arr))
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 warnings generated.
vim +764 drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c
732
733 #define DMUB_TRACE_MAX_READ 64
734 /**
735 * dm_dmub_outbox1_low_irq() - Handles Outbox interrupt
736 * @interrupt_params: used for determining the Outbox instance
737 *
738 * Handles the Outbox Interrupt
739 * event handler.
740 */
741 static void dm_dmub_outbox1_low_irq(void *interrupt_params)
742 {
743 struct dmub_notification notify;
744 struct common_irq_params *irq_params = interrupt_params;
745 struct amdgpu_device *adev = irq_params->adev;
746 struct amdgpu_display_manager *dm = &adev->dm;
747 struct dmcub_trace_buf_entry entry = { 0 };
748 uint32_t count = 0;
749 struct dmub_hpd_work *dmub_hpd_wrk;
750
751 if (dc_enable_dmub_notifications(adev->dm.dc)) {
752 dmub_hpd_wrk = kzalloc(sizeof(*dmub_hpd_wrk), GFP_ATOMIC);
753 if (!dmub_hpd_wrk) {
754 DRM_ERROR("Failed to allocate dmub_hpd_wrk");
755 return;
756 }
757 INIT_WORK(&dmub_hpd_wrk->handle_hpd_work, dm_handle_hpd_work);
758
759 if (irq_params->irq_src == DC_IRQ_SOURCE_DMCUB_OUTBOX) {
760 do {
761 dc_stat_get_dmub_notification(adev->dm.dc, ¬ify);
762 if (notify.type > ARRAY_SIZE(dm->dmub_thread_offload)) {
763 DRM_ERROR("DM: notify type %d larger than the array size %ld !", notify.type,
> 764 ARRAY_SIZE(dm->dmub_thread_offload));
765 continue;
766 }
767 if (dm->dmub_thread_offload[notify.type] == true) {
768 dmub_hpd_wrk->dmub_notify = ¬ify;
769 dmub_hpd_wrk->adev = adev;
770 queue_work(adev->dm.delayed_hpd_wq, &dmub_hpd_wrk->handle_hpd_work);
771 } else {
772 dm->dmub_callback[notify.type](adev, ¬ify);
773 }
774
775 } while (notify.pending_notification);
776
777 } else {
778 DRM_ERROR("DM: Failed to receive correct outbox IRQ !");
779 }
780 }
781
782
783 do {
784 if (dc_dmub_srv_get_dmub_outbox0_msg(dm->dc, &entry)) {
785 trace_amdgpu_dmub_trace_high_irq(entry.trace_code, entry.tick_count,
786 entry.param0, entry.param1);
787
788 DRM_DEBUG_DRIVER("trace_code:%u, tick_count:%u, param0:%u, param1:%u\n",
789 entry.trace_code, entry.tick_count, entry.param0, entry.param1);
790 } else
791 break;
792
793 count++;
794
795 } while (count <= DMUB_TRACE_MAX_READ);
796
797 ASSERT(count <= DMUB_TRACE_MAX_READ);
798 }
799 #endif
800
---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 40404 bytes --]
next reply other threads:[~2021-09-05 0:24 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-09-05 0:23 kernel test robot [this message]
2021-09-05 0:23 ` [linux-next:master 11329/11721] drivers/gpu/drm/amd/amdgpu/../display/amdgpu_dm/amdgpu_dm.c:764:6: warning: format specifies type 'long' but the argument has type 'unsigned int' kernel test robot
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=202109050841.flKJSE2w-lkp@intel.com \
--to=lkp@intel.com \
--cc=Nicholas.Kazlauskas@amd.com \
--cc=alexander.deucher@amd.com \
--cc=kbuild-all@lists.01.org \
--cc=linux-mm@kvack.org \
--cc=llvm@lists.linux.dev \
--cc=shenshih@amd.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.