From mboxrd@z Thu Jan 1 00:00:00 1970 From: Rob Landley Date: Sat, 21 May 2016 15:55:43 +0000 Subject: Re: [PATCH v2 09/12] clocksource: add J-Core PIT/RTC driver Message-Id: <574084FF.1070901@landley.net> List-Id: References: <20160520140156.GC6863@linaro.org> <20160521031515.GZ21636@brightrain.aerifal.cx> In-Reply-To: <20160521031515.GZ21636@brightrain.aerifal.cx> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: Rich Felker , Daniel Lezcano Cc: linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org, Thomas Gleixner On 05/20/2016 10:15 PM, Rich Felker wrote: > On Fri, May 20, 2016 at 04:01:56PM +0200, Daniel Lezcano wrote: >>> + return ((u64)sechi << 32 | seclo) * 1000000000 + nsec; >> >> s/1000000000/NSEC_PER_SEC/ ... >>> + hwirq = irq_get_irq_data(pit_irq)->hwirq; >>> + enable_val = (1<<26) | ((hwirq&0x3c)<<18) | (hwirq<<12); >> >> Can you explain? (and replace litterals by macros). "Hiding numbers that are used just once into defines to put them out of sight does not really help readability." - Pavel Machek http://lkml.iu.edu/hypermail/linux/kernel/1407.1/00299.html Rob From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752273AbcEUPzt (ORCPT ); Sat, 21 May 2016 11:55:49 -0400 Received: from mail-oi0-f67.google.com ([209.85.218.67]:35890 "EHLO mail-oi0-f67.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752090AbcEUPzs (ORCPT ); Sat, 21 May 2016 11:55:48 -0400 Subject: Re: [PATCH v2 09/12] clocksource: add J-Core PIT/RTC driver To: Rich Felker , Daniel Lezcano References: <20160520140156.GC6863@linaro.org> <20160521031515.GZ21636@brightrain.aerifal.cx> Cc: linux-kernel@vger.kernel.org, linux-sh@vger.kernel.org, Thomas Gleixner From: Rob Landley Message-ID: <574084FF.1070901@landley.net> Date: Sat, 21 May 2016 10:55:43 -0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.6.0 MIME-Version: 1.0 In-Reply-To: <20160521031515.GZ21636@brightrain.aerifal.cx> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/20/2016 10:15 PM, Rich Felker wrote: > On Fri, May 20, 2016 at 04:01:56PM +0200, Daniel Lezcano wrote: >>> + return ((u64)sechi << 32 | seclo) * 1000000000 + nsec; >> >> s/1000000000/NSEC_PER_SEC/ ... >>> + hwirq = irq_get_irq_data(pit_irq)->hwirq; >>> + enable_val = (1<<26) | ((hwirq&0x3c)<<18) | (hwirq<<12); >> >> Can you explain? (and replace litterals by macros). "Hiding numbers that are used just once into defines to put them out of sight does not really help readability." - Pavel Machek http://lkml.iu.edu/hypermail/linux/kernel/1407.1/00299.html Rob