Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp1006529ybi; Fri, 2 Aug 2019 07:51:58 -0700 (PDT) X-Google-Smtp-Source: APXvYqyVVDw7jJ/pTfsxbn9XORBhfMqI731NSn3f3MENo6hbrPho5qvnVW7e088Ljs8p2osgsm6R X-Received: by 2002:a17:90a:374a:: with SMTP id u68mr4731825pjb.4.1564757518485; Fri, 02 Aug 2019 07:51:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564757518; cv=none; d=google.com; s=arc-20160816; b=cdAbG55Nu3/vrS2/CKXAw4JB88UDSxTO8JYkUCHWQek5LhaHOfLnnpCa5Q1KDPyd/c 3jt0vpBYAJb04bf1LU5KZ6olRFgTtMu3JraV1T8n9ahQ6xTwRE4dHb3tQL9biCyjBvQx 6vECWrwyX9SPNgePjvCmwVDQPRFaeyw+lCiVbDNIsVc22r4PLBJNgD4gbTqmIXsaU0qD V/1UvsBWuTp6bGegRIanP6a71tm3FF2vO0dtPdkHnZtxZzOGbXvkfr9LVf34z6Phojtf K1VLMGjR5ZZ6eH4lLtTzZoA1gvKQGpUtEI6ckyzcozGesGqtIwDqTQYg9FSYn/u7ny5N hKMw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=yhv7I2N3a3tqQ6yKUupAlsamNmwMdh7n7sH4/XEGFQo=; b=0DwrGoPsu5u3rkWXzla78HcsWCH2sgQ3JXaa7OxMqCkp9i6Wc3R8jl1rQopeFWVVZB k+7Gcj0fITu/HogyhmuF2A0lDyE4SdDsNTVR+wVV8usAk30yMy+gAbvE2VRdAdDdU51G ok6kXhaIJ8Cl7r16qz/Wpvb9nCpWiA7ED9sK7ErTl/AXAB/b7bo+kVgpjMusqGJLe8Yk 9TPkptOI9nsHPfi4VmHCzhmXHGwmtFunU6T9ZQUfRjRP5tUIGdFW7kvgMwx1ZgkZNlGA pn1aCHL56D3klqtWCrAp4V7zrVTX/O2JQqis3j45Y1v6vTzTnMYEHtcErNlEteOkWma8 4K3Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kbWT2zAH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id x1si47725667plb.28.2019.08.02.07.51.43; Fri, 02 Aug 2019 07:51:58 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=kbWT2zAH; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2391013AbfHBJbF (ORCPT + 99 others); Fri, 2 Aug 2019 05:31:05 -0400 Received: from mail.kernel.org ([198.145.29.99]:56910 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2390999AbfHBJbF (ORCPT ); Fri, 2 Aug 2019 05:31:05 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id EF2CF2182B; Fri, 2 Aug 2019 09:31:03 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564738264; bh=TJed8jkosXHtrYtgyAE9DH9vGieBDk4XFI/GZmxO9Pc=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kbWT2zAHSj/RHgfAJfty3X7xLMM5ZGOx+PyxVeu+AOOBQ6mfvRpfQMNEqg4K+qLXs 9BMicsHhP26NL2GWSkIwFOV/OlV7GaTLVqkFgQylJUNtfDjiJ3i3REmrrDhY2l5eZb uPB3ukfa9iIX0tfzUujYa6mCr29h+Ba02P5UASf4= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, "David S. Miller" , Sasha Levin Subject: [PATCH 4.4 019/158] tua6100: Avoid build warnings. Date: Fri, 2 Aug 2019 11:27:20 +0200 Message-Id: <20190802092207.359242196@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190802092203.671944552@linuxfoundation.org> References: <20190802092203.671944552@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org [ Upstream commit 621ccc6cc5f8d6730b740d31d4818227866c93c9 ] Rename _P to _P_VAL and _R to _R_VAL to avoid global namespace conflicts: drivers/media/dvb-frontends/tua6100.c: In function ‘tua6100_set_params’: drivers/media/dvb-frontends/tua6100.c:79: warning: "_P" redefined #define _P 32 In file included from ./include/acpi/platform/aclinux.h:54, from ./include/acpi/platform/acenv.h:152, from ./include/acpi/acpi.h:22, from ./include/linux/acpi.h:34, from ./include/linux/i2c.h:17, from drivers/media/dvb-frontends/tua6100.h:30, from drivers/media/dvb-frontends/tua6100.c:32: ./include/linux/ctype.h:14: note: this is the location of the previous definition #define _P 0x10 /* punct */ Signed-off-by: David S. Miller Signed-off-by: Sasha Levin --- drivers/media/dvb-frontends/tua6100.c | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/media/dvb-frontends/tua6100.c b/drivers/media/dvb-frontends/tua6100.c index 029384d1fddd..7a3e91cda5df 100644 --- a/drivers/media/dvb-frontends/tua6100.c +++ b/drivers/media/dvb-frontends/tua6100.c @@ -80,8 +80,8 @@ static int tua6100_set_params(struct dvb_frontend *fe) struct i2c_msg msg1 = { .addr = priv->i2c_address, .flags = 0, .buf = reg1, .len = 4 }; struct i2c_msg msg2 = { .addr = priv->i2c_address, .flags = 0, .buf = reg2, .len = 3 }; -#define _R 4 -#define _P 32 +#define _R_VAL 4 +#define _P_VAL 32 #define _ri 4000000 // setup register 0 @@ -96,14 +96,14 @@ static int tua6100_set_params(struct dvb_frontend *fe) else reg1[1] = 0x0c; - if (_P == 64) + if (_P_VAL == 64) reg1[1] |= 0x40; if (c->frequency >= 1525000) reg1[1] |= 0x80; // register 2 - reg2[1] = (_R >> 8) & 0x03; - reg2[2] = _R; + reg2[1] = (_R_VAL >> 8) & 0x03; + reg2[2] = _R_VAL; if (c->frequency < 1455000) reg2[1] |= 0x1c; else if (c->frequency < 1630000) @@ -115,18 +115,18 @@ static int tua6100_set_params(struct dvb_frontend *fe) * The N divisor ratio (note: c->frequency is in kHz, but we * need it in Hz) */ - prediv = (c->frequency * _R) / (_ri / 1000); - div = prediv / _P; + prediv = (c->frequency * _R_VAL) / (_ri / 1000); + div = prediv / _P_VAL; reg1[1] |= (div >> 9) & 0x03; reg1[2] = div >> 1; reg1[3] = (div << 7); - priv->frequency = ((div * _P) * (_ri / 1000)) / _R; + priv->frequency = ((div * _P_VAL) * (_ri / 1000)) / _R_VAL; // Finally, calculate and store the value for A - reg1[3] |= (prediv - (div*_P)) & 0x7f; + reg1[3] |= (prediv - (div*_P_VAL)) & 0x7f; -#undef _R -#undef _P +#undef _R_VAL +#undef _P_VAL #undef _ri if (fe->ops.i2c_gate_ctrl) -- 2.20.1