From patchwork Sun Aug 26 16:15:51 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julia Lawall X-Patchwork-Id: 1375651 Return-Path: X-Original-To: patchwork-linux-media@patchwork.kernel.org Delivered-To: patchwork-process-083081@patchwork2.kernel.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by patchwork2.kernel.org (Postfix) with ESMTP id D99F7E006C for ; Sun, 26 Aug 2012 16:17:00 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752900Ab2HZQP7 (ORCPT ); Sun, 26 Aug 2012 12:15:59 -0400 Received: from mail1-relais-roc.national.inria.fr ([192.134.164.82]:18738 "EHLO mail1-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750908Ab2HZQP6 (ORCPT ); Sun, 26 Aug 2012 12:15:58 -0400 X-IronPort-AV: E=Sophos;i="4.80,316,1344204000"; d="scan'208";a="170851380" Received: from palace.lip6.fr (HELO localhost.localdomain) ([132.227.105.202]) by mail1-relais-roc.national.inria.fr with ESMTP/TLS/DHE-RSA-AES256-SHA; 26 Aug 2012 18:15:56 +0200 From: Julia Lawall To: Mauro Carvalho Chehab Cc: kernel-janitors@vger.kernel.org, linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, crope@iki.fi, awalls@md.metrocast.net Subject: [PATCH] drivers/media/dvb-frontends/rtl2830.c: correct double assignment Date: Sun, 26 Aug 2012 18:15:51 +0200 Message-Id: <1345997751-340-1-git-send-email-Julia.Lawall@lip6.fr> X-Mailer: git-send-email 1.7.8.6 Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org From: Julia Lawall The double assignment is meant to be a bit-or to combine two values. A simplified version of the semantic match that finds this problem is as follows: (http://coccinelle.lip6.fr/) // @@ expression i; @@ *i = ...; i = ...; // Signed-off-by: Julia Lawall Acked-by: Antti Palosaari Reviewed-by: Antti Palosaari --- drivers/media/dvb-frontends/rtl2830.c | 2 +- 1 file changed, 1 insertion(+), 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/rtl2830.c b/drivers/media/dvb-frontends/rtl2830.c index 8fa8b08..b6ab858 100644 --- a/drivers/media/dvb-frontends/rtl2830.c +++ b/drivers/media/dvb-frontends/rtl2830.c @@ -254,7 +254,7 @@ static int rtl2830_init(struct dvb_frontend *fe) goto err; buf[0] = tmp << 6; - buf[0] = (if_ctl >> 16) & 0x3f; + buf[0] |= (if_ctl >> 16) & 0x3f; buf[1] = (if_ctl >> 8) & 0xff; buf[2] = (if_ctl >> 0) & 0xff;