From patchwork Sat May 17 06:32:49 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 4196021 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.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 9DED09F3D0 for ; Sat, 17 May 2014 06:34:47 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 385BF203F4 for ; Sat, 17 May 2014 06:34:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 5A5F7203E1 for ; Sat, 17 May 2014 06:34:45 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755848AbaEQGeW (ORCPT ); Sat, 17 May 2014 02:34:22 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:58836 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756527AbaEQGeU (ORCPT ); Sat, 17 May 2014 02:34:20 -0400 X-IronPort-AV: E=Sophos;i="4.98,1071,1392159600"; d="scan'208";a="74196242" Received: from palace.lip6.fr (HELO localhost.localdomain) ([132.227.105.202]) by mail2-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 17 May 2014 08:34:17 +0200 From: Julia Lawall To: Jean-Christophe Plagniol-Villard Cc: kernel-janitors@vger.kernel.org, Tomi Valkeinen , linux-fbdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/2] video: delete unneeded call to platform_get_drvdata Date: Sat, 17 May 2014 08:32:49 +0200 Message-Id: <1400308369-24375-2-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.8.3.2 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.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable 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 From: Julia Lawall Platform_get_drvdata is an accessor function, and has no purpose if its result is not used. The semantic patch that fixes this problem is as follows: (http://coccinelle.lip6.fr/) // @@ identifier x; type T; @@ - T x = platform_get_drvdata(...); ... when != x // Signed-off-by: Julia Lawall --- drivers/video/fbdev/bf54x-lq043fb.c | 2 -- 1 file changed, 2 deletions(-) -- To unsubscribe from this list: send the line "unsubscribe linux-fbdev" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/drivers/video/fbdev/bf54x-lq043fb.c b/drivers/video/fbdev/bf54x-lq043fb.c index e2c42ad..adbef54 100644 --- a/drivers/video/fbdev/bf54x-lq043fb.c +++ b/drivers/video/fbdev/bf54x-lq043fb.c @@ -717,8 +717,6 @@ static int bfin_bf54x_remove(struct platform_device *pdev) #ifdef CONFIG_PM static int bfin_bf54x_suspend(struct platform_device *pdev, pm_message_t state) { - struct fb_info *fbinfo = platform_get_drvdata(pdev); - bfin_write_EPPI0_CONTROL(bfin_read_EPPI0_CONTROL() & ~EPPI_EN); disable_dma(CH_EPPI0); bfin_write_EPPI0_STATUS(0xFFFF);