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 45EF1FD2D63 for ; Tue, 10 Mar 2026 12:07:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id A872510E24D; Tue, 10 Mar 2026 12:07:52 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (2048-bit key; unprotected) header.d=intel.com header.i=@intel.com header.b="DXeyFTBS"; dkim-atps=neutral Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.18]) by gabe.freedesktop.org (Postfix) with ESMTPS id 35C1C10E24D for ; Tue, 10 Mar 2026 12:07:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1773144471; x=1804680471; h=from:to:cc:subject:date:message-id:mime-version: content-transfer-encoding; bh=f+mRU8hl6vqNlYkkIiuPPdTTPyg6klAVZJDApACyMIc=; b=DXeyFTBS9781ZemZM8N7NCBGD966gnqa2yjtu1wzcQ0qwCiW9TaWU6zV R6hHBpJ9viB20mGtLb/HMpNvSXJ5v7UkDdA2dDhAN0QhrXMSudeOQOyrS F8pM+TD9HgJrU2OeOtOFQKnajhSH+/rgU9e6Ej1qu3n5wIjFZMId5INr0 8F7aMlWJuIuR4f9EqY5fzDu+TuAnm7DQx0V/uRIlb9ELVotP3IxPqZ7Fw ZW3CEER+QyiML1CFaP+GzjsTNL8DVhDoetZ3YErDTWv1BkBJMoCTFERYL aa47VowLRBMBSOHfK+F0uyoFfcur59yTWrzaKDVkoA4ya2595CTxtS2XG g==; X-CSE-ConnectionGUID: gBbNvvW+QfOT5XS9tXrx1w== X-CSE-MsgGUID: dAX6ag6+Q6GRVmibrJdHMQ== X-IronPort-AV: E=McAfee;i="6800,10657,11724"; a="73384091" X-IronPort-AV: E=Sophos;i="6.23,112,1770624000"; d="scan'208";a="73384091" Received: from fmviesa003.fm.intel.com ([10.60.135.143]) by fmvoesa112.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2026 05:07:42 -0700 X-CSE-ConnectionGUID: omJv067uTjqkqIndN1JP+A== X-CSE-MsgGUID: hONfReE7Qv2mQCaxO8pfmQ== X-ExtLoop1: 1 Received: from pl-npu-pc-kwachow.igk.intel.com ([10.91.220.239]) by fmviesa003-auth.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 10 Mar 2026 05:07:40 -0700 From: Karol Wachowski To: dri-devel@lists.freedesktop.org Cc: oded.gabbay@gmail.com, jeff.hugo@oss.qualcomm.com, maciej.falkowski@linux.intel.com, lizhi.hou@amd.com, andrzej.kacprowski@linux.intel.com, Karol Wachowski Subject: [PATCH] accel/ivpu: Apply minor code style cleanups to align with kernel style Date: Tue, 10 Mar 2026 13:07:35 +0100 Message-ID: <20260310120736.3341679-1-karol.wachowski@linux.intel.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 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" 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); -- 2.43.0