Received: by 2002:a05:7412:b995:b0:f9:9502:5bb8 with SMTP id it21csp5547838rdb; Sun, 31 Dec 2023 06:08:23 -0800 (PST) X-Google-Smtp-Source: AGHT+IFrjlySa0NgLrfbOdVtbmXsMVxV30lP0ujNzes49BNJFf9HC5shpYf3TbyJBy3rUGfku4FE X-Received: by 2002:a05:6512:48cf:b0:50e:6f8a:77d8 with SMTP id er15-20020a05651248cf00b0050e6f8a77d8mr4408282lfb.13.1704031703518; Sun, 31 Dec 2023 06:08:23 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704031703; cv=none; d=google.com; s=arc-20160816; b=rQiV9vXB0F1ExkNPEBxLHnlq+mo2Qn2BR9PrbFyIMCReqFpNrjE2jXu0wdfAQDvGrU 9jnMkqDfo26wY3cXHBomLotmOiurD/QcMK9yilMSlnYHQB/+LJ4mR7z84JtVwmRR5OAw NWuTZyvUzUqoD5/NkX0dlT86Xsn1NGyywyX0aIXVbu16DA6ne4YbODP3UX9oib617MS9 JLb5p64I1Zi7B7Nfla+4VgtbUbzwilJ405KRrX3RC3h0yf53x08BdV7R1Nd9Ga+C7qch E0XsMQ2OMXLhw+aP3wtTNsYxg0isjQBE9y4bkEEsZZRzuLUWPAQvQO4AP/ntXKX+Hui6 oVCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:user-agent:references:in-reply-to :date:cc:to:reply-to:from:subject:message-id:dkim-signature; bh=/uM23a1DykmVUSnyJhKoNd/pLzJUVQGzc8LClp1i+c4=; fh=xnWyESOwckWe6xBqISpbw7I6uoDfPiIa8Ky9gaEICLA=; b=NAwYBzl7fTxw6roGOMm29y5YFMrzO1OWzLPliLCOqApFDkdiy7REK8kDfKhLMK/6oY N9ZbPCGYH+PF7B4WeRcn4Dl40DSg2XnDLL2P2htUgIfOO15eQgtpopfnrgsbdrLDz1QN UHump8yb/jttEtwfISD/NptrVaN0tSuck6GZVMBO0+qfxvV4qa+C1R/6ryfPLiPJzZ7z G3UiZSPaUSS0TfajtJvubnCf5LEEsSGqYxkBthaLK0rZSee5bzplxLY1Q8b0Oi2C6GbC D2AGxsPN/HaI4TOCDEAfL3m5QU1azx9fk0o3w8g4Jb7mv3ENUMmbUkuARsnqObvHSR95 7D2A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=I5Rsre8W; spf=pass (google.com: domain of linux-kernel+bounces-13710-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13710-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id m23-20020a1709062b9700b00a27d61e1564si763314ejg.414.2023.12.31.06.08.23 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 31 Dec 2023 06:08:23 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-13710-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=I5Rsre8W; spf=pass (google.com: domain of linux-kernel+bounces-13710-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-13710-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id 443DD1F21570 for ; Sun, 31 Dec 2023 14:08:23 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 2D9CE6120; Sun, 31 Dec 2023 14:08:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=ibm.com header.i=@ibm.com header.b="I5Rsre8W" X-Original-To: linux-kernel@vger.kernel.org Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4408C63A7; Sun, 31 Dec 2023 14:08:07 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.ibm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.ibm.com Received: from pps.filterd (m0353727.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 3BV8QA1Z003121; Sun, 31 Dec 2023 14:08:05 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : reply-to : to : cc : date : in-reply-to : references : content-type : mime-version : content-transfer-encoding; s=pp1; bh=/uM23a1DykmVUSnyJhKoNd/pLzJUVQGzc8LClp1i+c4=; b=I5Rsre8WTcCRXkQ3neHKlQoHtyml0m9oQc25vVZI9ObgJHsywbXvaE6E31wPWK043gPp tYgdPzOs7p7iyJQnte+0HK/iDw+KKyt3KzKVDA4+5z6/OmzBqvl9gM9HTNbgJHmBUh/M VD+L96k8ZS0uGZIXnpkyPUDASlZV4Nzx59pczon3gzCR/hjDzxBWrwg7CyvNK7E5BOVa NIJT4Qexzg/Mk2Z2OjoKQV2ofPFzllXgvkT75EgL4mp4YPbSWhmRXhwwmhTxfSC1RTxX gmlsAI+XbJC+aVQ61R09On0KAbph77pKf++Oe7S2UHzS08W3LM1mu9fpoQogDjkwpBl4 3w== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3vak6f2ag3-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 31 Dec 2023 14:08:05 +0000 Received: from m0353727.ppops.net (m0353727.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 3BVDxBEZ029654; Sun, 31 Dec 2023 14:08:04 GMT Received: from ppma21.wdc07v.mail.ibm.com (5b.69.3da9.ip4.static.sl-reverse.com [169.61.105.91]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3vak6f2afn-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 31 Dec 2023 14:08:04 +0000 Received: from pps.filterd (ppma21.wdc07v.mail.ibm.com [127.0.0.1]) by ppma21.wdc07v.mail.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 3BVDj9iA007335; Sun, 31 Dec 2023 14:08:03 GMT Received: from smtprelay05.wdc07v.mail.ibm.com ([172.16.1.72]) by ppma21.wdc07v.mail.ibm.com (PPS) with ESMTPS id 3vaxhnjpae-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 31 Dec 2023 14:08:03 +0000 Received: from smtpav01.dal12v.mail.ibm.com (smtpav01.dal12v.mail.ibm.com [10.241.53.100]) by smtprelay05.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 3BVE82vO17433138 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Sun, 31 Dec 2023 14:08:03 GMT Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 95F0758058; Sun, 31 Dec 2023 14:08:02 +0000 (GMT) Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 545CA58057; Sun, 31 Dec 2023 14:08:01 +0000 (GMT) Received: from lingrow.int.hansenpartnership.com (unknown [9.67.79.160]) by smtpav01.dal12v.mail.ibm.com (Postfix) with ESMTP; Sun, 31 Dec 2023 14:08:01 +0000 (GMT) Message-ID: <775642a320f7dae53d70610f265056bcdfd8ab13.camel@linux.ibm.com> Subject: Re: scsi: ses: Move a label in ses_enclosure_data_process() From: James Bottomley Reply-To: jejb@linux.ibm.com To: Markus Elfring , linux-scsi@vger.kernel.org, kernel-janitors@vger.kernel.org, "Martin K. Petersen" Cc: LKML Date: Sun, 31 Dec 2023 09:07:59 -0500 In-Reply-To: <38dfe7b6-6d8b-4056-9943-12197c80f4d7@web.de> References: <4616e325-e313-4078-9788-dd1e6e51b9e0@web.de> <9d24844f30604f969ac10da456801f594ce72f2d.camel@linux.ibm.com> <4018ab9225ecaf18501e54114a94217a58a8a57f.camel@linux.ibm.com> <38dfe7b6-6d8b-4056-9943-12197c80f4d7@web.de> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-ORIG-GUID: djWPtmrHUpMkdhmwwenP19MDP89Ifvn2 X-Proofpoint-GUID: vFr7PqRaRso_YZKBlAOYJp00uqQ-d7az X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.272,Aquarius:18.0.997,Hydra:6.0.619,FMLib:17.11.176.26 definitions=2023-12-31_07,2023-12-29_01,2023-05-22_02 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=15 clxscore=1015 mlxscore=15 priorityscore=1501 bulkscore=0 suspectscore=0 adultscore=0 lowpriorityscore=0 impostorscore=0 phishscore=0 spamscore=15 mlxlogscore=74 malwarescore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2311290000 definitions=main-2312310116 On Sat, 2023-12-30 at 15:25 +0100, Markus Elfring wrote: > > > If you would dare to follow advice from goto chains in a strict > > > way, I imagine that you can tend to stress the attention for more > > > useful data processing a bit more than such a redundant function > > > call. > > > > It's about maintainability and simplicity.  Eliminating kfree(NULL) > > doesn't simplify most code, > > I find it easy to avoid such a call in the affected and concrete > function implementation. I find it easy to fall down stairs nowadays; that doesn't make it a necessary or even desirable thing to do. > >                             it just makes the exit paths more > > complex > > Where is undesirable software complexity here in the repositioning > of the label “simple_populate” before the statement “buf = NULL;”? We don't just apply patches because we can: code churn is inimical to software maintenance and backporting, so every patch has an application cost. The value provided by any patch has to be greater than that cost. kfree(NULL) is an expected operation so there's little value in avoiding it and certainly not enough to overcome the patch application cost. James