From patchwork Mon Nov 7 15:41:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Shuah Khan X-Patchwork-Id: 9415419 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 2874160585 for ; Mon, 7 Nov 2016 15:43:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1BBA32869B for ; Mon, 7 Nov 2016 15:43:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 1087C289D2; Mon, 7 Nov 2016 15:43:05 +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=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id BC8022869B for ; Mon, 7 Nov 2016 15:43:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932385AbcKGPlV (ORCPT ); Mon, 7 Nov 2016 10:41:21 -0500 Received: from resqmta-po-03v.sys.comcast.net ([96.114.154.162]:51449 "EHLO resqmta-po-03v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932369AbcKGPlU (ORCPT ); Mon, 7 Nov 2016 10:41:20 -0500 Received: from resomta-po-13v.sys.comcast.net ([96.114.154.237]) by resqmta-po-03v.sys.comcast.net with SMTP id 3m2xcZs13zd8U3m2xcxd1I; Mon, 07 Nov 2016 15:41:19 +0000 Received: from mail.gonehiking.org ([73.181.52.62]) by resomta-po-13v.sys.comcast.net with SMTP id 3m2vck54domG23m2wc6ZDM; Mon, 07 Nov 2016 15:41:19 +0000 Received: from localhost.localdomain (shuah-xps.internal [192.168.1.87]) by mail.gonehiking.org (Postfix) with ESMTP id 196419F2D9; Mon, 7 Nov 2016 08:41:16 -0700 (MST) From: Shuah Khan To: mchehab@kernel.org, javier@osg.samsung.com, arnd@arndb.de, sean@mess.org Cc: Shuah Khan , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] media: Fix get_key_haup_common.isra.4() debug message to print ptoggle value Date: Mon, 7 Nov 2016 08:41:11 -0700 Message-Id: <20161107154114.26803-1-shuahkh@osg.samsung.com> X-Mailer: git-send-email 2.9.3 MIME-Version: 1.0 X-CMAE-Envelope: MS4wfMKfTANDSya8bLnlYf6Znw97R/v0GgyR7+0GzFiPW9fVCbHsGfkwDgPFcey1ljXWQ/lC8FRkgyoYYrwIvLI7W3p+lEwqSH2TRx/8A3O+0qBCbDk6LiUl PPs61fntzYZRywgv9bu90kjYTsd82Qhae8TPknXojzJUNvMcuTN0a+cYnUFqGfBk/ZvKkN/JlqsTkA21qIzIMQ3b5w/OojMbnaZtUqKgV2KaxM5L/M8xgxUp YACdqbB6DjoPpe/yZWgkaxiX3c2gXRqPp6R/K3OQrDmQxRBuJ9DHt/zpxgdL38RC3lU/i6YnwXulMOuuE/s2MCh4zdeaUB0JnwurTisE5lbJDpMtDSiaFlyO f5o1rQ1itzZj5LpebuosOlNDNI48vQ== Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Fix the debug message in get_key_haup_common.isra.4() doesn't print the correct toggle value. Fix it. This shows up as an used uninitialized warn message: drivers/media/i2c/ir-kbd-i2c.c: In function ‘get_key_haup_common.isra.4’: drivers/media/i2c/ir-kbd-i2c.c:62:2: warning: ‘toggle’ may be used uninitialized in this function [-Wmaybe-uninitialized] printk(KERN_DEBUG MODULE_NAME ": " fmt , ## arg) ^~~~~~ drivers/media/i2c/ir-kbd-i2c.c:70:20: note: ‘toggle’ was declared here int start, range, toggle, dev, code, ircode, vendor; ^~~~~~ Signed-off-by: Shuah Khan --- drivers/media/i2c/ir-kbd-i2c.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/ir-kbd-i2c.c b/drivers/media/i2c/ir-kbd-i2c.c index f95a6bc..cede397 100644 --- a/drivers/media/i2c/ir-kbd-i2c.c +++ b/drivers/media/i2c/ir-kbd-i2c.c @@ -118,7 +118,7 @@ static int get_key_haup_common(struct IR_i2c *ir, enum rc_type *protocol, *protocol = RC_TYPE_RC6_MCE; dev &= 0x7f; dprintk(1, "ir hauppauge (rc6-mce): t%d vendor=%d dev=%d code=%d\n", - toggle, vendor, dev, code); + *ptoggle, vendor, dev, code); } else { *ptoggle = 0; *protocol = RC_TYPE_RC6_6A_32;