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 30C3C1062887 for ; Wed, 11 Mar 2026 12:24:41 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 5C66610E8E7; Wed, 11 Mar 2026 12:24:40 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="BQLaM2Cm"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [198.175.65.13]) by gabe.freedesktop.org (Postfix) with ESMTPS id 399D510E8E4 for ; Wed, 11 Mar 2026 12:24:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1773231879; x=1804767879; h=message-id:date:mime-version:subject:to:cc:references: from:in-reply-to:content-transfer-encoding; bh=mioaNWZUNBaI8WwWuv6jZA90gkWSiW5cTWi+5x/roYM=; b=BQLaM2Cm0KD63ef7QJ6gtslSIv29a5fM0Rjz59cfoamYndtX6ygO3Tvq oeLNkNtRtk1aoLeYhHNGJ8ZU1cb01D4VRVCUxQgMv9QQnRM+RApLbasYq /Ali+Xz5SkX0A9VbBlcb+uuhVIYpCROY7z1YlfifmdiMWd9iFlIO1TCXE DXkRFViRiqQfkuBFfuRxiq0gkjXsGoreCst9Fj3P5KI0Rx7k4lrxj7oRK Izc34EEN4oPipcy+4xDf8EbwX+TIeJ0TZEg+7bEI2AxbGHShh/w1k+YjY EC2rPHYHdZe5+aSxWEYdwi7d6uOWvoDC+ZBpVda+KOvjVGDxkpEfakXYA g==; X-CSE-ConnectionGUID: NPpB9J/HThK3+9K/Of8HOg== X-CSE-MsgGUID: tFicQc7cQrm3kwfCD2d+yg== X-IronPort-AV: E=McAfee;i="6800,10657,11726"; a="85384405" X-IronPort-AV: E=Sophos;i="6.23,113,1770624000"; d="scan'208";a="85384405" 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:24:37 -0700 X-CSE-ConnectionGUID: buutnI12RV2mbOklP/nGPw== X-CSE-MsgGUID: +TH+vUkETQme8VE6Ym2w6w== X-ExtLoop1: 1 Received: from mfalkows-mobl.ger.corp.intel.com (HELO [10.94.253.247]) ([10.94.253.247]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 11 Mar 2026 05:24:36 -0700 Message-ID: Date: Wed, 11 Mar 2026 13:24:27 +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: Karol Wachowski , 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: "Falkowski, Maciej" In-Reply-To: <20260310120736.3341679-1-karol.wachowski@linux.intel.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit 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" Reviewed-by: Maciej Falkowski 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); >