Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S935685AbcJURdt (ORCPT ); Fri, 21 Oct 2016 13:33:49 -0400 Received: from mout.web.de ([212.227.15.4]:57176 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S934008AbcJURdm (ORCPT ); Fri, 21 Oct 2016 13:33:42 -0400 Subject: Re: Hexagon-setup: Combine four seq_printf() calls into one call in show_cpuinfo() To: "Theodore Ts'o" , linux-hexagon@vger.kernel.org References: <20161021154624.maiwbgjmzlzhin2l@thunk.org> From: SF Markus Elfring Cc: Julia Lawall , Richard Kuo , LKML , kernel-janitors@vger.kernel.org Message-ID: <48d54097-6be3-d39d-2af9-d4ad90c3c417@users.sourceforge.net> Date: Fri, 21 Oct 2016 19:33:30 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: <20161021154624.maiwbgjmzlzhin2l@thunk.org> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:Zddb3lsQ7RxtcbcR4pF3kUgLhdXENVc+BbZIHND5l47He56rsag nRfJoep8mF21KopIfaOjbkkZguGzmEKkTL3ZwDjyECH6tpbea+upqvqwcOGHGNwaaue09FV rYT4hsd7YEEodIZG3zB9mKIiyys+VIBPuZuFJ1GERR7eNglYsUPDbTQBA5leUBQYAPShPbU AnpuQngaxykqFqO1oIyyw== X-UI-Out-Filterresults: notjunk:1;V01:K0:giS2OjFG9s4=:a3smzeVx4COylXNgUNwvkC lHrNYVaxFbOP2jX+NC+yPUTeIHNbMoyrtj/4JRIBnrzf4EWe5rHrpnlE+8A9dc3n2DkaCBNrS IJzAhvM63pcx/BN8jpssZFULhVumVp6wrYmfhBtmt5OrRK2HOgMwB3YYrwyCgUIq/SUXBk89j xs+502ypVxgya3Ybzi743Bys7hTzB0EroQ4sAjUyQX8oH62Y/zkEkinrk/B+PnBcbzr6BJHmT RrmoUm54s5Opdg967KDLrHTU+f8L/1AYbGgVWUidDjm45GPqDaInq7H/SVwZTY2VB2BS6TGy3 8/z43jEFFEJMK34DwU1OvmiqdIsrJHJCjGAATnb2Hu8IXskAyvyzq4p6AhgYnCs1Ffcu9OfKZ X/+IhNVCcmWTFClnA2qQBz0s+9c3Eq2lyYb4fd75E5yp1JIzx3y3kx9CPohLFF5DVooHkhjhi pmcQ96rvubhQ4GZbdy42Cs/BzveQD23Ai5u5PvuVH1ugrisolUuObFKkzPLFlBrr+lMm3E3WJ M37m7+F78B+Z9hC/mpXdGCkwtVKGgn77PhmHGS1yNEVlXoGnk3tCoysDmCZq9Ij0Iz7pL/GRq nerPxB4K/0FpxKV0jmP7HkhJdfwtNUWyHxZZ0e/DTr2+mua2zUk1CgnLtrX0Dfz22C6vfogFU UudddO7gbgAmSgQ4wR4TyjFUSpImwLxFcso2IF4sK006AXIM9belHaKUrQLoRGqkZjlkTk5H7 6umXe7aD0wrNYZoWrpvHj6BDmlE1uI9tvMj9gVV1nQ7iD+x4v62uOTnZ1vnJkU1v5uq1zFlzL Daak7FU Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 956 Lines: 36 >> Is it really so difficult to interpret the suggested construction >> of a single (and relatively small) format string? > > It's not so difficult, so much as it makes things worse. It's easier > the way it originally was. Thanks for your view on this refactoring approach. > It might be interesting to see if the compiler could be taught > to collapse the function calls, How does this wish fit to your previous rejection? > but (a) this isn't performance critical, This can be. > and (b) the number of bytes saved is really tiny. I imagine that the corresponding code and data size reduction could be occasionally useful, couldn't it? > But at least if the compiler was doing the work, it would at least deal with > it everywhere. I would find such an optimisation possibility also nice. Can it become acceptable to achieve a similar effect by the application of scripts for the semantic patch language in the meantime? Regards, Markus