Received: by 2002:a05:6359:6284:b0:131:369:b2a3 with SMTP id se4csp4923868rwb; Tue, 8 Aug 2023 16:48:12 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFIcR7tUvRyg4zdVfCuCJbUSsnpn5CoU7tDFUIJ8IXdhAbImRtZpdmQLWmFagAqOtNw2VJJ X-Received: by 2002:a05:6358:718c:b0:134:cbff:c5a4 with SMTP id t12-20020a056358718c00b00134cbffc5a4mr798792rwt.18.1691538492360; Tue, 08 Aug 2023 16:48:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691538492; cv=none; d=google.com; s=arc-20160816; b=O1Tn5dqIkvAG2FFm3NOpwfGOivz7NVbhyfsSKFW3FSmBNffrsKabujaf/feei9Tnz0 opuoe7zAlaw9YN+u5exuK6jUT/AweIewiVy9wa3TzFks8hPtuZJUcKjKfzk9XVDV/gUX nkfmKmnYt2uXzQSg0+kzIFcBemWBmfVMnVVLnC416rviCMpHigOM/vGlBc4a0Dr09vcz 4423i0wg4lqx9dDLn26VDpHu+DW7uFjeR3Smzoi9ddzfXRObG4XYLd+yISXPD7Pn0izr /S/96YCstiwdDvl8ze5wY1Py+mQdt9n2yuj2yACF4rfKstW7t71Jth8eGwtbfd8bdV8A IwPQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=cSzBnJMOZpyhqxywo7ZLcY8CEQXL63nvROJA1Hi2cWw=; fh=sNF6XoXyCpLWEQbRkRMjWtFvPwrh0reQH5Psvuipuyk=; b=PNeroRk3Z9wL7lC2FjhGIJLbzPTBm59qb3w+rCN6qJPLdy6Yr3TK9cn8QO4WwYMV9A UUu+oD97G6vRUWJnqFCiWVQ3I1FynOZhrfZxu6RMHG7cAQxuUL+bP27kI4MvoB097Uw5 ZNjfL+q6nhNKD3v4e5SVrS60z6cYPgKW9MspdZIxY1UeMmzaCn3zhoW8WyRUt1jmzXBo coewZCaMlJH0/qI8gwjTaukAurWkMPkXZawu3EutC/gFlApOo1pQp/w3Dx/cGp5US10k oNygbToZhyAD2zKapelFcs4dpV0GJoc8mz+V207XS+bvVauPFxe4oJh0b67Bz07M+any lvTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=OzJPPGPO; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id bg26-20020a056a02011a00b00563eff1b064si8016140pgb.504.2023.08.08.16.48.00; Tue, 08 Aug 2023 16:48:12 -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=@kernel.org header.s=k20201202 header.b=OzJPPGPO; 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=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229671AbjHHVz2 (ORCPT + 99 others); Tue, 8 Aug 2023 17:55:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55658 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229585AbjHHVz1 (ORCPT ); Tue, 8 Aug 2023 17:55:27 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2E1F6EE for ; Tue, 8 Aug 2023 14:55:27 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id B093C62D86 for ; Tue, 8 Aug 2023 21:55:26 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DD1B4C433C8; Tue, 8 Aug 2023 21:55:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1691531726; bh=DfGJgoICFpbwodUyconrw7br4Y/aAGzc5ytewSxQ1sU=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=OzJPPGPOV+tbgfBpKAWCXhCHqQLkYp/qSVn7Ph8ut4zwTxbqQ5Mvl8PpBVN5JGN2+ B53k0ySEc+F15n1+2eRyv/qDqJLvpen8L23BbGg+ArWPRMpo5c292tnFElyGhHsnQw FnXm6Me5Q3G5v3Uk3/8+eHSVhs/Vs9U271Th0qrkA1aQ1mDWdVIXbXgGZrP2n/A/ST 0OohWs5TnIFvQnNrG34m8/9BKTetBq9Xbl3vI7mWHdGPvbX5j6Vn8QHrKY5pATDTY6 K2x75VlEe1Tke4++VcJT1VxMbW1yUICJz+ZEUVCuFtyFBDNWmmo541X2Mijk7OmVUw 33g84hDLwwEFQ== Date: Tue, 8 Aug 2023 14:55:25 -0700 From: Jakub Kicinski To: Breno Leitao Cc: rdunlap@infradead.org, benjamin.poirier@gmail.com, davem@davemloft.net, edumazet@google.com, Paolo Abeni , netdev@vger.kernel.org, linux-kernel@vger.kernel.org (open list) Subject: Re: [PATCH net-next v4 1/2] netconsole: Create a allocation helper Message-ID: <20230808145525.61840a76@kernel.org> In-Reply-To: <20230804124322.113506-2-leitao@debian.org> References: <20230804124322.113506-1-leitao@debian.org> <20230804124322.113506-2-leitao@debian.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham 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 Fri, 4 Aug 2023 05:43:20 -0700 Breno Leitao wrote: > + struct netconsole_target *nt = alloc_and_init(); > + int err = -ENOMEM; > + > + if (!nt) > + goto fail; No complex code in the variable init, please. Makes the code harder to read. struct netconsole_target *nt; int err; nt = alloc_and_init(); if (!nt) { err = -ENOMEM; goto fail; } -- pw-bot: cr