Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp3821900ybi; Mon, 29 Jul 2019 13:17:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqyT320BWabePXBhShy37Y/Hmf9daLtlleF85r48dKRvDu6eGLf1e5j4M1p4O5ErkHbckYtz X-Received: by 2002:a63:5a0a:: with SMTP id o10mr33135935pgb.282.1564431455646; Mon, 29 Jul 2019 13:17:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564431455; cv=none; d=google.com; s=arc-20160816; b=QsBoFHh+ttjA0uMRKTAdZ9IYp2czrRo8PNrgRh5XCsPXtINFPdQnhYiHhhfcTwgChF RZ5RxbKTlsFO7HFSZ/tmzXYEz+NRJe7bEXen46dmJ5BHgtg3ExM5B8iQKheEAvIAyAOS YBo6hQdc5G1hXEBfWba+OKRPoko1J3Qw4HnQ5IzCEAJJqChNnorFvGVvS7EARBRNZP4/ brnGQNCecvkk809aNjdKvZSixZx5xREk92Mfua4Wq/BSVCywDYj93HyxSiocnOJypsiY wi5+FCg1MRBWxKfA/yZM+S1faBp1druWvy5sKke+/zKzwhAO2+601Y+32uUDcCefk0uE 8NYA== 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=IYPGqVot1orVRRnzalBrJfEK9RMc7VbLWV/X+CoE/RU=; b=f6l0JT0p3aO1Q3BosKiHz0jONLmbdDSdwpFQlMFMKd5h92SoNiEsQ9HT+prmtczLns IOR641ThGrninUuD75Mi3GvMY7EaPehHfNvZfRal0o3NbiCOR9JgL0roZVlkh7aCzQSt 7K9KOT/2Qn8+Tof5MzaJaefakBSkLfnq0UzReaxRZx5dJfnST+seGMvC/zyYG+Qzr5ZF LKEAaWNsY9I/zagbPXTKk83UfdR58AOGw6nxvE+oj+FLeF2QX6jZzqdrjiYooxXp5at5 Jdl8DuLXf9r0I0BS7QNVEUdNNQEZqlwfUTED8J5KGsOA0rLkYc8PdtX+Udzfpvk6qHux UK7A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=VnbBM35Z; 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 f72si29092379pfa.67.2019.07.29.13.17.20; Mon, 29 Jul 2019 13:17:35 -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=VnbBM35Z; 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 S1729558AbfG2TY5 (ORCPT + 99 others); Mon, 29 Jul 2019 15:24:57 -0400 Received: from mail.kernel.org ([198.145.29.99]:37124 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728749AbfG2TYw (ORCPT ); Mon, 29 Jul 2019 15:24:52 -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 CF9B221773; Mon, 29 Jul 2019 19:24:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564428291; bh=tZB9Gyskz1FEISTkY/HUZLGh9BvMKzYiGk48nclEAFA=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VnbBM35Za6wh1NPYXSTSGlHiU4y6PVax8Qo6TgVdI1dmgrKnQar3sO83FRspkorx5 QBINcYaQkPk5Pb4uKeMTLnQaiuu1hOO/pyxtmqTlfGW6OCOiTnhLrUvORW4+nWr5GX 5XeuWvEL2KdSxZMzX26+Rx7mchEeTTtM2EzRnwr8= 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.14 030/293] tua6100: Avoid build warnings. Date: Mon, 29 Jul 2019 21:18:41 +0200 Message-Id: <20190729190824.087382719@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190820.321094988@linuxfoundation.org> References: <20190729190820.321094988@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 18e6d4c5be21..859fa14b319c 100644 --- a/drivers/media/dvb-frontends/tua6100.c +++ b/drivers/media/dvb-frontends/tua6100.c @@ -75,8 +75,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 @@ -91,14 +91,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) @@ -110,18 +110,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