Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Souza, Jose" <jose.souza@intel.com>
To: "intel-xe@lists.freedesktop.org" <intel-xe@lists.freedesktop.org>,
	"Wajdeczko, Michal" <Michal.Wajdeczko@intel.com>
Subject: Re: [PATCH] drm/xe: Fix compilation without CONFIG_KUNIT
Date: Fri, 5 Jan 2024 17:31:12 +0000	[thread overview]
Message-ID: <6a1231b98fdb0adbca2d05ed9e87fb176cea9fc5.camel@intel.com> (raw)
In-Reply-To: <20240105171947.321-1-michal.wajdeczko@intel.com>

On Fri, 2024-01-05 at 18:19 +0100, Michal Wajdeczko wrote:
> It looks that declaration of kunit_get_current_test() was
> available in xe_guc_relay.c only with CONFIG_KUNIT enabled.
> If CONFIG_KUNIT is disabled we fail with:
> 
> In file included from ../include/linux/build_bug.h:5,
>                  from ../include/linux/bitfield.h:10,
>                  from ../drivers/gpu/drm/xe/xe_guc_relay.c:6:
> ../drivers/gpu/drm/xe/xe_guc_relay.c: In function ‘xe_guc_relay_process_guc2vf’:
> ../drivers/gpu/drm/xe/xe_guc_relay.c:863:52: error: implicit declaration of function ‘kunit_get_current_test’ [-Werror=implicit-function-declaration]
>   863 |  if (unlikely(!IS_SRIOV_VF(relay_to_xe(relay)) && !kunit_get_current_test()))
>       |                                                    ^~~~~~~~~~~~~~~~~~~~~~
> ../include/linux/compiler.h:77:42: note: in definition of macro ‘unlikely’
>    77 | # define unlikely(x) __builtin_expect(!!(x), 0)
>       |                                          ^
> 

Reviewed-by: José Roberto de Souza <jose.souza@intel.com>

> Reported-by: Mika Kuoppala <mika.kuoppala@linux.intel.com>
> Fixes: 9a2c2ecb1b77 ("drm/xe/guc: Introduce Relay Communication for SR-IOV")
> Signed-off-by: Michal Wajdeczko <michal.wajdeczko@intel.com>
> ---
>  drivers/gpu/drm/xe/xe_guc_relay.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/gpu/drm/xe/xe_guc_relay.c b/drivers/gpu/drm/xe/xe_guc_relay.c
> index b772088979bd..c0a2d8d5d3b3 100644
> --- a/drivers/gpu/drm/xe/xe_guc_relay.c
> +++ b/drivers/gpu/drm/xe/xe_guc_relay.c
> @@ -9,6 +9,7 @@
>  #include <drm/drm_managed.h>
>  
>  #include <kunit/static_stub.h>
> +#include <kunit/test-bug.h>
>  
>  #include "abi/guc_actions_sriov_abi.h"
>  #include "abi/guc_relay_actions_abi.h"


  reply	other threads:[~2024-01-05 17:31 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-05 17:19 [PATCH] drm/xe: Fix compilation without CONFIG_KUNIT Michal Wajdeczko
2024-01-05 17:31 ` Souza, Jose [this message]
2024-01-05 20:25 ` Belgaumkar, Vinay
2024-01-06  0:54 ` ✗ CI.Patch_applied: failure for " Patchwork
2024-01-08  8:30 ` Patchwork
2024-01-09 15:10 ` [PATCH] " Michal Wajdeczko

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=6a1231b98fdb0adbca2d05ed9e87fb176cea9fc5.camel@intel.com \
    --to=jose.souza@intel.com \
    --cc=Michal.Wajdeczko@intel.com \
    --cc=intel-xe@lists.freedesktop.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