From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1757973AbZBPNU1 (ORCPT ); Mon, 16 Feb 2009 08:20:27 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1757699AbZBPNUI (ORCPT ); Mon, 16 Feb 2009 08:20:08 -0500 Received: from hp3.statik.tu-cottbus.de ([141.43.120.68]:56159 "EHLO hp3.statik.tu-cottbus.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755860AbZBPNUH (ORCPT ); Mon, 16 Feb 2009 08:20:07 -0500 Message-ID: <499967FE.1090903@s5r6.in-berlin.de> Date: Mon, 16 Feb 2009 14:19:58 +0100 From: Stefan Richter User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.8.1.19) Gecko/20081204 SeaMonkey/1.1.14 MIME-Version: 1.0 To: Manish Katiyar CC: mingo@elte.hu, LKML , kernel-janitors@vger.kernel.org Subject: Re: [PATCH] Remove errors caught by checkpatch.pl in kernel/acct.c References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Manish Katiyar wrote: > Below patch removes errors generated by checkpatch.pl in > kernel/acct.c. Caught by Ingo's code-quality script. Bad changelog: Just say that this is a whitespace adjustment. > @@ -416,7 +416,7 @@ static comp_t encode_comp_t(unsigned long value) > #define MANTSIZE2 20 /* 20 bit mantissa. */ > #define EXPSIZE2 5 /* 5 bit base 2 exponent. */ > #define MAXFRACT2 ((1ul << MANTSIZE2) - 1) /* Maximum > fractional value. */ Your MUA inserted line wraps where there should none. This won't apply as a patch anymore. > @@ -513,13 +514,13 @@ static void do_acct_process(struct bsd_acct_struct *acct, > + current->group_leader->start_time.tv_nsec; > /* convert nsec -> AHZ */ > elapsed = nsec_to_AHZ(run_time); > -#if ACCT_VERSION==3 > +#if ACCT_VERSION == 3 > ac.ac_etime = encode_float(elapsed); > #else > ac.ac_etime = encode_comp_t(elapsed < (unsigned long) -1l ? > - (unsigned long) elapsed : (unsigned long) -1l); > + (unsigned long) elapsed:(unsigned long) -1l); Should IMO be (unsigned long)elapsed : (unsigned long)-1l); or simply stay as it was. But more importantly, the whole expression looks bogus to me. elapsed is an u64 and thus clearly defined regarding its size, while unsigned long will have different sizes on different CPU architectures. Is this intentional? -- Stefan Richter -=====-==--= --=- =---- http://arcgraph.de/sr/