Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp3980874pxb; Tue, 10 Nov 2020 05:16:37 -0800 (PST) X-Google-Smtp-Source: ABdhPJwHsm2Q0VbEJklwC2QmQ5Ne48jPFt/jaP0hUzjbA4AQP11LMUQJTY81RLiSEz4BxhO6kiIX X-Received: by 2002:aa7:c4c2:: with SMTP id p2mr21451410edr.371.1605014197238; Tue, 10 Nov 2020 05:16:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1605014197; cv=none; d=google.com; s=arc-20160816; b=A0RavrLwQG8OFyYiNEcOIElHdzL95qhxhM7oCWBaK0OSLtGJdtd1h9fQ5YhAHOVbrJ 8P+8Y/8O9pg1yPHsbjllcSowW5mRNp/eErmK0tFj5g2p2GUPQKlC3DFtTz7w6lQ9BGN2 /+Tb05voUgJ3nyRvoqx8vz9W+e8ndxAiP/60etxWGMatzleKiW+1dVJvH43cHgddhpzj TukMm0sb/m5M9rUU0MWQeQ0Ip459MiREEjnUhVH3kcj1nizjgVyParmYBlum/nwATvOQ UP64IYwuH0edUdrRxFXg5icpdZubyplFx3+m4HLHWhpEN6r3pwGUdEOjcdPckpmW3QEs +f5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:date:references :in-reply-to:subject:cc:to:dkim-signature:dkim-signature:from; bh=IW9cOAgIqp2aiZ7VDlWPW2DwmFJzPVsCmee9IuyxOJQ=; b=Zw9q+mIYK4dSMne55y8DAMF6/rkA9QntRlujccobzgC0lZmX/VwjKilEJ6iRQg2jLp NzExF04Rtg9saKtc4NsS5SALe6KvF8nYbZgPCoki+8J7zxazXCgLQ8A6qFlmZkm0rN7M rLCfZQhlzWK3MEXQpZ7+vAc5j63pJLI07vo8Zi38n6ekcCLuFSt549rPvVyj8WnOLkBB iokfovUOCWSrb7hgJMZOhZ4mrI7/v48OEnT+Auqb+VDnUiJEjJ3lU02nOr6BhZkQ52fY yUiHRfDaNB7Ai/C5A68p3+/zTgqp3G59jqQTY7oqwp3D3s/udfNxd4RiTBncU7KjIka0 gFlg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=OXe6LqMA; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=lASBIaA5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t14si9710115ejy.440.2020.11.10.05.16.11; Tue, 10 Nov 2020 05:16:37 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=OXe6LqMA; dkim=neutral (no key) header.i=@linutronix.de header.s=2020e header.b=lASBIaA5; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=linutronix.de Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731076AbgKJNOh (ORCPT + 99 others); Tue, 10 Nov 2020 08:14:37 -0500 Received: from Galois.linutronix.de ([193.142.43.55]:58414 "EHLO galois.linutronix.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726721AbgKJNOg (ORCPT ); Tue, 10 Nov 2020 08:14:36 -0500 From: John Ogness DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1605014074; 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: in-reply-to:in-reply-to:references:references; bh=IW9cOAgIqp2aiZ7VDlWPW2DwmFJzPVsCmee9IuyxOJQ=; b=OXe6LqMA4M1Rlo3SZSZBlNkrB1dVwsyK1vc/xE320zd/uhGgyTLoK/BMX8Zt45iBfa5S/C uuoYMxjfzxPLZYoFIEVbpNfyd/HeXs6rzLRwclmSiZDZbeLumafme4RRIepxWSMYwATsQJ VWDKFhOuvxiVOC4NPDVk5CQw8iRUUL1cD9FfJ0IBzsvB+Y/bzqUfXGHtVYJ6fKC9O/+Yxs 0mno/2P4nFDzyVH65BWhTl9ce8DzwQtiWTloQGdmKk3D83+aJpnryfS5gr8aun6jEe7IfY qjPLMQA4g1WU/spJmM0xTKshNSjPKpyPKVWA23OBMCuSuvfEyQvWRNc9Dno6jg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1605014074; 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: in-reply-to:in-reply-to:references:references; bh=IW9cOAgIqp2aiZ7VDlWPW2DwmFJzPVsCmee9IuyxOJQ=; b=lASBIaA5znIIjR1seuwRzjiGEgUnP2Gz3AVIC2iETXI3DHaXBR60cVRNiw2IvMcRxKggOi /e6zSUUQ3bc7hkCw== To: Nikolay Borisov , pmladek@suse.com, sergey.senozhatsky@gmail.com Cc: linux-kernel@vger.kernel.org, rostedt@goodmis.org, Nikolay Borisov Subject: Re: [PATCH] printk: ringbuffer: Convert function argument to local variable In-Reply-To: <20201110125012.353456-1-nborisov@suse.com> References: <20201110125012.353456-1-nborisov@suse.com> Date: Tue, 10 Nov 2020 14:20:34 +0106 Message-ID: <87v9edqrph.fsf@jogness.linutronix.de> MIME-Version: 1.0 Content-Type: text/plain Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 2020-11-10, Nikolay Borisov wrote: > data_alloc's 2nd argument is always rb::text_data_ring and that functino > always takes a struct printk_ringbuffer. Instead of passing the data > ring buffer as an argument simply make it a local variable. This is a relic of when we had a second data ring (for dictionaries). The patch is a nice cleanup, but there are actually several functions that could use this exact same cleanup: - data_make_reusable() - data_push_tail() - data_alloc() - data_realloc() Perhaps we should fix them all in a single patch? John Ogness