From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S937295AbdCJNPw (ORCPT ); Fri, 10 Mar 2017 08:15:52 -0500 Received: from gate.crashing.org ([63.228.1.57]:46474 "EHLO gate.crashing.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934863AbdCJNPs (ORCPT ); Fri, 10 Mar 2017 08:15:48 -0500 Date: Fri, 10 Mar 2017 07:06:30 -0600 From: Segher Boessenkool To: Christophe LEROY Cc: Michael Ellerman , Benjamin Herrenschmidt , Paul Mackerras , Scott Wood , linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH] powerpc: sysdev: cpm1: Optimise gpio bit calculation Message-ID: <20170310130630.GH31469@gate.crashing.org> References: <20170309094206.A832167992@localhost.localdomain> <87a88tle0y.fsf@concordia.ellerman.id.au> <534d8795-ce21-9af6-498d-22597213a3a2@c-s.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <534d8795-ce21-9af6-498d-22597213a3a2@c-s.fr> User-Agent: Mutt/1.4.2.3i Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Mar 10, 2017 at 11:54:19AM +0100, Christophe LEROY wrote: > gpio_get() and gpio_set() are used extensively by some GPIO based > drivers like SPI, NAND, so it may be worth it as it doesn't impair > readability (if anyone prefers, we could write (1 << 31) >> i instead > of 0x80000000 >> i ) 1 << 31 is undefined behaviour, of course. Segher