From patchwork Mon Apr 17 05:39:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 675513 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 5E286C77B61 for ; Mon, 17 Apr 2023 05:39:46 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229649AbjDQFjp (ORCPT ); Mon, 17 Apr 2023 01:39:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32874 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbjDQFjo (ORCPT ); Mon, 17 Apr 2023 01:39:44 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [213.167.242.64]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 560152716 for ; Sun, 16 Apr 2023 22:39:43 -0700 (PDT) Received: from pendragon.ideasonboard.com (133-32-181-51.west.xps.vectant.ne.jp [133.32.181.51]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 4993475B; Mon, 17 Apr 2023 07:39:36 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1681709977; bh=XDa7VJ3I/inyle7/5V5aXyj+O+kztYuYY7X9SndG96A=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=owMEQh+XSRi3WORIhttd24OUOPAYDEU6rJlt6tj0vXrYa2dwtesMddXjDiLWQzNsL moeFBKadwvSczuXMvLuKA1jtZpijlzuH3hX1sxxzNmerAieo9MbsxnKU9tJcdCDnEs soGz6u8Gq+64hTlMYKYwSymaGw6tlcsazBg64LT8= From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: Jacopo Mondi , Xavier Roumegue , linux-imx@nxp.com, kernel@pengutronix.de Subject: [PATCH v1 1/2] media: nxp: imx8-isi: Mark PM functions as __maybe_unused Date: Mon, 17 Apr 2023 08:39:48 +0300 Message-Id: <20230417053949.7395-2-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230417053949.7395-1-laurent.pinchart@ideasonboard.com> References: <20230417053949.7395-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org The system and runtime PM handler may be unused, depending on the kernel configuration. Mark them as such. Signed-off-by: Laurent Pinchart --- drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c index 238521622b75..a99c5fee6773 100644 --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-core.c @@ -311,7 +311,7 @@ static const struct mxc_isi_plat_data mxc_imx8mp_data = { * Power management */ -static int mxc_isi_pm_suspend(struct device *dev) +static int __maybe_unused mxc_isi_pm_suspend(struct device *dev) { struct mxc_isi_dev *isi = dev_get_drvdata(dev); unsigned int i; @@ -325,7 +325,7 @@ static int mxc_isi_pm_suspend(struct device *dev) return pm_runtime_force_suspend(dev); } -static int mxc_isi_pm_resume(struct device *dev) +static int __maybe_unused mxc_isi_pm_resume(struct device *dev) { struct mxc_isi_dev *isi = dev_get_drvdata(dev); unsigned int i; @@ -354,7 +354,7 @@ static int mxc_isi_pm_resume(struct device *dev) return err; } -static int mxc_isi_runtime_suspend(struct device *dev) +static int __maybe_unused mxc_isi_runtime_suspend(struct device *dev) { struct mxc_isi_dev *isi = dev_get_drvdata(dev); @@ -363,7 +363,7 @@ static int mxc_isi_runtime_suspend(struct device *dev) return 0; } -static int mxc_isi_runtime_resume(struct device *dev) +static int __maybe_unused mxc_isi_runtime_resume(struct device *dev) { struct mxc_isi_dev *isi = dev_get_drvdata(dev); int ret; From patchwork Mon Apr 17 05:39:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurent Pinchart X-Patchwork-Id: 674320 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id E4792C77B61 for ; Mon, 17 Apr 2023 05:39:55 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229741AbjDQFju (ORCPT ); Mon, 17 Apr 2023 01:39:50 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32926 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229498AbjDQFjt (ORCPT ); Mon, 17 Apr 2023 01:39:49 -0400 Received: from perceval.ideasonboard.com (perceval.ideasonboard.com [IPv6:2001:4b98:dc2:55:216:3eff:fef7:d647]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 774AD107 for ; Sun, 16 Apr 2023 22:39:48 -0700 (PDT) Received: from pendragon.ideasonboard.com (133-32-181-51.west.xps.vectant.ne.jp [133.32.181.51]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id 26EA275B; Mon, 17 Apr 2023 07:39:40 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1681709982; bh=BZTKOKFrNJkEecKtw0hCir4UXljnbHWgZw2hBGRB5Gk=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=QbAU2hswk0BHj+C3BhbDG5ZiOiaMeGYgFyaTgZPgI/ccB02XO732LtxZvs1vmSiQx aHY50F9WuH9CkvjkdVXZXfYcKopG1ZCGCqv1fXKfgDHyKl4N7HEg431tgoMu2ZLRsY Cwv5LxmkdmNS1Z9xNrjc0wCZRao6r+5reVQS0glM= From: Laurent Pinchart To: linux-media@vger.kernel.org Cc: Jacopo Mondi , Xavier Roumegue , linux-imx@nxp.com, kernel@pengutronix.de Subject: [PATCH v1 2/2] media: nxp: imx8-isi: Use #ifdef to test CONFIG_ARCH_DMA_ADDR_T_64BIT Date: Mon, 17 Apr 2023 08:39:49 +0300 Message-Id: <20230417053949.7395-3-laurent.pinchart@ideasonboard.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230417053949.7395-1-laurent.pinchart@ideasonboard.com> References: <20230417053949.7395-1-laurent.pinchart@ideasonboard.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org As the CONFIG_ARCH_DMA_ADDR_T_64BIT macro is not defined when the corresponding kernel option is disabled, using #if will trigger a compiler warning. Use #ifdef instead. Signed-off-by: Laurent Pinchart --- drivers/media/platform/nxp/imx8-isi/imx8-isi-hw.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/nxp/imx8-isi/imx8-isi-hw.c b/drivers/media/platform/nxp/imx8-isi/imx8-isi-hw.c index db538f3d88ec..1d59f4a0256b 100644 --- a/drivers/media/platform/nxp/imx8-isi/imx8-isi-hw.c +++ b/drivers/media/platform/nxp/imx8-isi/imx8-isi-hw.c @@ -30,7 +30,7 @@ static inline void mxc_isi_write(struct mxc_isi_pipe *pipe, u32 reg, u32 val) void mxc_isi_channel_set_inbuf(struct mxc_isi_pipe *pipe, dma_addr_t dma_addr) { mxc_isi_write(pipe, CHNL_IN_BUF_ADDR, dma_addr); -#if CONFIG_ARCH_DMA_ADDR_T_64BIT +#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT if (pipe->isi->pdata->has_36bit_dma) mxc_isi_write(pipe, CHNL_IN_BUF_XTND_ADDR, dma_addr >> 32); #endif @@ -48,7 +48,7 @@ void mxc_isi_channel_set_outbuf(struct mxc_isi_pipe *pipe, mxc_isi_write(pipe, CHNL_OUT_BUF1_ADDR_Y, dma_addrs[0]); mxc_isi_write(pipe, CHNL_OUT_BUF1_ADDR_U, dma_addrs[1]); mxc_isi_write(pipe, CHNL_OUT_BUF1_ADDR_V, dma_addrs[2]); -#if CONFIG_ARCH_DMA_ADDR_T_64BIT +#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT if (pipe->isi->pdata->has_36bit_dma) { mxc_isi_write(pipe, CHNL_Y_BUF1_XTND_ADDR, dma_addrs[0] >> 32); @@ -63,7 +63,7 @@ void mxc_isi_channel_set_outbuf(struct mxc_isi_pipe *pipe, mxc_isi_write(pipe, CHNL_OUT_BUF2_ADDR_Y, dma_addrs[0]); mxc_isi_write(pipe, CHNL_OUT_BUF2_ADDR_U, dma_addrs[1]); mxc_isi_write(pipe, CHNL_OUT_BUF2_ADDR_V, dma_addrs[2]); -#if CONFIG_ARCH_DMA_ADDR_T_64BIT +#ifdef CONFIG_ARCH_DMA_ADDR_T_64BIT if (pipe->isi->pdata->has_36bit_dma) { mxc_isi_write(pipe, CHNL_Y_BUF2_XTND_ADDR, dma_addrs[0] >> 32);