From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 02DAAC433F5 for ; Mon, 8 Nov 2021 14:21:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id E238561101 for ; Mon, 8 Nov 2021 14:21:53 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237861AbhKHOYh (ORCPT ); Mon, 8 Nov 2021 09:24:37 -0500 Received: from mail.kernel.org ([198.145.29.99]:60592 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235502AbhKHOYh (ORCPT ); Mon, 8 Nov 2021 09:24:37 -0500 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2971D610E9; Mon, 8 Nov 2021 14:21:49 +0000 (UTC) Subject: Re: [RFC 3/3] gpiolib: coldfire: remove custom asm/gpio.h To: Geert Uytterhoeven , Arnd Bergmann Cc: "open list:GPIO SUBSYSTEM" , Bartosz Golaszewski , Linus Walleij , linux-m68k , Russell King , Linux ARM , Linux-sh list , Rich Felker , Yoshinori Sato , Arnd Bergmann , Linux Kernel Mailing List References: <20211105130338.241100-1-arnd@kernel.org> <20211105130338.241100-3-arnd@kernel.org> From: Greg Ungerer Message-ID: Date: Tue, 9 Nov 2021 00:21:46 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-sh@vger.kernel.org Hi arnd, Geert, On 8/11/21 6:24 pm, Geert Uytterhoeven wrote: > Hi Arnd, > > On Fri, Nov 5, 2021 at 2:05 PM Arnd Bergmann wrote: >> From: Arnd Bergmann >> >> Now that coldfire is the only user of a custom asm/gpio.h, it seems >> better to remove this as well, and have the same interface everywhere. >> >> For the gpio_get_value()/gpio_set_value()/gpio_to_irq(), gpio_cansleep() >> functions, the custom version is only a micro-optimization to inline the >> function for constant GPIO numbers. However, in the coldfire defconfigs, >> I was unable to find a single instance where this micro-optimization >> was even used, so to my best knowledge removing this has no downsides. > > The only user seems to be QSPI chip select handling (not bit-banged > data transfer) in arch/m68k/coldfire/device.c, but that indeed depends > on CONFIG_SPI_COLDFIRE_QSPI, which is not set in any of the defconfigs. > That doesn't mean there were/are no real users, though ;-) That is definitely used by some. But the generalization and removal of the special casing seems like a win to me. >> The custom gpio_request_one() function is even less useful, as it is >> guarded by an #ifdef that is never true. >> >> Signed-off-by: Arnd Bergmann > > Reviewed-by: Geert Uytterhoeven Reviewed-by: Greg Ungerer Regards Greg > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds > From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 87893C433F5 for ; Mon, 8 Nov 2021 14:23:05 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4E48D610FF for ; Mon, 8 Nov 2021 14:23:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 4E48D610FF Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=linux-m68k.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Content-Type: Content-Transfer-Encoding:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Date:Message-ID:From: References:Cc:To:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=yqrsw3ew908QllTAlN/XcFz9LyKyEVszyU7+4O7jznM=; b=J8NYGNJ/jOE6Ot2kTLXdoMOfHw aI65aEu3T50r3b8p2AcyDqVck7LQuE8IxA2TVLupP2PrAI91/bNn2TwwKfepCnxCQL5xmHXQsY06e sRk6zy/zWE3uGkH4lLb7ZZ/e/s4lroKh1ntw3Fv7pegINWZ7HA4/OkXvPAlXFny/ufBBtJcaZBrsQ jVaj6MJBNHem3dKVIJcZa/Mv6n/YeatJBanWadooLtivNaCI8uc38nNGCOl8sKXHaXgW/llcIgNNz LT4SG8WIFu0yLajv/HaN1mSnaqpK8HrGs6cZATFWtUXxVmbvhbC6JdOBbhg65jeQsjjnFXKmT0sYR 1AhxnvMg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mk5X2-00Gdpt-Mz; Mon, 08 Nov 2021 14:21:56 +0000 Received: from mail.kernel.org ([198.145.29.99]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mk5Wz-00Gdod-EN for linux-arm-kernel@lists.infradead.org; Mon, 08 Nov 2021 14:21:54 +0000 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2971D610E9; Mon, 8 Nov 2021 14:21:49 +0000 (UTC) Subject: Re: [RFC 3/3] gpiolib: coldfire: remove custom asm/gpio.h To: Geert Uytterhoeven , Arnd Bergmann Cc: "open list:GPIO SUBSYSTEM" , Bartosz Golaszewski , Linus Walleij , linux-m68k , Russell King , Linux ARM , Linux-sh list , Rich Felker , Yoshinori Sato , Arnd Bergmann , Linux Kernel Mailing List References: <20211105130338.241100-1-arnd@kernel.org> <20211105130338.241100-3-arnd@kernel.org> From: Greg Ungerer Message-ID: Date: Tue, 9 Nov 2021 00:21:46 +1000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.13.0 MIME-Version: 1.0 In-Reply-To: Content-Language: en-US X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211108_062153_537286_EBEAE029 X-CRM114-Status: GOOD ( 26.99 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Hi arnd, Geert, On 8/11/21 6:24 pm, Geert Uytterhoeven wrote: > Hi Arnd, > > On Fri, Nov 5, 2021 at 2:05 PM Arnd Bergmann wrote: >> From: Arnd Bergmann >> >> Now that coldfire is the only user of a custom asm/gpio.h, it seems >> better to remove this as well, and have the same interface everywhere. >> >> For the gpio_get_value()/gpio_set_value()/gpio_to_irq(), gpio_cansleep() >> functions, the custom version is only a micro-optimization to inline the >> function for constant GPIO numbers. However, in the coldfire defconfigs, >> I was unable to find a single instance where this micro-optimization >> was even used, so to my best knowledge removing this has no downsides. > > The only user seems to be QSPI chip select handling (not bit-banged > data transfer) in arch/m68k/coldfire/device.c, but that indeed depends > on CONFIG_SPI_COLDFIRE_QSPI, which is not set in any of the defconfigs. > That doesn't mean there were/are no real users, though ;-) That is definitely used by some. But the generalization and removal of the special casing seems like a win to me. >> The custom gpio_request_one() function is even less useful, as it is >> guarded by an #ifdef that is never true. >> >> Signed-off-by: Arnd Bergmann > > Reviewed-by: Geert Uytterhoeven Reviewed-by: Greg Ungerer Regards Greg > Gr{oetje,eeting}s, > > Geert > > -- > Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org > > In personal conversations with technical people, I call myself a hacker. But > when I'm talking to journalists I just say "programmer" or something like that. > -- Linus Torvalds > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel