From patchwork Sun Jul 6 18:23:51 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rickard Strandqvist X-Patchwork-Id: 4490521 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 67B19BEEAA for ; Sun, 6 Jul 2014 18:22:51 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 8AB70202A1 for ; Sun, 6 Jul 2014 18:22:50 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AE9002022D for ; Sun, 6 Jul 2014 18:22:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751987AbaGFSWg (ORCPT ); Sun, 6 Jul 2014 14:22:36 -0400 Received: from mail-wg0-f42.google.com ([74.125.82.42]:58580 "EHLO mail-wg0-f42.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751915AbaGFSWg (ORCPT ); Sun, 6 Jul 2014 14:22:36 -0400 Received: by mail-wg0-f42.google.com with SMTP id n12so1662607wgh.25 for ; Sun, 06 Jul 2014 11:22:35 -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=Cphw+FdXEOm4DZGXvm4nKXykqwjiuJGOHslEtn5tPnw=; b=O0EhLWU2iEBLFrEHzhz7zb+WAplQqpRdXPej61Gx6lphsQoELzfOZsmRUMG2DLSFf0 Gn6xDZwMLm0O00lxV9FCibvWutbGlD8hx28VTLUM9k/tsmUtZr9AvGbTodcJ0szIQY2W Gtf7h5ZvwzF3vyzpauzzZR7JwORkLMF0fvf4SjyVG4nsIW3d1Ac9G0f0S9v8m2t9Us8y rHhYagBBfysYr5HVECg8Uqot0Uf7PD2vAPrnn+6JhWMFvyQGq8dzSE17852VOSiYiFZG 9P5T7QGONhqI831FMwAnn0d6ZqfhSGRCxxDOpqrAFrRTeUYhXVeNEvI5ofLka4h5AecP VX2A== X-Gm-Message-State: ALoCoQn+aDDSTt3gE2yzjluAab+HEFsAqbKe6UBJETWumCIteydYObk9DziW8L/TS8bu3diqDydF X-Received: by 10.194.57.132 with SMTP id i4mr25871447wjq.6.1404670955056; Sun, 06 Jul 2014 11:22:35 -0700 (PDT) Received: from localhost.localdomain (h-245-62.a218.priv.bahnhof.se. [85.24.245.62]) by mx.google.com with ESMTPSA id fb8sm105606854wib.15.2014.07.06.11.22.33 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 06 Jul 2014 11:22:34 -0700 (PDT) From: Rickard Strandqvist To: Jean-Christophe Plagniol-Villard , Tomi Valkeinen Cc: Rickard Strandqvist , Geert Uytterhoeven , Jingoo Han , Daniel Vetter , Joe Perches , Michael Schmitz , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH] video: fbdev: atafb.c: Cleaning up variable that is never used Date: Sun, 6 Jul 2014 20:23:51 +0200 Message-Id: <1404671031-17505-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/atafb.c | 8 -------- 1 file changed, 8 deletions(-) diff --git a/drivers/video/fbdev/atafb.c b/drivers/video/fbdev/atafb.c index 4953b65..1bedbf35 100644 --- a/drivers/video/fbdev/atafb.c +++ b/drivers/video/fbdev/atafb.c @@ -2546,7 +2546,6 @@ static void atafb_copyarea(struct fb_info *info, const struct fb_copyarea *area) struct atafb_par *par = (struct atafb_par *)info->par; int x2, y2; u32 dx, dy, sx, sy, width, height; - int rev_copy = 0; #ifdef ATAFB_FALCON if (info->var.bits_per_pixel == 16) { @@ -2580,7 +2579,6 @@ static void atafb_copyarea(struct fb_info *info, const struct fb_copyarea *area) if (dy > sy || (dy == sy && dx > sx)) { dy += height; sy += height; - rev_copy = 1; } if (info->var.bits_per_pixel == 1) @@ -2599,8 +2597,6 @@ static void atafb_imageblit(struct fb_info *info, const struct fb_image *image) { struct atafb_par *par = (struct atafb_par *)info->par; int x2, y2; - unsigned long *dst; - int dst_idx; const char *src; u32 dx, dy, width, height, pitch; @@ -2627,10 +2623,6 @@ static void atafb_imageblit(struct fb_info *info, const struct fb_image *image) if (image->depth == 1) { // used for font data - dst = (unsigned long *) - ((unsigned long)info->screen_base & ~(BYTES_PER_LONG - 1)); - dst_idx = ((unsigned long)info->screen_base & (BYTES_PER_LONG - 1)) * 8; - dst_idx += dy * par->next_line * 8 + dx; src = image->data; pitch = (image->width + 7) / 8; while (height--) {