From patchwork Thu Mar 22 11:30:47 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mauro Carvalho Chehab X-Patchwork-Id: 10301273 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 A616560216 for ; Thu, 22 Mar 2018 11:31:22 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9847629B58 for ; Thu, 22 Mar 2018 11:31:22 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 8D1A729B65; Thu, 22 Mar 2018 11:31:22 +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=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.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 F2A1F29B58 for ; Thu, 22 Mar 2018 11:31:21 +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:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: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=KOKKzY5JGovJ1kvyvMMUjb2Z6TELIgx9qfrdlCP/kdc=; b=FfU K7Vut8PABcDf9ACO5i6R33JM+Y1LTFkr3nhP8Dh3U5ZMS/TVIaNttXV+WxV40S+sv46GFRdxyvwxJ RUYbPuuS//hy3zN0f3CsSCbJKfMyHAK2fRNUumLkWBFlGKgKrWx5vfdx2afjwFyHoVXV5PvtBdNLs bZbpHOzLyCuxh12sYuUVqhWeARIjU1IQCMWAIAZU296Go+jOZ4Mu7aEmwpRYbxWJjO5eaSDxnOL9B DgDgSmBoverDL7h9KiRV3WJ7nE8cyNXWjTl6fdT+Mcut0fFnTVp1w8CU2kqFCDbGiQByGevg0iCPm HLCKEJqxNhYzjWBeAllfosXWXRGCnXw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1eyyR3-00058E-DZ; Thu, 22 Mar 2018 11:31:09 +0000 Received: from osg.samsung.com ([64.30.133.232]) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1eyyQy-000567-Nz for linux-arm-kernel@lists.infradead.org; Thu, 22 Mar 2018 11:31:07 +0000 Received: from localhost (localhost [127.0.0.1]) by osg.samsung.com (Postfix) with ESMTP id 35FE926DD5; Thu, 22 Mar 2018 04:30:52 -0700 (PDT) X-Virus-Scanned: Debian amavisd-new at dev.s-opensource.com Received: from osg.samsung.com ([127.0.0.1]) by localhost (localhost [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HNtzqwvhY_Qs; Thu, 22 Mar 2018 04:30:51 -0700 (PDT) Received: from smtp.s-opensource.com (unknown [179.183.96.62]) by osg.samsung.com (Postfix) with ESMTPSA id F2DEA26DCD; Thu, 22 Mar 2018 04:30:50 -0700 (PDT) Received: from mchehab by smtp.s-opensource.com with local (Exim 4.90_1) (envelope-from ) id 1eyyQi-0000Cu-E4; Thu, 22 Mar 2018 07:30:48 -0400 From: Mauro Carvalho Chehab To: Subject: [PATCH] media: s5p_mfc_enc: get rid of new warnings Date: Thu, 22 Mar 2018 07:30:47 -0400 Message-Id: <93eaf301a7d2c992595baf54c1ae8b835c7bf4df.1521718244.git.mchehab@s-opensource.com> X-Mailer: git-send-email 2.14.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180322_043104_806229_7C11A8CD X-CRM114-Status: GOOD ( 11.87 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Andrzej Hajda , Kamil Debski , Mauro Carvalho Chehab , Mauro Carvalho Chehab , Jeongtae Park , Kyungmin Park , linux-arm-kernel@lists.infradead.org, Linux Media Mailing List MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP The values of enc_y_addr and enc_c_addr are initialized by s5p_mfc_hw_call(), but, in thesis, this macro might be doing nothing, if the get_enc_frame_buffer() is not declared. That causes those GCC warnings: drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:1242 enc_post_frame_start() error: uninitialized symbol 'enc_y_addr'. drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:1243 enc_post_frame_start() error: uninitialized symbol 'enc_c_addr'. drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:1256 enc_post_frame_start() error: uninitialized symbol 'enc_y_addr'. drivers/media/platform/s5p-mfc/s5p_mfc_enc.c:1257 enc_post_frame_start() error: uninitialized symbol 'enc_c_addr'. Change the logic by initializing those constants to zero, with should hopefully do the right thing. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/platform/s5p-mfc/s5p_mfc_enc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c index 7382b41f4f6d..5c0462ca9993 100644 --- a/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c +++ b/drivers/media/platform/s5p-mfc/s5p_mfc_enc.c @@ -1220,7 +1220,7 @@ static int enc_post_frame_start(struct s5p_mfc_ctx *ctx) { struct s5p_mfc_dev *dev = ctx->dev; struct s5p_mfc_buf *mb_entry; - unsigned long enc_y_addr, enc_c_addr; + unsigned long enc_y_addr = 0, enc_c_addr = 0; unsigned long mb_y_addr, mb_c_addr; int slice_type; unsigned int strm_size;