From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755335AbcH1J2z (ORCPT ); Sun, 28 Aug 2016 05:28:55 -0400 Received: from mail2-relais-roc.national.inria.fr ([192.134.164.83]:5327 "EHLO mail2-relais-roc.national.inria.fr" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755236AbcH1J2x (ORCPT ); Sun, 28 Aug 2016 05:28:53 -0400 X-IronPort-AV: E=Sophos;i="5.28,590,1464645600"; d="scan'208";a="234299472" Date: Sun, 28 Aug 2016 11:28:07 +0200 (CEST) From: Julia Lawall X-X-Sender: jll@hadrien To: Joe Perches cc: SF Markus Elfring , linux-ia64@vger.kernel.org, Fenghua Yu , Tony Luck , LKML , kernel-janitors@vger.kernel.org, Paolo Bonzini Subject: Re: [PATCH 1/5] IA64-IRQ: Use kmalloc_array() in sn_irq_lh_init() In-Reply-To: <1472344806.26978.30.camel@perches.com> Message-ID: References: <349bbfb4-bada-628e-2981-ca2a315299fc@users.sourceforge.net> <2e046b40-1c8e-717f-68b1-534c3125724c@users.sourceforge.net> <1472245341.4914.79.camel@perches.com> <894bf885-4cf0-fcaa-e040-35d9add64acc@users.sourceforge.net> <1472344806.26978.30.camel@perches.com> User-Agent: Alpine 2.10 (DEB 1266 2009-07-14) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 27 Aug 2016, Joe Perches wrote: > On Sat, 2016-08-27 at 09:02 +0200, SF Markus Elfring wrote: > > > If you _really wanted to clear up this code and make it more > > > robust/better, it'd probably be nicer to convert the > > > struct list_head **sn_irq_lh to a single struct list_head * > > > That would be less data space overall given the alignment > > > waste of the individual allocs. > > Does this suggestion mean that I should drop my proposal > > around the software components "IRQ" and "TLB" for the system > > architecture "IA64" in such a questionable patch series? > > While elimination of code duplication should be good, > what it means it you should avoid making changes that > are merely mechanical and strive to make changes that > improve code execution speed or reduce overall object > size while not impacting overall execution speed. I do think that there is some value in doing similar things in a uniform way, using meaningful names, even if in a particular case it doesn't help performance or reduce code size. Even duplicating code could be OK if it is not in a critical path and it makes the code overall easier to understand. But if the maintainer prefers the code not to be duplicated, then of course it should not be duplicated. julia