Message ID | 20230608025424.29033-1-rdunlap@infradead.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp15248vqr; Wed, 7 Jun 2023 20:25:58 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ4W23Ca7A7UL+fPMgrIwmP0JHmHjKm9CoXZMnge1LK99YEnJfdlLvZgpOURlyDaOarqDoz2 X-Received: by 2002:a05:6870:b9c9:b0:1a3:1962:9123 with SMTP id iv9-20020a056870b9c900b001a319629123mr5782777oab.31.1686194758304; Wed, 07 Jun 2023 20:25:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686194758; cv=none; d=google.com; s=arc-20160816; b=e/zMRS9OG9TPU7PSMR0GkUpweK6gJ1O4sTTw9F0hj0u0Oq2XvYVeKelRKG+gP8GYEY wknIaD3LHuYj9dREYgBJ+SMQFvnQl3k+AmqfWcHioSSlpWstRTHCvgQ19gnOEjbUMWfO j1II7cQmOweo18BHvUiLLZta7l4zVByyIXD32ESFh6bZ5NZ5JULRBKtcBdzAA3GGY3jl Su4FJXw3hqUI48LhM9e9ELmt7YrW+tFSTxmkKAEovBtZGmGOL3hXB7/WPGmPGom3sjPm h02DHqNvcJM/6knH4R6cYjYrkIohOHIMt2uwHxxsEal6owv1bHYhAxh0vW0rdDcyYgIp sQ1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=hRL53ufQNc+iuMhcj+kE/bG7v/x5YM0q+MX4eg7+/HE=; b=t3G3A/JmfsTCjZBqBFLDTtipTz9rlG7ZFEjPdKkztH+/aCX3DVvDzBSnOAUG9+otA2 Cv+8XdOHR/U3PagR8+C9Gi+hyiwyNJjJfhniOh27vnduedVZ61yyCcDAwHbH8SX75kHa 3mQ7Z4hQHomhhi7o/yNw7qc9WgPVEz+zEen6E2t0arzNRlqZgzxW8dxEq1HU2KNsdeZR Jmmef8dcbqnu94evHekPKxXqSU7H+iInBMFg4cff5iyoEhRPNlk4aENPFztBXInNNp/C Nh6rrjwLkNtzq4j7MMquc+d+kdNxc7kWX/61aoeQLGZQhguDa01Uz+2JO4ANDc3SOUvr sOlQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Cy1b1Eev; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u3-20020a170902e5c300b001ab29399c72si347866plf.502.2023.06.07.20.25.45; Wed, 07 Jun 2023 20:25:58 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=Cy1b1Eev; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233806AbjFHCyc (ORCPT <rfc822;literming00@gmail.com> + 99 others); Wed, 7 Jun 2023 22:54:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229991AbjFHCyb (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 7 Jun 2023 22:54:31 -0400 Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:3::133]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D3374E50; Wed, 7 Jun 2023 19:54:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=hRL53ufQNc+iuMhcj+kE/bG7v/x5YM0q+MX4eg7+/HE=; b=Cy1b1Eev0FUsLxSTCDDHeTpC6y 5WJgEsdM6aiw4DSARwXh5a6/hzFDgcJyZU8EGZyMuC1KPpIJJij8/KyV+t2AMaD2XO6ZP6vHUkrUE ogvWdNez8ByVG2nEPG6f2S2klY4HnBlTr0BtpERIzG2/PyePmSuxJcYqgFyX069aQqBvti37F1IXj XlzNaQKsXTpdnd1CZ+F2z578OZ9Ecruy9msz7DuWikbrkfXaSMQ9TM/Rzb/vzJewVCFKojnl8Wz1C O1eom+yGdzhWSvMpDSJRqNg+xI8fwmID8FQzsVWCDuF8FcjKHrtT4lxMuvIJtXQqIctAgxtVGCqkx HIJSukiA==; Received: from [2601:1c2:980:9ec0::2764] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1q75nA-007rlv-1j; Thu, 08 Jun 2023 02:54:28 +0000 From: Randy Dunlap <rdunlap@infradead.org> To: linux-kernel@vger.kernel.org Cc: Randy Dunlap <rdunlap@infradead.org>, Heiner Kallweit <hkallweit1@gmail.com>, Bartosz Golaszewski <brgl@bgdev.pl>, linux-i2c@vger.kernel.org, Arnd Bergmann <arnd@arndb.de>, Mark Brown <broonie@kernel.org>, Greg Kroah-Hartman <gregkh@linuxfoundation.org>, Masahiro Yamada <masahiroy@kernel.org> Subject: [PATCH] eeprom: at24: also select REGMAP Date: Wed, 7 Jun 2023 19:54:24 -0700 Message-Id: <20230608025424.29033-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1768103354804798458?= X-GMAIL-MSGID: =?utf-8?q?1768103354804798458?= |
Series |
eeprom: at24: also select REGMAP
|
|
Commit Message
Randy Dunlap
June 8, 2023, 2:54 a.m. UTC
Selecting only REGMAP_I2C can leave REGMAP unset, causing build errors,
so also select REGMAP to prevent the build errors.
../drivers/misc/eeprom/at24.c:540:42: warning: 'struct regmap_config' declared inside parameter list will not be visible outside of this definition or declaration
540 | struct regmap_config *regmap_config)
../drivers/misc/eeprom/at24.c: In function 'at24_make_dummy_client':
../drivers/misc/eeprom/at24.c:552:18: error: implicit declaration of function 'devm_regmap_init_i2c' [-Werror=implicit-function-declaration]
552 | regmap = devm_regmap_init_i2c(dummy_client, regmap_config);
../drivers/misc/eeprom/at24.c:552:16: warning: assignment to 'struct regmap *' from 'int' makes pointer from integer without a cast [-Wint-conversion]
552 | regmap = devm_regmap_init_i2c(dummy_client, regmap_config);
../drivers/misc/eeprom/at24.c: In function 'at24_probe':
../drivers/misc/eeprom/at24.c:586:16: error: variable 'regmap_config' has initializer but incomplete type
586 | struct regmap_config regmap_config = { };
../drivers/misc/eeprom/at24.c:586:30: error: storage size of 'regmap_config' isn't known
586 | struct regmap_config regmap_config = { };
../drivers/misc/eeprom/at24.c:586:30: warning: unused variable 'regmap_config' [-Wunused-variable]
Fixes: 5c015258478e ("eeprom: at24: add basic regmap_i2c support")
Signed-off-by: Randy Dunlap <rdunlap@infradead.org>
Cc: Heiner Kallweit <hkallweit1@gmail.com>
Cc: Bartosz Golaszewski <brgl@bgdev.pl>
Cc: linux-i2c@vger.kernel.org
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Mark Brown <broonie@kernel.org>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Cc: Masahiro Yamada <masahiroy@kernel.org>
---
drivers/misc/eeprom/Kconfig | 1 +
1 file changed, 1 insertion(+)
Comments
On Thu, Jun 8, 2023 at 4:54 AM Randy Dunlap <rdunlap@infradead.org> wrote: > > Selecting only REGMAP_I2C can leave REGMAP unset, causing build errors, > so also select REGMAP to prevent the build errors. > > ../drivers/misc/eeprom/at24.c:540:42: warning: 'struct regmap_config' declared inside parameter list will not be visible outside of this definition or declaration > 540 | struct regmap_config *regmap_config) > ../drivers/misc/eeprom/at24.c: In function 'at24_make_dummy_client': > ../drivers/misc/eeprom/at24.c:552:18: error: implicit declaration of function 'devm_regmap_init_i2c' [-Werror=implicit-function-declaration] > 552 | regmap = devm_regmap_init_i2c(dummy_client, regmap_config); > ../drivers/misc/eeprom/at24.c:552:16: warning: assignment to 'struct regmap *' from 'int' makes pointer from integer without a cast [-Wint-conversion] > 552 | regmap = devm_regmap_init_i2c(dummy_client, regmap_config); > ../drivers/misc/eeprom/at24.c: In function 'at24_probe': > ../drivers/misc/eeprom/at24.c:586:16: error: variable 'regmap_config' has initializer but incomplete type > 586 | struct regmap_config regmap_config = { }; > ../drivers/misc/eeprom/at24.c:586:30: error: storage size of 'regmap_config' isn't known > 586 | struct regmap_config regmap_config = { }; > ../drivers/misc/eeprom/at24.c:586:30: warning: unused variable 'regmap_config' [-Wunused-variable] > > Fixes: 5c015258478e ("eeprom: at24: add basic regmap_i2c support") > Signed-off-by: Randy Dunlap <rdunlap@infradead.org> > Cc: Heiner Kallweit <hkallweit1@gmail.com> > Cc: Bartosz Golaszewski <brgl@bgdev.pl> > Cc: linux-i2c@vger.kernel.org > Cc: Arnd Bergmann <arnd@arndb.de> > Cc: Mark Brown <broonie@kernel.org> > Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> > Cc: Masahiro Yamada <masahiroy@kernel.org> > --- > drivers/misc/eeprom/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff -- a/drivers/misc/eeprom/Kconfig b/drivers/misc/eeprom/Kconfig > --- a/drivers/misc/eeprom/Kconfig > +++ b/drivers/misc/eeprom/Kconfig > @@ -6,6 +6,7 @@ config EEPROM_AT24 > depends on I2C && SYSFS > select NVMEM > select NVMEM_SYSFS > + select REGMAP > select REGMAP_I2C > help > Enable this driver to get read/write support to most I2C EEPROMs Applied, thanks! Bart
diff -- a/drivers/misc/eeprom/Kconfig b/drivers/misc/eeprom/Kconfig --- a/drivers/misc/eeprom/Kconfig +++ b/drivers/misc/eeprom/Kconfig @@ -6,6 +6,7 @@ config EEPROM_AT24 depends on I2C && SYSFS select NVMEM select NVMEM_SYSFS + select REGMAP select REGMAP_I2C help Enable this driver to get read/write support to most I2C EEPROMs