From patchwork Sun Mar 12 20:13:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=C3=A9r=C3=A9my_Lefaure?= X-Patchwork-Id: 9619535 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 5F5E260417 for ; Sun, 12 Mar 2017 20:14:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 50A222846B for ; Sun, 12 Mar 2017 20:14:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 4534C28480; Sun, 12 Mar 2017 20:14:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E4A1B2846B for ; Sun, 12 Mar 2017 20:14:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To :From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=AgMSBm5ZXR7BMZIOUw+mpNtjcJ11BWoR9BahU5E4DvE=; b=plFHHWLgnWygCm 5g6oFFpg2GKzVEOuzdRw4hnJ0IcJTHwJlk+aqXs3zpWF7VwVIE2SruCKB09D31WQeUzAw94rafh8B JpY86BorYYuGiQ7bqIx+gYn5m4ZgxSiZOj76aO6YFkCf6fxy7iCoJygb7SVa6hUOmxvFCyQkrgeAw 7NQxm6n+XEDO7LjwdZ8/AEhJEhN/ZcYfOets+ZhfqZoZo4tUNDWal5Sk+t9czxSqywyuHd77wdTmk JZu8u0oyRinSOI82KS2ME+sxse++ZUQ+jO3TQ0GJcBD4icmeW6ZsJMm5rVPIlJu0TH2oUG8gpz8if J8q3k+4QmwEDERv4zHlw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cn9t9-00068t-Ow; Sun, 12 Mar 2017 20:14:47 +0000 Received: from blatinox.fr ([51.254.120.209] helo=vps202351.ovh.net) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1cn9sa-0005o6-Hx; Sun, 12 Mar 2017 20:14:15 +0000 Received: from blatinox-laptop.uqo.local (unknown [132.213.170.29]) by vps202351.ovh.net (Postfix) with ESMTPA id 4412F1C00A; Sun, 12 Mar 2017 21:13:40 +0100 (CET) From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lefaure?= To: Rick Chang , Bin Liu , Mauro Carvalho Chehab , Matthias Brugger Subject: [PATCH] [media] vcodev: mediatek: add missing include in JPEG decoder driver Date: Sun, 12 Mar 2017 16:13:29 -0400 Message-Id: <20170312201329.28357-1-jeremy.lefaure@lse.epita.fr> X-Mailer: git-send-email 2.12.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170312_131412_758757_5BAB76AA X-CRM114-Status: UNSURE ( 9.00 ) X-CRM114-Notice: Please train this message. X-BeenThere: linux-mediatek@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: =?UTF-8?q?J=C3=A9r=C3=A9my=20Lefaure?= , linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-media@vger.kernel.org Sender: "Linux-mediatek" Errors-To: linux-mediatek-bounces+patchwork-linux-mediatek=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The driver uses kzalloc and kfree functions. So it should include linux/slab.h. This header file is implicitly included by v4l2-common.h if CONFIG_SPI is enabled. But when it is disabled, slab.h is not included. In this case, the driver does not compile: drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c: In function ‘mtk_jpeg_open’: drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c:1017:8: error: implicit declaration of function ‘kzalloc’ [-Werror=implicit-function-declaration] ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); ^~~~~~~ drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c:1017:6: warning: assignment makes pointer from integer without a cast [-Wint-conversion] ctx = kzalloc(sizeof(*ctx), GFP_KERNEL); ^ drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c:1047:2: error: implicit declaration of function ‘kfree’ [-Werror=implicit-function-declaration] kfree(ctx); ^~~~~ This patch adds the missing include to fix this issue. Signed-off-by: Jérémy Lefaure Acked-by: Rick Chang --- drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c index b10183f7942b..f9bd58ce7d32 100644 --- a/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c +++ b/drivers/media/platform/mtk-jpeg/mtk_jpeg_core.c @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include