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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A44A8C433F5 for ; Wed, 30 Mar 2022 06:46:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243282AbiC3Grs (ORCPT ); Wed, 30 Mar 2022 02:47:48 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52030 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243323AbiC3Grn (ORCPT ); Wed, 30 Mar 2022 02:47:43 -0400 Received: from elvis.franken.de (elvis.franken.de [193.175.24.41]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D53BA8A32D for ; Tue, 29 Mar 2022 23:45:56 -0700 (PDT) Received: from uucp (helo=alpha) by elvis.franken.de with local-bsmtp (Exim 3.36 #1) id 1nZS5Z-0006HP-00; Wed, 30 Mar 2022 08:45:53 +0200 Received: by alpha.franken.de (Postfix, from userid 1000) id E274AC2ED2; Wed, 30 Mar 2022 08:42:16 +0200 (CEST) Date: Wed, 30 Mar 2022 08:42:16 +0200 From: Thomas Bogendoerfer To: Jackie Liu Cc: Andy Shevchenko , Linus Walleij , Ralf Baechle , "open list:BROADCOM NVRAM DRIVER" , Jonathan Cameron Subject: Re: [PATCH] MIPS: rb532: move GPIOD definition into C-files Message-ID: <20220330064216.GA5811@alpha.franken.de> References: <20220329014537.4180966-1-liu.yun@linux.dev> <71d1da40-4772-b126-7cbe-0d99024fd284@linux.dev> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <71d1da40-4772-b126-7cbe-0d99024fd284@linux.dev> User-Agent: Mutt/1.10.1 (2018-07-13) Precedence: bulk List-ID: X-Mailing-List: linux-mips@vger.kernel.org On Wed, Mar 30, 2022 at 09:46:07AM +0800, Jackie Liu wrote: > > > 在 2022/3/29 下午8:54, Andy Shevchenko 写道: > > On Tue, Mar 29, 2022 at 4:46 AM Jackie Liu wrote: > > > > > > From: Jackie Liu > > > > > > My kernel robot report build error from drivers/iio/adc/da9150-gpadc.c, > > > > > > We define GPIOD in rb.h, in fact he should only be used in gpio.c, but > > > > he --> it > > > > > it affects the driver da9150-gpadc.c which goes against the original > > > intention of the design, just move it to his scope. > > > > > At the same time, GPIONMIEN and IMASK6 are not used anywhere, just delete > > > them. > > > > While not being used it's good to leave (save) them since it might be > > the only means of the HW documentation. I know that Git history will > > keep that, but it is more explicit just to have them in the code. > > Sure. > > > > > ... > > > > > #define DEV3TC 0x01003C > > > #define BTCS 0x010040 > > > #define BTCOMPARE 0x010044 > > > -#define GPIOBASE 0x050000 > > > > ... > > > > > +#define GPIOBASE 0x050000 > > > > I think this one belongs to the header. > > I think it would be better to put it in gpio.c, after all it belongs to > the GPIO module and is not used elsewhere. It doesn't feel good if we > put it in the header file. I have a patchset, where the both files will go away. No need to clean up now. Thomas. -- Crap can work. Given enough thrust pigs will fly, but it's not necessarily a good idea. [ RFC1925, 2.3 ]