Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp5020948rwl; Tue, 28 Mar 2023 15:05:55 -0700 (PDT) X-Google-Smtp-Source: AKy350YantkIX7v1pi44+ZPrYtT/MUBxxSedROHtd7mrf0eLLuolA0Wb9w9oi+CveOTqv0lNE6tm X-Received: by 2002:a17:907:7633:b0:91f:6679:5581 with SMTP id jy19-20020a170907763300b0091f66795581mr145635ejc.21.1680041154872; Tue, 28 Mar 2023 15:05:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680041154; cv=none; d=google.com; s=arc-20160816; b=RlxxwBDUYzV51YUqrSZBJesfyN9fHHso3U/e3/cop//LlirmtEC2uqJxbCQCqOY7or YhYu8okKOsEW21GS/9lL3egb6sbmlx504m56Kv2EI5L/vCJLYkpV4oK2zAq/8ERCCat1 kJQSgNqcOeOVPithA8zvcpTrkr+2PsKXAVU36WK9rCSuV28yWinuvv5v4aFkbZNqKe9d o3W5SIuw1MADJgt1+IIU33iTlMrabwyqGb0kYO8mD137HBQIeWv6DyB/+X6iJFL95pFt gra0b/QvCheldXaCi5KDPCaPIgDL+4F4tHhvhM4DwhSn8EsaJjmVU8EWRtzXbJQdB1Av fBTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=rLxkuolFWCKZXPrFlMPQjelZHZ3iSSYl5Tg09kEuqFw=; b=AyyZFRwSLPCgt1u58kKLCz6Lv7Z6CymJFLi1zuiDxuiEU1zKAXlTUSs3it66j8uEEV 2UJ7W0EsgL4vWlBj+MbPoDg5MubLDTog+JSepz8zjnQNyt18auvVNWBktk5qZRslmuGG 5t9FTrBMXiEL7iBdUSSH8XAECyP+fzvDknPgKJ7FnproVuiwZwz4mCxeBka7j0SaPxvu F/Qf3J6ZXyA3cAsP7Xp+LN1A0yB+xKAtxOAr009096mUsQlPW206pS+Bn5w1MV/r5rlq uqch+xEaaq9daUCEMcCaV+RUsUElJacpjgml2fIFyjdMONMRrQf+VsQ6v8fhtbFJQBBy Lh0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=d3DHupHt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id t13-20020a170906948d00b008e8e985a1b5si31047748ejx.694.2023.03.28.15.05.31; Tue, 28 Mar 2023 15:05:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=d3DHupHt; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229974AbjC1WDE (ORCPT + 99 others); Tue, 28 Mar 2023 18:03:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58668 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229739AbjC1WDD (ORCPT ); Tue, 28 Mar 2023 18:03:03 -0400 Received: from relay11.mail.gandi.net (relay11.mail.gandi.net [IPv6:2001:4b98:dc4:8::231]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B5BF2126; Tue, 28 Mar 2023 15:03:01 -0700 (PDT) Received: (Authenticated sender: alexandre.belloni@bootlin.com) by mail.gandi.net (Postfix) with ESMTPSA id 5C1E7100002; Tue, 28 Mar 2023 22:02:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1680040980; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rLxkuolFWCKZXPrFlMPQjelZHZ3iSSYl5Tg09kEuqFw=; b=d3DHupHtgpyZn5uk+D8NQEu58+ECXt01ErHNlny0J/E0YjfOAJaSOEjiG9TI/wnH/gW/ej KPFXJy8WF0osovYQDJ34GWropPaupUo9/YOi6gsMeDHKr++/pLaN10oyBAtigCx98668at FgALOR5hLwWMksRrX0XOvtsvxzlB0sfjdzzNvu3XJSVAoz0GFsnfgppZvcMJoDjjIG56z2 4Mp6ccWaJwIrozvs8ZWwLMD7+d2exHQ9My+7GZgMW1gwRA5sbaG2j+m0P/UU2qmJJwrJD0 8ahTaL/n6mgL8LGyTq+D2KKg6kYugZnevH6PVPEC5wAKjChLgpcrN3i2PEPnqA== Date: Wed, 29 Mar 2023 00:02:59 +0200 From: Alexandre Belloni To: Markus Elfring Cc: Nicolas Ferre , kernel-janitors@vger.kernel.org, linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Claudiu Beznea , Michael Turquette , Stephen Boyd , cocci@inria.fr, LKML Subject: Re: [PATCH resent] clk: at91: sama7g5: Add two jump labels in sama7g5_pmc_setup() Message-ID: <202303282202593dfa4106@mail.local> References: <5ed1bc78-77a1-8eb8-43f9-6005d7de49c8@web.de> <9e3705dc-7a70-c584-916e-ae582c7667b6@web.de> <7890284f-5809-2f46-9d5f-52e20a3ec327@microchip.com> <7985ac57-5b33-e7df-f319-ad6ee0788e2c@web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <7985ac57-5b33-e7df-f319-ad6ee0788e2c@web.de> X-Spam-Status: No, score=0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW,SPF_HELO_NONE,SPF_PASS, URI_DOTEDU autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 28/03/2023 21:24:00+0200, Markus Elfring wrote: > >> The label “err_free” was used to jump to another pointer check despite of > >> the detail in the implementation of the function “sama7g5_pmc_setup” > >> that it was determined already that the corresponding variable contained > >> a null pointer (because of a failed memory allocation). > >> > >> * Thus use additional labels. > >> > >> * Delete an extra pointer check at the end which became unnecessary > >>    with this refactoring. > >> > >> This issue was detected by using the Coccinelle software. > > > > Fine, but I'm sorry that it complexity the function for no real value. > > Under which circumstances can advice be taken better into account > also from another information source? > https://wiki.sei.cmu.edu/confluence/display/c/MEM12-C.+Consider+using+a+goto+chain+when+leaving+a+function+on+error+when+using+and+releasing+resources#MEM12C.Considerusingagotochainwhenleavingafunctiononerrorwhenusingandreleasingresources-CompliantSolution%28POSIX,GotoChain%29 > > > > > Other clk drivers have the same pattern so I want them to all stay the same. > > This is a NACK, sorry about that. > > I am curious if other contributors (or code reviewers) would like to influence > the software situation a bit more. > I agree with Nicolas here, this is useless churn. -- Alexandre Belloni, co-owner and COO, Bootlin Embedded Linux and Kernel engineering https://bootlin.com