From: Kate Hsuan <hpa@redhat.com>
To: Hans de Goede <hdegoede@redhat.com>,
Mauro Carvalho Chehab <mchehab@kernel.org>,
Sakari Ailus <sakari.ailus@linux.intel.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
linux-media@vger.kernel.org, linux-staging@lists.linux.dev
Cc: Kate Hsuan <hpa@redhat.com>
Subject: [PATCH v2 2/5] staging: media: atomisp: runtime: frame: remove #ifdef ISP2401
Date: Mon, 8 May 2023 14:26:29 +0800 [thread overview]
Message-ID: <20230508062632.34537-2-hpa@redhat.com> (raw)
In-Reply-To: <20230508062632.34537-1-hpa@redhat.com>
The actions of ISP2401 and 2400 are determined at the runtime.
Signed-off-by: Kate Hsuan <hpa@redhat.com>
---
.../media/atomisp/pci/runtime/frame/src/frame.c | 13 +++----------
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/drivers/staging/media/atomisp/pci/runtime/frame/src/frame.c b/drivers/staging/media/atomisp/pci/runtime/frame/src/frame.c
index 83bb42e05421..1e374ae848e3 100644
--- a/drivers/staging/media/atomisp/pci/runtime/frame/src/frame.c
+++ b/drivers/staging/media/atomisp/pci/runtime/frame/src/frame.c
@@ -601,9 +601,6 @@ static void frame_init_qplane6_planes(struct ia_css_frame *frame)
static int frame_allocate_buffer_data(struct ia_css_frame *frame)
{
-#ifdef ISP2401
- IA_CSS_ENTER_LEAVE_PRIVATE("frame->data_bytes=%d\n", frame->data_bytes);
-#endif
frame->data = hmm_alloc(frame->data_bytes);
if (frame->data == mmgr_NULL)
return -ENOMEM;
@@ -635,15 +632,11 @@ static int frame_allocate_with_data(struct ia_css_frame **frame,
if (err) {
kvfree(me);
-#ifndef ISP2401
- return err;
-#else
- me = NULL;
-#endif
+ *frame = NULL;
+ } else {
+ *frame = me;
}
- *frame = me;
-
return err;
}
--
2.40.1
next prev parent reply other threads:[~2023-05-08 6:27 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-08 6:26 [PATCH v2 1/5] staging: media: atomisp: sh_css: Remove #ifdef ISP2401 Kate Hsuan
2023-05-08 6:26 ` Kate Hsuan [this message]
2023-05-08 6:26 ` [PATCH v2 3/5] staging: media: atomisp: sh_css_sp: " Kate Hsuan
2023-05-08 6:26 ` [PATCH v2 4/5] staging: media: atomisp: sh_css_firmware: determine firmware version at runtime Kate Hsuan
2023-05-08 6:26 ` [PATCH v2 5/5] staging: media: atomisp: sh_css_mipi: Remove #ifdef 2041 Kate Hsuan
2023-05-10 18:34 ` Hans de Goede
2023-05-11 11:18 ` Kate Hsuan
2023-05-10 18:40 ` [PATCH v2 1/5] staging: media: atomisp: sh_css: Remove #ifdef ISP2401 Hans de Goede
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230508062632.34537-2-hpa@redhat.com \
--to=hpa@redhat.com \
--cc=gregkh@linuxfoundation.org \
--cc=hdegoede@redhat.com \
--cc=linux-media@vger.kernel.org \
--cc=linux-staging@lists.linux.dev \
--cc=mchehab@kernel.org \
--cc=sakari.ailus@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox