From patchwork Sun Jul 6 18:58:14 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4491461 Return-Path: X-Original-To: patchwork-linux-fbdev@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork2.web.kernel.org (Postfix) with ESMTP id BE43ABEEAA for ; Sun, 6 Jul 2014 18:57:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 07AA020253 for ; Sun, 6 Jul 2014 18:57:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 9E4AA2024C for ; Sun, 6 Jul 2014 18:57:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752166AbaGFS5A (ORCPT ); Sun, 6 Jul 2014 14:57:00 -0400 Received: from mail-we0-f182.google.com ([74.125.82.182]:39486 "EHLO mail-we0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751915AbaGFS47 (ORCPT ); Sun, 6 Jul 2014 14:56:59 -0400 Received: by mail-we0-f182.google.com with SMTP id q59so3490672wes.27 for ; Sun, 06 Jul 2014 11:56:58 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=z5yFZ6IUuZq43istlIZv0ReAxRq84j2hhewenP/duec=; b=HVOuNWoozwQBK4+2/p8Io1I//dalkujhg8CH7TOG74xcJZRWqLfzwFJv0fhJWFw8OS mZCSG9dizTPs8N1fNp631bZk/0PppH+UnLOLuCThV377StnVf1wf4JfZlX4JWRvbUrTJ rdCSZyNsULICkaIXkOX+LfLvgb2Jt8cUW9Qs806gDNMT/TbrDYsmWx8gaNBsWWGAUjQ7 U2fHdOI2oX6PjLrC/mJgOEd7q48Fe5M72htW5GODRkudgu/CG+kk9KpmhtKpttrk4PFv KoYSmrQgGOxzJqZm9ZgeCPkgjY7o6OQnNZebCyfOn3gz48YOi99boeuQTaLgCkaarIvW OCAw== X-Gm-Message-State: ALoCoQk7K4mewCiNWL2gctFV0FA8rr6spA6lZ8rQDvnX7pim5TMSozvhM/qWwkacvBoISmZ/N+NV X-Received: by 10.180.75.47 with SMTP id z15mr18130221wiv.80.1404673018285; Sun, 06 Jul 2014 11:56:58 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id lq17sm5115938wic.19.2014.07.06.11.56.56 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Jul 2014 11:56:57 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Jingoo Han , Laurent Pinchart , Rob Clark , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: fbdev: savage: savagefb_driver.c: Cleaning up variable that is never used Date: Sun, 6 Jul 2014 20:58:14 +0200 Message-Id: <1404673094-20329-1-git-send-email-rickard_strandqvist@spectrumdigital.se> X-Mailer: git-send-email 1.7.10.4 Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.6 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, 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 Variable ar assigned a value that is never used. I have also removed all the code that thereby serves no purpose. This was found using a static code analysis program called cppcheck Signed-off-by: Rickard Strandqvist --- drivers/video/fbdev/savage/savagefb_driver.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/video/fbdev/savage/savagefb_driver.c b/drivers/video/fbdev/savage/savagefb_driver.c index 4dbf45f..5c7620e 100644 --- a/drivers/video/fbdev/savage/savagefb_driver.c +++ b/drivers/video/fbdev/savage/savagefb_driver.c @@ -951,8 +951,6 @@ static int savagefb_check_var(struct fb_var_screeninfo *var, if (memlen > vramlen) { var->yres_virtual = vramlen * 8 / (var->xres_virtual * var->bits_per_pixel); - memlen = var->xres_virtual * var->bits_per_pixel * - var->yres_virtual / 8; } /* we must round yres/xres down, we already rounded y/xres_virtual up