From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753334AbcLLHeK (ORCPT ); Mon, 12 Dec 2016 02:34:10 -0500 Received: from mout.web.de ([212.227.17.12]:49734 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750984AbcLLHeI (ORCPT ); Mon, 12 Dec 2016 02:34:08 -0500 Subject: Re: [media] bt8xx: One function call less in bttv_input_init() after error detection To: Daniele Nicolodi References: <5560ffc2-e17d-5750-24e5-3150aba5d8aa@grinta.net> Cc: linux-media@vger.kernel.org, Alexey Khoroshilov , Hans Verkuil , Mauro Carvalho Chehab , LKML , kernel-janitors@vger.kernel.org From: SF Markus Elfring Message-ID: Date: Mon, 12 Dec 2016 08:33:43 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.5.1 MIME-Version: 1.0 In-Reply-To: <5560ffc2-e17d-5750-24e5-3150aba5d8aa@grinta.net> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:fb3w1bGuCrVoUAnOlqoQoVXk3vL6YZV0XAVX7p+0rAO4TP9g5mb SaBzXu/EDWee23vOgFPLDX9WEPqt7rCWcmue++tM/Q1QE98notcZVg14jLPUAt73k/zeZcM STB/hfUO11qzrACFJb8bSNhhy1FFrepooElg5TgMeyD8cMqZ1gMAwMZi3aO4ZkV39+TDuKV VQphvITI9VsY6WrDpXYcw== X-UI-Out-Filterresults: notjunk:1;V01:K0:m71BVa7dk0A=:QdxwiIHGGTSi9ypMmhoqXi ekLKqeRQTKo0g+6cblcvtnClg9skgd6ZjCxULl8j+dDtQ/LjwlD1kEoEgJQDloTqL30sFJ1cp 23d2g1cL5pNBFx56xxDWU4iVydQBJXQlPCNoFM2uyeTyQ0VGPMIzNSFp9x1t+rmdBblSlxtFa 8+ETucT22nJWBVIEFcnGYok/Pf98ydD0wQhBSOpuPULG2jCHgu+IwtDXGlzCHTDEPi6qXBQTO 2Gnn8q1/MZc8rHUFBdSQs/AjT5CFZF1wOOwUyp4kSKMWUtuAFxsTOR0ewn6KWwpeIcDuI1xFL jvRb8IqF/Jxam63j+SLkDdj3Glvg2OzyBGAbVzTQ7u03qIjgvqJJfkSjLhjvqsZkoMdt2GtBk ORIr8Cy0zdxClTMPRu96mXtk8ZUn9brv3PQoXZxQ1SV2sD75eVDsLz+nuugE+w8+pE7dbdyQU eIBoHQ7lA59VIPdw9cLSH5Datz/l4dv9oG56eATkeLpnACe6tQSfQ+sPr+9f6c41ZEGW0Sdgn 96RkWX3WX6N0kMZzF4uLQiaVY/blOv9460acbZFm2tDDwHHgYs/fL8778JxZu2pfYBpogoGDZ XwEoin+CQJZW9MDV/kf1zKcY7ZiPKl9CBJ9AKozLWZtejBMqASTSm5OCLahdpgkK2Sv45xAzk Sel6Qygq20dx5XDsNS6gJ7xHVWr/y1XXLGF44/PgGhehnIVYXKhFAhcoJhonqFRGTC38gbBvb HkeuHBAaT3ZCFKPZ4T3AJWD3IizY95XTBfa2UTx8pr9H0IlTmUr77ZpDGPiwdssqlE0oUnJXA UR6T6LT Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org >> I would prefer a safer coding style for the corresponding >> exception handling. > > Can you please point out what is wrong in the current code Is it useful to reconsider the software situation that another memory allocation is attempted when it could be determined that a previous one failed already? Are two successful allocations finally needed to achieve the desired task? > and how the changes you propose fix the problem? I suggest to check return values immediately after each function call. An error situation can be detected earlier then and only the required clean-up functionality will be executed at the end. > No one has expressed acceptance for the kind of change you propose with > this patch, or to previous patches you proposed changing similar constructs. I got a mixed impression from the acceptance statistics about my published patches. > The fact that you propose over and over again a class of changes that > has been already vocally rejected would suggest otherwise. I dare to propose another look at results from source code search patterns. > The major achievement you obtained so far is that one of the maintainers > of a large fraction of the kernel refuses to look at your patch submissions. It can happen that some patterns are occasionally "too special" to grow the popularity for such change possibilities and desired software improvements quickly. There are also different views about affected implementation details by the software development community, aren't there? Regards, Markus