From patchwork Thu Nov 4 11:41:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dorota Czaplejewicz X-Patchwork-Id: 12602935 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 mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5DA75C433F5 for ; Thu, 4 Nov 2021 11:43:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3CA8861205 for ; Thu, 4 Nov 2021 11:43:13 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230494AbhKDLpu (ORCPT ); Thu, 4 Nov 2021 07:45:50 -0400 Received: from comms.puri.sm ([159.203.221.185]:36872 "EHLO comms.puri.sm" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229505AbhKDLpt (ORCPT ); Thu, 4 Nov 2021 07:45:49 -0400 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id AE546DFE2F; Thu, 4 Nov 2021 04:43:11 -0700 (PDT) Received: from comms.puri.sm ([127.0.0.1]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id mES61NqjuTj8; Thu, 4 Nov 2021 04:43:11 -0700 (PDT) Date: Thu, 4 Nov 2021 12:41:53 +0100 From: Dorota Czaplejewicz To: Steve Longerbeam , Philipp Zabel , Mauro Carvalho Chehab , Greg Kroah-Hartman , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , linux-media@vger.kernel.org, linux-staging@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@puri.sm, phone-devel@vger.kernel.org Subject: [PATCH v4 1/5] media: imx: Remove unused functions Message-ID: <20211104113631.206899-1-dorota.czaplejewicz@puri.sm> Organization: Purism MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Neither imx_media_mbus_fmt_to_ipu_image nor imx_media_ipu_image_to_mbus_fmt were used anywhere. Signed-off-by: Dorota Czaplejewicz --- Hi, Compared to v3, this patch series introduces the checks of imx_media_find_mbus_format return values in patch 4 and 5. Cheers, Dorota drivers/staging/media/imx/imx-media-utils.c | 42 --------------------- drivers/staging/media/imx/imx-media.h | 4 -- 2 files changed, 46 deletions(-) diff --git a/drivers/staging/media/imx/imx-media-utils.c b/drivers/staging/media/imx/imx-media-utils.c index 5128915a5d6f..afa96e05ea7f 100644 --- a/drivers/staging/media/imx/imx-media-utils.c +++ b/drivers/staging/media/imx/imx-media-utils.c @@ -569,48 +569,6 @@ int imx_media_mbus_fmt_to_pix_fmt(struct v4l2_pix_format *pix, } EXPORT_SYMBOL_GPL(imx_media_mbus_fmt_to_pix_fmt); -int imx_media_mbus_fmt_to_ipu_image(struct ipu_image *image, - const struct v4l2_mbus_framefmt *mbus) -{ - int ret; - - memset(image, 0, sizeof(*image)); - - ret = imx_media_mbus_fmt_to_pix_fmt(&image->pix, mbus, NULL); - if (ret) - return ret; - - image->rect.width = mbus->width; - image->rect.height = mbus->height; - - return 0; -} -EXPORT_SYMBOL_GPL(imx_media_mbus_fmt_to_ipu_image); - -int imx_media_ipu_image_to_mbus_fmt(struct v4l2_mbus_framefmt *mbus, - const struct ipu_image *image) -{ - const struct imx_media_pixfmt *fmt; - - fmt = imx_media_find_pixel_format(image->pix.pixelformat, - PIXFMT_SEL_ANY); - if (!fmt || !fmt->codes || !fmt->codes[0]) - return -EINVAL; - - memset(mbus, 0, sizeof(*mbus)); - mbus->width = image->pix.width; - mbus->height = image->pix.height; - mbus->code = fmt->codes[0]; - mbus->field = image->pix.field; - mbus->colorspace = image->pix.colorspace; - mbus->xfer_func = image->pix.xfer_func; - mbus->ycbcr_enc = image->pix.ycbcr_enc; - mbus->quantization = image->pix.quantization; - - return 0; -} -EXPORT_SYMBOL_GPL(imx_media_ipu_image_to_mbus_fmt); - void imx_media_free_dma_buf(struct device *dev, struct imx_media_dma_buf *buf) { diff --git a/drivers/staging/media/imx/imx-media.h b/drivers/staging/media/imx/imx-media.h index 492d9a64e704..d2a150aac6cd 100644 --- a/drivers/staging/media/imx/imx-media.h +++ b/drivers/staging/media/imx/imx-media.h @@ -199,10 +199,6 @@ void imx_media_try_colorimetry(struct v4l2_mbus_framefmt *tryfmt, int imx_media_mbus_fmt_to_pix_fmt(struct v4l2_pix_format *pix, const struct v4l2_mbus_framefmt *mbus, const struct imx_media_pixfmt *cc); -int imx_media_mbus_fmt_to_ipu_image(struct ipu_image *image, - const struct v4l2_mbus_framefmt *mbus); -int imx_media_ipu_image_to_mbus_fmt(struct v4l2_mbus_framefmt *mbus, - const struct ipu_image *image); void imx_media_grp_id_to_sd_name(char *sd_name, int sz, u32 grp_id, int ipu_id); struct v4l2_subdev *