From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A8F231062878 for ; Wed, 11 Mar 2026 12:32:44 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 0BDA310E8D3; Wed, 11 Mar 2026 12:32:44 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="Lc2XScgK"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id 6CFA910E8AD for ; Wed, 11 Mar 2026 12:32:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1773232362; x=1804768362; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=bBv0XGhP4blgnjHulY0qHaC8J693lO9KB0HGdM5frOI=; b=Lc2XScgKPFgeWS/kD8bSSNafYJpt6ri050MRH3hLg2sOzYlAr9A9I4uP q5DDKm9r5M1wMn5bWPvN38yBrEWtiYbLCb/9j/RWM9TYMfa8C5mvDhi/8 tC+eF/hTQi1b4PCFr/1RQVvAZUUs0Bhim0NExvH+7NmFiU2kIlDJiR9yO bgfVboZ31bwiXOFIbBJ53HGxNEoqls2YvyIiwHwq7JsjiSHzWyLII0xO7 PnOJXguN/oloYw9WRhZAK6luxgZqowGVCAdHawoo+7iUf0UvscK69zXPQ j8f+hfcNLHM9VKPlyjV+V/bCLFTcvVulcdmz+day9n7ImOhW+UJxUlBW5 A==; X-CSE-ConnectionGUID: wcfkg15lQGmssVLT1tOiKA== X-CSE-MsgGUID: L1ZX2hKTTumGci4UVh6IWw== X-IronPort-AV: E=McAfee;i="6800,10657,11726"; a="85385047" X-IronPort-AV: E=Sophos;i="6.23,113,1770624000"; d="scan'208";a="85385047" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by orvoesa105.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Mar 2026 05:32:42 -0700 X-CSE-ConnectionGUID: gphmwt18RcOQItbqRgpPmA== X-CSE-MsgGUID: BPj1ZcRqQFu5Hq6zYBoPgA== X-ExtLoop1: 1 Received: from kwachows-mobl.ger.corp.intel.com (HELO [10.246.19.164]) ([10.246.19.164]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Mar 2026 05:32:40 -0700 Message-ID: Date: Wed, 11 Mar 2026 13:32:37 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] accel/ivpu: Apply minor code style cleanups to align with kernel style To: "Falkowski, Maciej" , dri-devel@lists.freedesktop.org Cc: oded.gabbay@gmail.com, jeff.hugo@oss.qualcomm.com, lizhi.hou@amd.com, andrzej.kacprowski@linux.intel.com References: <20260310120736.3341679-1-karol.wachowski@linux.intel.com> Content-Language: en-US From: Karol Wachowski Organization: Intel Technology Poland sp. z o.o. - ul. Slowackiego 173, 80-298 Gdansk - KRS 101882 - NIP 957-07-52-316 In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On 3/11/2026 1:24 PM, Falkowski, Maciej wrote: > Reviewed-by: Maciej Falkowski Thank you! Applied to drm-misc-next. > > On 3/10/2026 1:07 PM, Karol Wachowski wrote: >> Replace direct import_attach test with drm_gem_is_imported() >> in ivpu_bo_bind(). >> >> Replace kzalloc(sizeof(*bo), GFP_KERNEL) with kzalloc_obj() >> in ivpu_gem_create_object(). >> >> Remove unnecessary cast to bool in ivpu_dbg_bo(). >> >> No functional changes. >> >> Signed-off-by: Karol Wachowski >> --- >>   drivers/accel/ivpu/ivpu_gem.c | 8 ++++---- >>   1 file changed, 4 insertions(+), 4 deletions(-) >> >> diff --git a/drivers/accel/ivpu/ivpu_gem.c b/drivers/accel/ivpu/ >> ivpu_gem.c >> index 8009965286e0..4f2005a8d496 100644 >> --- a/drivers/accel/ivpu/ivpu_gem.c >> +++ b/drivers/accel/ivpu/ivpu_gem.c >> @@ -1,6 +1,6 @@ >>   // SPDX-License-Identifier: GPL-2.0-only >>   /* >> - * Copyright (C) 2020-2023 Intel Corporation >> + * Copyright (C) 2020-2026 Intel Corporation >>    */ >>     #include >> @@ -31,7 +31,7 @@ static inline void ivpu_dbg_bo(struct ivpu_device >> *vdev, struct ivpu_bo *bo, con >>            "%6s: bo %8p size %9zu ctx %d vpu_addr %9llx pages %d sgt >> %d mmu_mapped %d wc %d imported %d\n", >>            action, bo, ivpu_bo_size(bo), bo->ctx_id, bo->vpu_addr, >>            (bool)bo->base.pages, (bool)bo->base.sgt, bo->mmu_mapped, >> bo->base.map_wc, >> -         (bool)drm_gem_is_imported(&bo->base.base)); >> +         drm_gem_is_imported(&bo->base.base)); >>   } >>     static inline int ivpu_bo_lock(struct ivpu_bo *bo) >> @@ -81,7 +81,7 @@ int __must_check ivpu_bo_bind(struct ivpu_bo *bo) >>         ivpu_dbg_bo(vdev, bo, "bind"); >>   -    if (bo->base.base.import_attach) >> +    if (drm_gem_is_imported(&bo->base.base)) >>           sgt = ivpu_bo_map_attachment(vdev, bo); >>       else >>           sgt = drm_gem_shmem_get_pages_sgt(&bo->base); >> @@ -195,7 +195,7 @@ struct drm_gem_object >> *ivpu_gem_create_object(struct drm_device *dev, size_t siz >>       if (size == 0 || !PAGE_ALIGNED(size)) >>           return ERR_PTR(-EINVAL); >>   -    bo = kzalloc(sizeof(*bo), GFP_KERNEL); >> +    bo = kzalloc_obj(*bo); >>       if (!bo) >>           return ERR_PTR(-ENOMEM); >>