From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754510AbcGZT4i (ORCPT ); Tue, 26 Jul 2016 15:56:38 -0400 Received: from mout.web.de ([212.227.15.14]:64533 "EHLO mout.web.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752732AbcGZT4g (ORCPT ); Tue, 26 Jul 2016 15:56:36 -0400 Subject: Re: staging: lustre: One function call less in class_register_type() after error detection To: Oleg Drokin References: <566ABCD9.1060404@users.sourceforge.net> <566D7733.1030102@users.sourceforge.net> <56784D83.7080108@users.sourceforge.net> <56784F0C.6040007@users.sourceforge.net> <20151221234857.GA27079@kroah.com> <59d94e70-7476-728e-5f63-013557ec2db9@users.sourceforge.net> Cc: devel@driverdev.osuosl.org, lustre-devel@lists.lustre.org, Andreas Dilger , Greg Kroah-Hartman , LKML , kernel-janitors@vger.kernel.org, Julia Lawall , Bhumika Goyal From: SF Markus Elfring Message-ID: <0f9ecc7c-f98a-0296-563b-6fcfab459c31@users.sourceforge.net> Date: Tue, 26 Jul 2016 21:56:20 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.2 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Provags-ID: V03:K0:rIWAu/Q/ag9zx4TmO335JZSHCGP7B3F66Iza4jGtFCmJ4d2Ftkr 14wrCdzQiF3hkV6kxqVofUPL2YnMGQCe8+VE4BmR61OiD9Q30+wFP1arl6SVr4lQXx3VZYI 9YY5HxpljxX4XJIhVXMQQyfwIHHiqxdgCT4AcmpzGhcpHWW/ynCCisO4uP4GySc2YJIevF8 laWm2hItmtgeDXLjKvHiA== X-UI-Out-Filterresults: notjunk:1;V01:K0:XDsIwTU+7ts=:sijKArlRqbsKzpRzgIRprx CfHiu2VWn5+2UDCcrLqX9rfRD4wmGm8AcbV9ngQ5gIdGZlXreHlUo54Chz8lALNUSBs1B6b7B HXkp4EGYeAUKE1Xh0WAGEg1UL1zvAnMb1DUuPez4sjQ9F12KshEB4WEh4nQ0D+N5eHQcUHhQW yxM7NBWo7iFArENK8w7r9lKYhmBBwXD4fawUKuLepzqyYSGiPxq+v7RW1aeTJ1YOlE1me1Av9 zDZ68LAUjBv/lra4yMlC1lgjk6yYh4Tgm/qHHXEGBXv9tkw1juZBmLFnsjw8Cxe2savURTwtp hlKgsSWO30dklhi9DMv54csd/usV1Cjfw7ORut2foaWOO7l2vF0RGAM5YmAuJhLMBi+bJ+LbR 7gnT6W5akOqeX6HrM/6uHTwIg/eXEqNs+cI4OzucEPOCeVZCuS/2zeLv9G7fsMDVmcl0hS1Am Bn4uCW5RLqBJaVLuA1UVpD1NwmIS4/hrhnIF+U16e2bWIuoFZhPBsPTUdg6zcFy6L8ymi+xaM jb79NDO538VQBL3Q+ASP2MqSL3sT3jr3JQyBCMkW54dz3Z78YjMQ/CUN5grgxpsPMfRP1DCJ/ x7NQ3PImLM1mItkkUjEiVkjW5JGgRFh13czZVQoLK4ZgdLBWJjNthtwTTnXu8p6NeK1GLVPZ3 LtbFu3yNmyvBfMU0zk2khn81eEpKX7mOzHJiwESx8ac0ifjKmq25GQzCus84sUl3qkdsXQaV8 jwtd41Rjrsb7RKVd1G7ocgbZTBrxUnhH4CchNN9CHzFjwouud4IOBEKJ5iEFPZVLE+2DW9E8y STUFXrG Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org > But kobject_put() already checks for NULL, right? Yes. - Such an input parameter validation is performed by the function implementation. > you just submitted another batch about that in other area. I sent update suggestions because of this function property for two Linux software modules in the year 2015. >> Adjust jump targets according to the Linux coding style convention. > > Not that I am totally against this patch, Thanks for your feedback. > but when we do not need the extra checks, a single jump target is ok too in my mind A single goto label will look convenient for a while. It will often work for several use cases. > (extra benefit - there's not going to be any chance of a mistake to where to jump to). I have got an other opinion when you would like to care for a bit more software efficiency. > And when we have a single jump target, there's no supersmart naming > like free_this_and_that_and_that_other_thing_too. How often do you care for efficient exception handling in the shown function implementations? Regards, Markus