From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mgamail.intel.com (mgamail.intel.com [192.198.163.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 51510483BD1 for ; Mon, 7 Sep 2026 11:30:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=192.198.163.10 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788780613; cv=none; b=cfjJXVl8fpkMD21urUqscRke4NLk1GyQOPofdkVcKX6OG3R7C8QdTiwpTMWpnplsRgJDC7uppItmpddctKcCtEqguHjbysBRqNL+jQ8jBQQ0JLKPFrRlDY2kpbE3ROUVJlDh+tNXtEJ2ywRElaNTEah2Sevk3v8feLP6kbGn2Vc= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788780613; c=relaxed/simple; bh=KZQszYyfDD/EtLOUuUX2S5CgNVTkcSWfc7tCiwl8+ps=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=fdrPwI17YZ6hORURgn+cFgvd1PmTwiFUxHQ6ouslPHwXowegwx93qBrRodSGkv5szYOU/RIbhnpgWnVbrW//c65MJEgRTzLpu9SX18oaX4OtlUmtl5k3Q7awBqO0zmfDF9WdsCk9uB9xM6RPGNpNev37RwcVwv1pNqAejpDu16I= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com; spf=pass smtp.mailfrom=linux.intel.com; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b=SppuuWt5; arc=none smtp.client-ip=192.198.163.10 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.intel.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=intel.com header.i=@intel.com header.b="SppuuWt5" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=intel.com; i=@intel.com; q=dns/txt; s=Intel; t=1788780612; x=1820316612; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=KZQszYyfDD/EtLOUuUX2S5CgNVTkcSWfc7tCiwl8+ps=; b=SppuuWt5aAlip/hYcqi6PpXgmLtHdsUwm4OUGH+gJPwy9zfTSYfmuNll OJOUU9ca2Derin/UW8A3AIsxJGyvaIXmFbiKjKaz8wNnsQv8yCNiYcmNh bujsvDz1MJj/+wX9wQZMOowzGlHTHpb9qb80TMTkr3RBifOQJGcrx9pX9 qBtSok39fvtrS/X3cH5qiltwDyHADNxJ1jBADLoADDyiZyS7L1ss/qOoz oVicK67WHjqXknWS+pokmBkqcdj2ZE0q1IlsLvjx9v+5LnHNtdC1MBC2h 9R4t7NzZpSoS5pqHdd9zG344h2BA0YnYusXhtDVVPEwqug/nvtWlQ6fRy A==; X-CSE-ConnectionGUID: zueGwNQSR02tky074/roqA== X-CSE-MsgGUID: oM9bEo/fRQ6b6BJ+/OPFsg== X-IronPort-AV: E=McAfee;i="6800,10657,11898"; a="100538604" X-IronPort-AV: E=Sophos;i="6.25,267,1779174000"; d="scan'208";a="100538604" Received: from orviesa002.jf.intel.com ([10.64.159.142]) by fmvoesa104.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2026 04:30:09 -0700 X-CSE-ConnectionGUID: sVuvoB9fQCyETK38zz+DWg== X-CSE-MsgGUID: xaPxEOkFThGUHpgcht+Cew== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="6.25,267,1779174000"; d="scan'208";a="300569144" Received: from abityuts-desk1.ger.corp.intel.com (HELO kekkonen.fi.intel.com) ([10.245.245.230]) by orviesa002-auth.jf.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Sep 2026 04:30:08 -0700 Received: from punajuuri.localdomain (unknown [192.168.240.130]) by kekkonen.fi.intel.com (Postfix) with ESMTP id A221C121D00; Mon, 07 Sep 2026 14:30:05 +0300 (EEST) Received: from sailus by punajuuri.localdomain with local (Exim 4.98.2) (envelope-from ) id 1x3XY5-0000000ARnE-0aiN; Mon, 07 Sep 2026 14:30:05 +0300 Organization: Intel Finland Oy - BIC 0357606-4 - c/o Alberga Business Park, 6 krs, Bertel Jungin Aukio 5, 02600 Espoo From: Sakari Ailus To: linux-media@vger.kernel.org Cc: Antti Laakso , sarang.sapre@intel.com, daxing.li@intel.com, ong.hock.yu@intel.com Subject: [PATCH v4 06/45] media: ipu6: Cleanup ipu6_mmu_init() Date: Mon, 7 Sep 2026 14:29:25 +0300 Message-ID: <20260907113004.2489993-7-sakari.ailus@linux.intel.com> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20260907113004.2489993-1-sakari.ailus@linux.intel.com> References: <20260907113004.2489993-1-sakari.ailus@linux.intel.com> Precedence: bulk X-Mailing-List: linux-media@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit From: Antti Laakso The struct ipu6_mmu_pdata is used only in ipu6_mmu_init(), and not really needed, remove it. Signed-off-by: Antti Laakso Signed-off-by: Sakari Ailus --- drivers/media/pci/intel/ipu6/ipu6-mmu.c | 13 ++++++------- drivers/media/pci/intel/ipu6/ipu6.h | 6 ------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/drivers/media/pci/intel/ipu6/ipu6-mmu.c b/drivers/media/pci/intel/ipu6/ipu6-mmu.c index 0e6dca36b6ba..6b1a49ebbcc2 100644 --- a/drivers/media/pci/intel/ipu6/ipu6-mmu.c +++ b/drivers/media/pci/intel/ipu6/ipu6-mmu.c @@ -750,27 +750,26 @@ struct ipu6_mmu *ipu6_mmu_init(struct device *dev, const struct ipu6_hw_variants *hw) { struct ipu6_device *isp = pci_get_drvdata(to_pci_dev(dev)); - struct ipu6_mmu_pdata *pdata; + struct ipu6_mmu_hw *mmu_hw; struct ipu6_mmu *mmu; unsigned int i; if (hw->nr_mmus > IPU6_MMU_MAX_DEVICES) return ERR_PTR(-EINVAL); - pdata = devm_kzalloc(dev, sizeof(*pdata), GFP_KERNEL); - if (!pdata) + mmu_hw = devm_kcalloc(dev, sizeof(*mmu_hw), hw->nr_mmus, GFP_KERNEL); + if (!mmu_hw) return ERR_PTR(-ENOMEM); for (i = 0; i < hw->nr_mmus; i++) { - struct ipu6_mmu_hw *pdata_mmu = &pdata->mmu_hw[i]; const struct ipu6_mmu_hw *src_mmu = &hw->mmu_hw[i]; if (src_mmu->nr_l1streams > IPU6_MMU_MAX_TLB_L1_STREAMS || src_mmu->nr_l2streams > IPU6_MMU_MAX_TLB_L2_STREAMS) return ERR_PTR(-EINVAL); - *pdata_mmu = *src_mmu; - pdata_mmu->base = base + src_mmu->offset; + mmu_hw[i] = *src_mmu; + mmu_hw[i].base = base + src_mmu->offset; } mmu = devm_kzalloc(dev, sizeof(*mmu), GFP_KERNEL); @@ -778,7 +777,7 @@ struct ipu6_mmu *ipu6_mmu_init(struct device *dev, return ERR_PTR(-ENOMEM); mmu->mmid = mmid; - mmu->mmu_hw = pdata->mmu_hw; + mmu->mmu_hw = mmu_hw; mmu->nr_mmus = hw->nr_mmus; mmu->tlb_invalidate = tlb_invalidate; mmu->ready = false; diff --git a/drivers/media/pci/intel/ipu6/ipu6.h b/drivers/media/pci/intel/ipu6/ipu6.h index 07ca59048f44..874b377a2e9a 100644 --- a/drivers/media/pci/intel/ipu6/ipu6.h +++ b/drivers/media/pci/intel/ipu6/ipu6.h @@ -239,12 +239,6 @@ struct ipu6_mmu_hw { bool insert_read_before_invalidate; }; -struct ipu6_mmu_pdata { - u32 nr_mmus; - struct ipu6_mmu_hw mmu_hw[IPU6_MMU_MAX_DEVICES]; - int mmid; -}; - struct ipu6_isys_csi2_pdata { void __iomem *base; }; -- 2.47.3