From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 4427A2D73A6; Sat, 17 Oct 2026 17:10:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792257008; cv=none; b=KV6boeQhkX9JvIRWplcjYCMSrCOJEF40QvgxEF///7B8nusG/rwZw7kzjomvqIiEI/RhmubYsU90tDz94LEOdhEShbKF9RPai945SH9PVf779dM/Q6FrYqtYIV0f3mdwsTAgsD+Q3oEh0CQP+DXzhClEcRVVYzfVypkhhCW22wU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1792257008; c=relaxed/simple; bh=19859UGjbci9+MS0EQst3yfhYRZFMsbh5/xlx5quBmk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=ZgxClqK/WMXaV+o39H5QBlOwco9vedk1wZ4PXpe733VIUQZqezFRNtlbt9c7ktejHBT+LLlljBpCRojsopHsd5XSCk5BFXADgjHV3M6eaK6j18DD8rRcxTzkXAZ4n0P1x0aYw9esGgl1SqAnOxLJyUXCwKXWKu1KTKowqqZZ8K8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=mgmZOode; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="mgmZOode" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8C67A1F000C4; Sat, 17 Oct 2026 17:10:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1792257007; bh=9nIoIu15wc6Mp6PP5zQAA4pVkhGFxdlw6tmZvYGV1b8=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=mgmZOodeR35CF10lcGMWL86C06NF13jIOcMjbUukW1w//mvTYY0drNODR0xC8czu8 x6nYuM30brfPP6Tdq2C7GOgrA3g5SdiBdX5gn0UUa66razgBEQNtr7NNkRfU3e4AkT GJxSsVWfigbBULPcMMFhO+HyxrZmo3ESR7BTmtII= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, Saurabh Sengar , Michael Kelley , Wei Liu , Artem Dinaburg , Sasha Levin Subject: [PATCH 6.6 0421/1674] fbdev: hyperv_fb: Simplify hvfb_putmem Date: Sat, 17 Oct 2026 17:44:53 +0200 Message-ID: <20261017160441.937346377@linuxfoundation.org> X-Mailer: git-send-email 2.56.0 In-Reply-To: <20261017160431.119607952@linuxfoundation.org> References: <20261017160431.119607952@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Saurabh Sengar [ Upstream commit f5e728a50bb17336a20803dde488515b833ecd1d ] The device object required in 'hvfb_release_phymem' function for 'dma_free_coherent' can also be obtained from the 'info' pointer, making 'hdev' parameter in 'hvfb_putmem' redundant. Remove the unnecessary 'hdev' argument from 'hvfb_putmem'. [ Backport to 6.6.y: Pass info->device through the target's hvfb_release_phymem() helper and remove the now-redundant hdev argument from each hvfb_putmem() call. ] Signed-off-by: Saurabh Sengar Reviewed-by: Michael Kelley Tested-by: Michael Kelley Link: https://lore.kernel.org/r/1740845791-19977-2-git-send-email-ssengar@linux.microsoft.com Signed-off-by: Wei Liu Message-ID: <1740845791-19977-2-git-send-email-ssengar@linux.microsoft.com> Assisted-by: LLM Signed-off-by: Artem Dinaburg Signed-off-by: Sasha Levin --- drivers/video/fbdev/hyperv_fb.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/video/fbdev/hyperv_fb.c b/drivers/video/fbdev/hyperv_fb.c index 80e8ec36b7db2..80e6d96821795 100644 --- a/drivers/video/fbdev/hyperv_fb.c +++ b/drivers/video/fbdev/hyperv_fb.c @@ -973,7 +973,7 @@ static phys_addr_t hvfb_get_phymem(struct hv_device *hdev, } /* Release contiguous physical memory */ -static void hvfb_release_phymem(struct hv_device *hdev, +static void hvfb_release_phymem(struct device *device, phys_addr_t paddr, unsigned int size) { unsigned int order = get_order(size); @@ -981,7 +981,7 @@ static void hvfb_release_phymem(struct hv_device *hdev, if (order <= MAX_ORDER) __free_pages(pfn_to_page(paddr >> PAGE_SHIFT), order); else - dma_free_coherent(&hdev->device, + dma_free_coherent(device, round_up(size, PAGE_SIZE), phys_to_virt(paddr), paddr); @@ -1100,7 +1100,7 @@ static int hvfb_getmem(struct hv_device *hdev, struct fb_info *info) } /* Release the framebuffer */ -static void hvfb_putmem(struct hv_device *hdev, struct fb_info *info) +static void hvfb_putmem(struct fb_info *info) { struct hvfb_par *par = info->par; @@ -1109,7 +1109,7 @@ static void hvfb_putmem(struct hv_device *hdev, struct fb_info *info) iounmap(par->mmio_vp); vmbus_free_mmio(par->mem->start, screen_fb_size); } else { - hvfb_release_phymem(hdev, info->fix.smem_start, + hvfb_release_phymem(info->device, info->fix.smem_start, screen_fb_size); } @@ -1223,7 +1223,7 @@ static int hvfb_probe(struct hv_device *hdev, error: fb_deferred_io_cleanup(info); - hvfb_putmem(hdev, info); + hvfb_putmem(info); error2: vmbus_close(hdev->channel); error1: @@ -1252,7 +1252,7 @@ static void hvfb_remove(struct hv_device *hdev) vmbus_close(hdev->channel); hv_set_drvdata(hdev, NULL); - hvfb_putmem(hdev, info); + hvfb_putmem(info); framebuffer_release(info); } -- 2.53.0