From patchwork Sun Jun 20 13:40:37 2010 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 3677 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Sun, 20 Jun 2010 13:40:55 +0000 Received: from bombadil.infradead.org [18.85.46.34] by pedra with IMAP (fetchmail-6.3.17) for (single-drop); Sun, 20 Jun 2010 12:06:31 -0300 (BRT) Received: from vger.kernel.org ([209.132.180.67]) by bombadil.infradead.org with esmtp (Exim 4.72 #1 (Red Hat Linux)) id 1OQKlb-0006Jv-GU; Sun, 20 Jun 2010 13:40:55 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754654Ab0FTNkn (ORCPT + 1 other); Sun, 20 Jun 2010 09:40:43 -0400 Received: from mgw1.diku.dk ([130.225.96.91]:58643 "EHLO mgw1.diku.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754567Ab0FTNkm (ORCPT ); Sun, 20 Jun 2010 09:40:42 -0400 Received: from localhost (localhost [127.0.0.1]) by mgw1.diku.dk (Postfix) with ESMTP id 98B0652C3D9; Sun, 20 Jun 2010 15:40:41 +0200 (CEST) Received: from mgw1.diku.dk ([127.0.0.1]) by localhost (mgw1.diku.dk [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xUax0kJ04QU5; Sun, 20 Jun 2010 15:40:37 +0200 (CEST) Received: from nhugin.diku.dk (nhugin.diku.dk [130.225.96.140]) by mgw1.diku.dk (Postfix) with ESMTP id 5286652C352; Sun, 20 Jun 2010 15:40:37 +0200 (CEST) Received: from ask.diku.dk (ask.diku.dk [130.225.96.225]) by nhugin.diku.dk (Postfix) with ESMTP id 619336DF8B9; Sun, 20 Jun 2010 15:32:38 +0200 (CEST) Received: by ask.diku.dk (Postfix, from userid 3767) id 369FF200BF; Sun, 20 Jun 2010 15:40:37 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by ask.diku.dk (Postfix) with ESMTP id 2E515200BD; Sun, 20 Jun 2010 15:40:37 +0200 (CEST) Date: Sun, 20 Jun 2010 15:40:37 +0200 (CEST) From: Julia Lawall To: Mauro Carvalho Chehab , linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, kernel-janitors@vger.kernel.org Subject: [PATCH 3/3] drivers/media/dvb/frontends: remove duplicate structure field initialization Message-ID: MIME-Version: 1.0 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Julia Lawall The read_status field is initialized twice to the same value. The semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @r@ identifier I, s, fld; position p0,p; expression E; @@ struct I s =@p0 { ... .fld@p = E, ...}; @s@ identifier I, s, r.fld; position r.p0,p; expression E; @@ struct I s =@p0 { ... .fld@p = E, ...}; @script:python@ p0 << r.p0; fld << r.fld; ps << s.p; pr << r.p; @@ if int(ps[0].line) Signed-off-by: Julia Lawall --- drivers/media/dvb/frontends/mb86a16.c | 1 - 1 file changed, 1 deletion(-) -- To unsubscribe from this list: send the line "unsubscribe linux-media" 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/media/dvb/frontends/mb86a16.c b/drivers/media/dvb/frontends/mb86a16.c index 599d1aa..33b6323 100644 --- a/drivers/media/dvb/frontends/mb86a16.c +++ b/drivers/media/dvb/frontends/mb86a16.c @@ -1833,7 +1833,6 @@ static struct dvb_frontend_ops mb86a16_ops = { .get_frontend_algo = mb86a16_frontend_algo, .search = mb86a16_search, - .read_status = mb86a16_read_status, .init = mb86a16_init, .sleep = mb86a16_sleep, .read_status = mb86a16_read_status,