Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp5825920ybi; Wed, 12 Jun 2019 09:06:23 -0700 (PDT) X-Google-Smtp-Source: APXvYqxz20YgXMEu0I8++hluHfS3i86gODXQgV+MgPpZ233fF31RS7M1IhxyPFdOLEkTpsLTVrxV X-Received: by 2002:aa7:9f1c:: with SMTP id g28mr63907522pfr.81.1560355583383; Wed, 12 Jun 2019 09:06:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560355583; cv=none; d=google.com; s=arc-20160816; b=X9uPJs6AiGNgr178B5FB2c8CoSHiui+dPgkd4aED3SwdB8wDrGvRAyTQyaKtiv5RqY SP1y/oPfaoSOBG2YV4A8vW/FdLyb7xzOFvvGoKZy/DVw3LFaOpSWObacc7kpZZ8M0kOJ mEFXy7NB2iJQZiJgsP2hpJmHbdIrTZDc6HPWeVnWyp8deM9YNelfRfvOIqtmPKcQCIzW UuZnicDEGTwZiOdAZpDsrypCT4Zfa78uekxUWK85zEsF/tYtU+ymA3DuFp+kJxMyRJfo G007DjvH6ViBuj7HYLF+eZppGVqQUt0vYiIf7DSLpi22gQqMxIvTzijXpLNkk8V1MiGt 0CRA== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=GyQvzVCRfx2rfSnJth+Ru0ibUKt+HtIeQExiXWplh8A=; b=rPh4IApAijTErfwBlNPM2S2dQnW3u6oEkEBNHJD6g9dSLK+APs46OpNEopeZRsuaqF 93o1g8wIQFGXGwsMhhG1lO1MMucEbqzYuCPfVgW7Kbwcj8QLNZSWYdfndFkhfV8n4X8i gzoSUPycVrkOUeQ0H4FLRqPwYb6pGYmXUvYFVVcxF5a6y09F8lUNoX05HXqR+tZVBIQ2 9BTTffYNc8VnAAQZWSA5zszfZrYr07/1KwgT98jq+nLtAO5f7I3rJVQqQUthg5B+fZNL 0p4dvP8cSylBgimczGznJT8sZiWdReEdiQvdTMyMh6WTFbNGCsXf6HPacraBODmIUQYT bM1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=oMHCRrVC; 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 d9si238352pjs.7.2019.06.12.09.06.06; Wed, 12 Jun 2019 09:06:23 -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=fail header.i=@infradead.org header.s=bombadil.20170209 header.b=oMHCRrVC; 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 S2408332AbfFLLCe (ORCPT + 99 others); Wed, 12 Jun 2019 07:02:34 -0400 Received: from bombadil.infradead.org ([198.137.202.133]:58282 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2405826AbfFLLCe (ORCPT ); Wed, 12 Jun 2019 07:02:34 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To: From:Date:Sender:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=GyQvzVCRfx2rfSnJth+Ru0ibUKt+HtIeQExiXWplh8A=; b=oMHCRrVClCH7w4MftWKSBm1Xp nWqAVapuqvKgC16niIy9kv/HuL8HtzPt8ULFienbDrBOojMdk8+VWGRAeQMavwOqXiA6On+aZFNzm 4DcZPAG2lD8GVopdAjdkiMMnXj0x5kD7iVJ/iTWV7KYP2H9hHavsXOuuQZ/x9iG+1iJLE2YmZpkc5 Q+PLGZ4IP82HLaRLeovvSXZrcqSy+grCUuetcHfvnTACjtUyPnQJzlQj22PUUI54QyeIEWnu3SMUU usinM2Z9nF8Ve7/PrY8WQef0gC87c/dRpo+5QrHCiYNmC9tanSXE03sBUnoJn/U/oCWcq2TanXTeO uxM+AA+XA==; Received: from 177.41.119.178.dynamic.adsl.gvt.net.br ([177.41.119.178] helo=coco.lan) by bombadil.infradead.org with esmtpsa (Exim 4.92 #3 (Red Hat Linux)) id 1hb11S-0000xB-Mu; Wed, 12 Jun 2019 11:02:30 +0000 Date: Wed, 12 Jun 2019 08:02:26 -0300 From: Mauro Carvalho Chehab To: Wolfram Sang Cc: Stephen Rothwell , Linux Next Mailing List , Linux Kernel Mailing List , Ruslan Babayev , Andrew de Quincey Subject: Re: linux-next: build warning after merge of the i2c tree Message-ID: <20190612080226.45d2115a@coco.lan> In-Reply-To: <20190612081929.GA1687@kunai> References: <20190611102528.44ad5783@canb.auug.org.au> <20190612081929.GA1687@kunai> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Wed, 12 Jun 2019 10:19:29 +0200 Wolfram Sang escreveu: > On Tue, Jun 11, 2019 at 10:25:28AM +1000, Stephen Rothwell wrote: > > Hi Wolfram, > > > > After merging the i2c tree, today's linux-next build (x86_64 allmodconfig) > > produced this warning: > > > > drivers/media/dvb-frontends/tua6100.c: In function 'tua6100_set_params': > > drivers/media/dvb-frontends/tua6100.c:71: 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:21, > > from include/linux/i2c.h:17, > > from drivers/media/dvb-frontends/tua6100.h:22, > > from drivers/media/dvb-frontends/tua6100.c:24: > > include/linux/ctype.h:14: note: this is the location of the previous definition > > #define _P 0x10 /* punct */ > > > > Exposed by commit > > > > 5213d7efc8ec ("i2c: acpi: export i2c_acpi_find_adapter_by_handle") > > > > Since that included from > > > > Originally introduced by commit > > > > 00be2e7c6415 ("V4L/DVB (4606): Add driver for TUA6100") > > > > The _P in has existed since before git. > > I suggest to fix the driver by adding a TUA6100_ prefix to the defines. > I can cook up a patch for that. > That entire use of _P, _R and _ri looks weird into my eyes. The code there do things like: #define _P 32 ... if (_P == 64) reg1[1] |= 0x40; It sounds to me that _P and _R are actually some sort of setup with depends on how the device is wired. A quick read on its datasheet at page 19 - downloaded from: http://www.datasheetcatalog.com/datasheets_pdf/T/U/A/6/TUA6100.shtml Shows that: P: divide ratio of the prescaler. R: divide ratio of the R-counter. ri: reference frequency input (XTAL osc). IMO, the right fix would be to change struct tua6100_priv, in order to add those parameters, and initialize them with the current values at tua6100_attach. That would allow changing those values during device initialization, in the case we ever need to support a hardware with the same chipset, with, for example, a different XTAL. I'll work on a patch to address it. Thanks, Mauro