From patchwork Tue Mar 10 17:16:56 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sudip Mukherjee X-Patchwork-Id: 5979561 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 592BE9F399 for ; Tue, 10 Mar 2015 17:18:16 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 99D9420220 for ; Tue, 10 Mar 2015 17:18:15 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id CC3BD20109 for ; Tue, 10 Mar 2015 17:18:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752772AbbCJRRq (ORCPT ); Tue, 10 Mar 2015 13:17:46 -0400 Received: from mail-pd0-f171.google.com ([209.85.192.171]:40841 "EHLO mail-pd0-f171.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753348AbbCJRRY (ORCPT ); Tue, 10 Mar 2015 13:17:24 -0400 Received: by pdbfp1 with SMTP id fp1so3761644pdb.7; Tue, 10 Mar 2015 10:17:23 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=oRb/zDtqJ/nyOcy4sW+cjMx27aYRETTtrbDw4C0+LXE=; b=MrvDXVarkAa/MwwdggL/Ed905E4hg3cbT/pkkBUQoDYeyAKXk0H/w0GekI61Sl3v10 AX2f8m/3Zzi71XEZYSuxPdC/1Drn2+HiYYztGbGlEc1kutSCzpSwGAN9bSWGunmL8zt4 zKwP5jJqVEXgU+EXjKL2reYv1cTifk+Qd1TG9ImF/Ynl5fv4Z6nkbL1qyKir4KUcCFB8 yO9Y0A8HMIpyLAoqgWMsQXK1nIeOjksTByORky0UWDXoIwgtcD3K3kFZqVaZoA5oMuUQ Tbi6xmQt3nk/r6EHVYBjd15iBF9yorGc/V7dZ7IxURRAutMtpnVQ/SL2OauJTdShgTKM DrcA== X-Received: by 10.66.159.138 with SMTP id xc10mr68326846pab.141.1426007843622; Tue, 10 Mar 2015 10:17:23 -0700 (PDT) Received: from localhost.localdomain ([122.169.145.94]) by mx.google.com with ESMTPSA id kd9sm2087506pab.0.2015.03.10.10.17.21 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 10 Mar 2015 10:17:23 -0700 (PDT) From: Sudip Mukherjee To: Greg Kroah-Hartman Cc: linux-fbdev@vger.kernel.org, devel@driverdev.osuosl.org, linux-kernel@vger.kernel.org, Sudip Mukherjee Subject: [PATCH 5/6] staging: sm750fb: fix mixed declarations Date: Tue, 10 Mar 2015 22:46:56 +0530 Message-Id: <1426007817-1884-6-git-send-email-sudipm.mukherjee@gmail.com> X-Mailer: git-send-email 1.8.1.2 In-Reply-To: <1426007817-1884-1-git-send-email-sudipm.mukherjee@gmail.com> References: <1426007817-1884-1-git-send-email-sudipm.mukherjee@gmail.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-6.8 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP we were getting build warning about mixed declaration. the variable is now declared at the beginning of the block. Signed-off-by: Sudip Mukherjee --- drivers/staging/sm750fb/sm750.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index 87029b6..021b863 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -1175,6 +1175,7 @@ ALLOC_FB: else { struct lynxfb_par * par; + int errno; pr_info("framebuffer #%d alloc okay\n",fbidx); share->fbinfo[fbidx] = info[fbidx]; par = info[fbidx]->par; @@ -1191,7 +1192,7 @@ ALLOC_FB: /* register frame buffer*/ pr_info("Ready to register framebuffer #%d.\n",fbidx); - int errno = register_framebuffer(info[fbidx]); + errno = register_framebuffer(info[fbidx]); if (errno < 0) { pr_err("Failed to register fb_info #%d. err %d\n",fbidx, errno); if(fbidx == 0)