Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: "Dixit, Ashutosh" <ashutosh.dixit@intel.com>
Cc: intel-xe@lists.freedesktop.org
Subject: Re: [PATCH] drm/xe: use IS_ENABLED() instead of defined() on config options
Date: Fri, 06 Sep 2024 16:50:48 +0300	[thread overview]
Message-ID: <87seucnb5z.fsf@intel.com> (raw)
In-Reply-To: <871q1zza67.wl-ashutosh.dixit@intel.com>

On Wed, 04 Sep 2024, "Dixit, Ashutosh" <ashutosh.dixit@intel.com> wrote:
> On Wed, 04 Sep 2024 07:52:31 -0700, Jani Nikula wrote:
>>
>> Prefer IS_ENABLED() instead of defined() for checking whether a kconfig
>> option is enabled.
>
> Reviewed-by: Ashutosh Dixit <ashutosh.dixit@intel.com>

Thanks for the reviews, pushed to drm-xe-next.

BR,
Jani.

>
>>
>> Signed-off-by: Jani Nikula <jani.nikula@intel.com>
>> ---
>>  drivers/gpu/drm/xe/xe_bo.c                  | 2 +-
>>  drivers/gpu/drm/xe/xe_gt_sriov_vf_debugfs.c | 2 +-
>>  drivers/gpu/drm/xe/xe_guc.c                 | 2 +-
>>  3 files changed, 3 insertions(+), 3 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/xe/xe_bo.c b/drivers/gpu/drm/xe/xe_bo.c
>> index 06911e9a3bf5..53948a965404 100644
>> --- a/drivers/gpu/drm/xe/xe_bo.c
>> +++ b/drivers/gpu/drm/xe/xe_bo.c
>> @@ -468,7 +468,7 @@ static int xe_ttm_io_mem_reserve(struct ttm_device *bdev,
>>		mem->bus.offset += vram->io_start;
>>		mem->bus.is_iomem = true;
>>
>> -#if  !defined(CONFIG_X86)
>> +#if  !IS_ENABLED(CONFIG_X86)
>>		mem->bus.caching = ttm_write_combined;
>>  #endif
>>		return 0;
>> diff --git a/drivers/gpu/drm/xe/xe_gt_sriov_vf_debugfs.c b/drivers/gpu/drm/xe/xe_gt_sriov_vf_debugfs.c
>> index f3ddcbefc6bc..2ed5b6780d30 100644
>> --- a/drivers/gpu/drm/xe/xe_gt_sriov_vf_debugfs.c
>> +++ b/drivers/gpu/drm/xe/xe_gt_sriov_vf_debugfs.c
>> @@ -33,7 +33,7 @@ static const struct drm_info_list vf_info[] = {
>>		.show = xe_gt_debugfs_simple_show,
>>		.data = xe_gt_sriov_vf_print_version,
>>	},
>> -#if defined(CONFIG_DRM_XE_DEBUG) || defined(CONFIG_DRM_XE_DEBUG_SRIOV)
>> +#if IS_ENABLED(CONFIG_DRM_XE_DEBUG) || IS_ENABLED(CONFIG_DRM_XE_DEBUG_SRIOV)
>>	{
>>		"runtime_regs",
>>		.show = xe_gt_debugfs_simple_show,
>> diff --git a/drivers/gpu/drm/xe/xe_guc.c b/drivers/gpu/drm/xe/xe_guc.c
>> index 52df28032a6f..db667850c8b8 100644
>> --- a/drivers/gpu/drm/xe/xe_guc.c
>> +++ b/drivers/gpu/drm/xe/xe_guc.c
>> @@ -583,7 +583,7 @@ static s32 guc_pc_get_cur_freq(struct xe_guc_pc *guc_pc)
>>   * extreme thermal throttling. And a system that is that hot during boot is probably
>>   * dead anyway!
>>   */
>> -#if defined(CONFIG_DRM_XE_DEBUG)
>> +#if IS_ENABLED(CONFIG_DRM_XE_DEBUG)
>>  #define GUC_LOAD_RETRY_LIMIT	20
>>  #else
>>  #define GUC_LOAD_RETRY_LIMIT	3
>> --
>> 2.39.2
>>

-- 
Jani Nikula, Intel

  reply	other threads:[~2024-09-06 13:50 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-04 14:52 [PATCH] drm/xe: use IS_ENABLED() instead of defined() on config options Jani Nikula
2024-09-04 15:23 ` ✓ CI.Patch_applied: success for " Patchwork
2024-09-04 15:23 ` ✓ CI.checkpatch: " Patchwork
2024-09-04 15:24 ` ✓ CI.KUnit: " Patchwork
2024-09-04 15:36 ` ✓ CI.Build: " Patchwork
2024-09-04 15:39 ` ✓ CI.Hooks: " Patchwork
2024-09-04 15:40 ` ✓ CI.checksparse: " Patchwork
2024-09-04 15:54 ` [PATCH] " Dixit, Ashutosh
2024-09-06 13:50   ` Jani Nikula [this message]
2024-09-04 16:24 ` ✗ CI.BAT: failure for " Patchwork
2024-09-05  9:29 ` ✓ CI.Patch_applied: success for drm/xe: use IS_ENABLED() instead of defined() on config options (rev2) Patchwork
2024-09-05  9:29 ` ✓ CI.checkpatch: " Patchwork
2024-09-05  9:31 ` ✓ CI.KUnit: " Patchwork
2024-09-05  9:45 ` ✓ CI.Build: " Patchwork
2024-09-05  9:47 ` ✓ CI.Hooks: " Patchwork
2024-09-05  9:49 ` ✓ CI.checksparse: " Patchwork
2024-09-05 10:17 ` ✓ CI.BAT: " Patchwork
2024-09-05 13:10 ` [PATCH] drm/xe: use IS_ENABLED() instead of defined() on config options Nilawar, Badal
2024-09-06 12:43 ` ✗ CI.FULL: failure for " Patchwork
2024-09-07  8:26 ` ✗ CI.FULL: failure for drm/xe: use IS_ENABLED() instead of defined() on config options (rev2) Patchwork

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=87seucnb5z.fsf@intel.com \
    --to=jani.nikula@intel.com \
    --cc=ashutosh.dixit@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