Re: [PATCH] staging: media: atomisp: Fix premature setting of HMM_BO_DEVICE_INITED flag
From: Abdelrahman Fekry
Date: Mon Jul 07 2025 - 06:59:35 EST
Hi Hans,
Thank you so much for your support and guidance. It really helps a lot.
> The hmm_alloc code can use some more cleanups:
>
> * hmm_get_mmu_base_addr() should be moved to drivers/staging/media/atomisp/pci/hmm/hmm.c
> and then the "struct hmm_bo_device bo_device;" in hmm.c can be made static
>
On it .
> * hmm_init() sets hmm_initialized = true even on errors. It should
> immediately exit (return ret) on errors instead of continue-ing
> with calling hmm_alloc() even though hmm_bo_device_init() failed.
I have created a patch for this but i was waiting for the other patch on
hmm_init() to be applied because it builds on it.
> * I've checked the code and hmm_init() is called before any hmm_alloc()
> calls are made so the extra hmm_init() call in __hmm_alloc() can be
> dropped.
Same for this too , i was just waiting for the prev patch to get
applied to avoid conflicts.
> * After dropping the extra hmm_init() call in __hmm_alloc() the
> hmm_initialized flag can be removed since it is now no longer read
> anywhere.
>
I agree with this too , will do it
> Regards,
>
> Hans
Thank you
Abdelrahman Fekry