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 phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2347EC19F29 for ; Thu, 4 Aug 2022 00:07:55 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 47FC0845B0; Thu, 4 Aug 2022 02:07:52 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=linux.microsoft.com header.i=@linux.microsoft.com header.b="C5GYOeij"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 23D0184061; Thu, 4 Aug 2022 02:07:50 +0200 (CEST) Received: from linux.microsoft.com (linux.microsoft.com [13.77.154.182]) by phobos.denx.de (Postfix) with ESMTP id 6E15684598 for ; Thu, 4 Aug 2022 02:07:45 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=linux.microsoft.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=dphadke@linux.microsoft.com Received: from [192.168.87.140] (unknown [50.47.106.71]) by linux.microsoft.com (Postfix) with ESMTPSA id 923F320FFC86; Wed, 3 Aug 2022 17:07:43 -0700 (PDT) DKIM-Filter: OpenDKIM Filter v2.11.0 linux.microsoft.com 923F320FFC86 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.microsoft.com; s=default; t=1659571663; bh=1tyfJpKZOxnlZmjekMmhflAa13TaY4UpCOZH8aPutTI=; h=Date:Subject:To:References:From:In-Reply-To:From; b=C5GYOeijMVOib8ixEEp2+aggx+VC/EbwYtif9goWP4iVEUJdmUayCNAGgq6cnUL1I qIznBnyy1t1Y8HXMvHFYR5rc7PwNE77yRKIkY5wtZqhWMWXfCeW5ZSg0kba30r9KgE +XnJNnS6MPZnkzL9so7Fh/3WPFdwS9p8xUNmYVLM= Message-ID: Date: Wed, 3 Aug 2022 17:07:43 -0700 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.11.0 Subject: Re: [PATCH] gpio: aspeed: port Linux dt-bindings header file Content-Language: en-US To: Billy Tsai , ChiaWei Wang , Ryan Chen , BMC-SW , Joel Stanley , "u-boot@lists.denx.de" References: <20220802205450.801824-1-dphadke@linux.microsoft.com> <69926D04-C751-40AA-AA6C-CE82180C15FE@aspeedtech.com> From: Dhananjay Phadke In-Reply-To: <69926D04-C751-40AA-AA6C-CE82180C15FE@aspeedtech.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.6 at phobos.denx.de X-Virus-Status: Clean On 8/2/2022 10:34 PM, Billy Tsai wrote: > Hello, > > On 2022/8/3, 10:10 AM, "Billy Tsai" wrote: > > Reviewed-by: Billy Tsai > > On 2022/8/3, 9:46 AM, "ChiaWei Wang" wrote: > > Acked-by: Chia-Wei Wang > > > > From: Dhananjay Phadke > > > Sent: Wednesday, August 3, 2022 4:55 AM > > > > > > Ported as is, makes it easier to add readable GPIO definitions in DTS files. > > > > > > Signed-off-by: Dhananjay Phadke > > > --- > > > include/dt-bindings/gpio/aspeed-gpio.h | 49 ++++++++++++++++++++++++++ > > > 1 file changed, 49 insertions(+) > > > create mode 100644 include/dt-bindings/gpio/aspeed-gpio.h [...] > > > + > > > +#define ASPEED_GPIO(port, offset) \ > > > + ((ASPEED_GPIO_PORT_##port * 8) + offset) > Please help to fix the check patch warning. > "Macro argument 'offset' may be better as '(offset)' to avoid precedence issues" > ((ASPEED_GPIO_PORT_##port * 8) + (offset)) > > > + Yes, I noticed this, but it would mean this will diverge from kernel. I can send v2 here and then sync to kernel later. Regards, Dhananjay