Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3315593rwe; Mon, 29 Aug 2022 09:19:05 -0700 (PDT) X-Google-Smtp-Source: AA6agR4InfaYo39nIyOaSHb7XpiPnUZVRstVGJfFkIfM00NWpP1jNnL36FJgYLE5LnDI5HS1itOx X-Received: by 2002:a17:907:7d91:b0:731:7ecb:1e5b with SMTP id oz17-20020a1709077d9100b007317ecb1e5bmr14137682ejc.78.1661789944812; Mon, 29 Aug 2022 09:19:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661789944; cv=none; d=google.com; s=arc-20160816; b=CBarb1Wt5sHI37gl1ew1Aic/ZEXQzbcVR4LphTGDYNhgV5jbbMKIjKUEA+ZkJOhxZQ ujYq9WKQEvMk1SG6pYosKVVsk0J6LQWhhG4daQvLV4wrQ4i18ouc+qQZwdzkfQxdYILS FGCBXyIqh7VeklPzXtuzMzIMViQBHu0nNhS/X5mIcPS2h75yIs+Mu76J+a2092vmDC27 Wyf+n3WWgG+dKowlj7oEyJdlhl/flWRzAYQP/y10KNGDMvflyOQ3k2i7Lbc1XNX26PWL sslqk0F19/lkY3A/PAuOEzuLtz5Vojp4Unc3KoVsjEx6Jdkr854WU9vl/v2+n7i7jQv8 FyfQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from; bh=2dIJwZyaMzm9FtkN+bwQhBBuQfudrlQ5jw6pv5pKw40=; b=jnGoQcIQgcJp5AtZQejKDgMjWhkihvnphIUttZ9YoIXaVXAZMHcRSgF5VK4fwY8aZr qD5zY+0vbHEZBkmuByZFX5Oqv8Oqf+xiGOzcgVwqlD5sxdf5gLAlWI3e/O09IFKYXvPg K79pGV4WglDeFCH+rDvxJkmSN1illqc/HqGBCRo1yujyo1TjcKlc0DyzHgH6kkpd7zeh BhHAOLNzQKk1sXk9gsuaslUoaPqkPraLgSIvt1mBwFSIgbQqOCJmGYfSGdhx3llXcVOB S/Zx3AueYYU0LH90NQi0VfLJfBySdVs2/xYIqbLk2MAD6USYbQVBZDR70MNP35/czL0k GEPw== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id gs6-20020a1709072d0600b0073d7884a3c8si6281462ejc.594.2022.08.29.09.18.39; Mon, 29 Aug 2022 09:19:04 -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; 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 S230200AbiH2QQO (ORCPT + 99 others); Mon, 29 Aug 2022 12:16:14 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230310AbiH2QP7 (ORCPT ); Mon, 29 Aug 2022 12:15:59 -0400 Received: from pegase2.c-s.fr (pegase2.c-s.fr [93.17.235.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 87A7E5FAD4; Mon, 29 Aug 2022 09:15:53 -0700 (PDT) Received: from localhost (mailhub3.si.c-s.fr [172.26.127.67]) by localhost (Postfix) with ESMTP id 4MGbC836NWz9spQ; Mon, 29 Aug 2022 18:15:48 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from pegase2.c-s.fr ([172.26.127.65]) by localhost (pegase2.c-s.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 83n32VIxOTLf; Mon, 29 Aug 2022 18:15:48 +0200 (CEST) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase2.c-s.fr (Postfix) with ESMTP id 4MGbC82LQ4z9spL; Mon, 29 Aug 2022 18:15:48 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 3E9378B770; Mon, 29 Aug 2022 18:15:48 +0200 (CEST) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id v1nxGOXZIXUi; Mon, 29 Aug 2022 18:15:48 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (unknown [172.25.230.108]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 0D4AB8B763; Mon, 29 Aug 2022 18:15:48 +0200 (CEST) Received: from PO20335.IDSI0.si.c-s.fr (localhost [127.0.0.1]) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.16.1) with ESMTPS id 27TGFiYb988592 (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NOT); Mon, 29 Aug 2022 18:15:44 +0200 Received: (from chleroy@localhost) by PO20335.IDSI0.si.c-s.fr (8.17.1/8.17.1/Submit) id 27TGFhjT988590; Mon, 29 Aug 2022 18:15:43 +0200 X-Authentication-Warning: PO20335.IDSI0.si.c-s.fr: chleroy set sender to christophe.leroy@csgroup.eu using -f From: Christophe Leroy To: Linus Walleij , Bartosz Golaszewski , Geert Uytterhoeven , Keerthy , Russell King , Arnd Bergmann , Jonathan Corbet , Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , "H. Peter Anvin" , Catalin Marinas , Will Deacon Cc: Christophe Leroy , linux-kernel@vger.kernel.org, linux-gpio@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-arch@vger.kernel.org, linux-doc@vger.kernel.org, x86@kernel.org Subject: [PATCH v1 3/8] gpiolib: Warn on drivers still using static gpiobase allocation Date: Mon, 29 Aug 2022 18:15:05 +0200 Message-Id: <92aaf098d7039fd4040015b07ba1f99daf674f50.1661789204.git.christophe.leroy@csgroup.eu> X-Mailer: git-send-email 2.37.1 In-Reply-To: References: MIME-Version: 1.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1661789704; l=744; s=20211009; h=from:subject:message-id; bh=6tzAMcB+LYwV7X6i7T7zmc7EcZy5JB7Xc2sK9x8s4Lo=; b=hw2KU+d9WgUL+ZLTPnjNfPHqqIi0TMfs/f5KYSLRNI5yqC3RaZAgwqJuUwKV8vvdXWEIwP/NJyXD 2YCNtGRuDoeyo1Dr3T4W+nDrvCgQd2IvS87VcUF6qvF2uuNS2gik X-Developer-Key: i=christophe.leroy@csgroup.eu; a=ed25519; pk=HIzTzUj91asvincQGOFx6+ZF5AoUuP9GdOtQChs7Mm0= Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS,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: X-Mailing-List: linux-kernel@vger.kernel.org In the preparation of getting completely rid of static gpiobase allocation in the future, emit a warning in drivers still doing so. Signed-off-by: Christophe Leroy --- drivers/gpio/gpiolib.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index cc9c0a12259e..3a6f29eeb72d 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c @@ -715,6 +715,9 @@ int gpiochip_add_data_with_key(struct gpio_chip *gc, void *data, * a poison instead. */ gc->base = base; + } else { + dev_warn(&gdev->dev, "Static allocation of GPIO base is " + "deprecated, use dynamic allocation."); } gdev->base = base; -- 2.37.1