Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp9987722ybi; Wed, 24 Jul 2019 13:37:24 -0700 (PDT) X-Google-Smtp-Source: APXvYqy47ZvP0INpVOZIdkk484WXWRS4Fjtdj/ecR/r9iZPmjQ9nBrOzyJ/lqFRu/Mdkd8Kddszc X-Received: by 2002:a65:4103:: with SMTP id w3mr67638085pgp.1.1564000644383; Wed, 24 Jul 2019 13:37:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564000644; cv=none; d=google.com; s=arc-20160816; b=z08NSSAChfxFQYPDqQZvlquJgTG96OVdHK1ilvuO/4PBB3en5vYOXBKLDbOb4kJ5qV culifaEVqnICYxJMuO/Z0LuRtc0MylPECxe/SvJh1RkW0wSv1mpM/TWsnjKJSrfTZVWB oidWbn28WrLqFf1fG1u+1evqFLdcQ2tWQNNexJt8onucrrf0dVdm+B4ws10pPue6cD5m 6V8074MLgigcZ15u7QNhCSB8PJV87e9FaZhCIRL8+SWaztNDdfYFTjdBikCpFsubwMeq CE/KVeuqej6yS8JgTk4jXD5TD5SMuZ02UFEnHjz7C9f0F7E4mj5wb+tEvPk03oHDff6v Dp9A== 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=iF2g5kJlvnsQOV1BPVNtBUU0Qr8qFUgYPvvCfGZoW6w=; b=J9iNkFBixVJS/XPHU62ohMRZuwfvSabtsP8rs+NdKAfmhQyf2CLd6kq5e6RWe9t0+i rV7JYWXHPmaKXpW7d3Qjx9OPx1jIkJR4Tf7BBjfdWgHnzIWprxEr9XkxRmHOhv9UjTVG 3KWQZYdeaXXtQKSQ9THT9tI55Y9Y3pwV1ysVQK3CghcCyZWA1HpI5gVJVDMYHCsEVedP UB4yTb1zYb8Anq78IgGNPVmoiRsZiyWtr6neujKfAitBr1RZ6ESHDQJN2MCKosr/PSAj 3NtaCTexiz7bvzUQoM85qm86Csi3PQqN1SeDBFH72U5MZ747IbWm5n5PgLbFZuMBiv1J jqrg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=FnfrizsT; 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 r9si13816010pjq.35.2019.07.24.13.37.09; Wed, 24 Jul 2019 13:37:24 -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=FnfrizsT; 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 S1729180AbfGXTZY (ORCPT + 99 others); Wed, 24 Jul 2019 15:25:24 -0400 Received: from mail.kernel.org ([198.145.29.99]:42112 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387457AbfGXTZV (ORCPT ); Wed, 24 Jul 2019 15:25:21 -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 9961B218F0; Wed, 24 Jul 2019 19:25:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1563996320; bh=cLC6eobQ7ccRRPRMEuTAVpbeWaKEhD+lUdbOVj0J1j0=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FnfrizsTe1REQ8/gXIWvpVvEYj2DqyjC67bPJlwtgdPqr3qiN7o2u/5HW5fBzQJyk pIoYFDf4aPkm6wxDi9jVFt9vtUiCqqzcuJrkJWp4KFwSeKiAR/2m2+yEldgs1SKrDC skONDTDORiEAx1Ii4f01353qBuJei5UCXZfpM/F4= 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 5.2 055/413] tua6100: Avoid build warnings. Date: Wed, 24 Jul 2019 21:15:46 +0200 Message-Id: <20190724191739.335066837@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190724191735.096702571@linuxfoundation.org> References: <20190724191735.096702571@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 f7c3e6be8e4d..2483f614d0e7 100644 --- a/drivers/media/dvb-frontends/tua6100.c +++ b/drivers/media/dvb-frontends/tua6100.c @@ -67,8 +67,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 @@ -83,14 +83,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) @@ -102,18 +102,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