Received: by 2002:ab2:1149:0:b0:1f3:1f8c:d0c6 with SMTP id z9csp3039089lqz; Wed, 3 Apr 2024 16:55:37 -0700 (PDT) X-Forwarded-Encrypted: i=3; AJvYcCVfsiGfF+FaqoiVI5RL8TuATyzQ5OF8LGedarsMu6fbCBxjTAyKsE8hIdTZPMaotUmiDlliq5w2SukoJL0owC/hP6hYpQAwyv4QlrkN6w== X-Google-Smtp-Source: AGHT+IEp5pkbLxxcpxBMMgyi3dZcEGP3p7LMAbHZE1c8ZGLhoivqo+gSnK6KtGc1wT/dEfgb+g8t X-Received: by 2002:a05:620a:b8e:b0:78b:bb19:b77b with SMTP id k14-20020a05620a0b8e00b0078bbb19b77bmr869935qkh.78.1712188537738; Wed, 03 Apr 2024 16:55:37 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1712188537; cv=pass; d=google.com; s=arc-20160816; b=Wt3XTb3uwBQPENkiCxkLlN05gu0d6TeekY6vtKcthLbPCrvf8ykLD/kc0/TQWKB171 4FEQG28Z2yGlVg78wsKxiBROwFypt9Q+sispyDWNAsvtXPxjOMXqzI77cTaSm3nFjpZL gpY8MfNDN+uPRSbudBognnWb32qkyt3RTdX1z3EwmhpyIrXYOv2X9CtVoT0RqzFeSykq C8deAJ98Q+O3/Oa5S+qe36vj6T/PCIZqBsTV+qr/QFChZlA1kDUnUFva3DoP3Z5/nLDZ +JxNofmJr8SyiX42sfdL93th0NqlsXNC0JZAKyswHaDq+4zwt4gZQYP1VtZuMoyDwEck tN0A== ARC-Message-Signature: i=2; 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:references:in-reply-to:message-id :subject:cc:to:from:date:dkim-signature; bh=OsRsdKYcQaVML2LC9dlfoRSjHCxDcCGqQlR7k3EnBtE=; fh=ZoJBePKFo2X7UAB7sPLrsM+YuIOZh/JJ6zHr2+cWvss=; b=PyL1DxT0nZoSydYfoOJ9J9BN5LpTaiAlpT+kDG2RhJwG8gqyrxvdHmps4G8618FW1A e+gcb5LYXqhzdawKoScEcbgaOv08UBk/DK7aTbDtqgmrrPN/07ybShZ1ydAVzMg8PL4y QiAeh6QsS91SlAOx1o4qFxENC0VxVG+y19c9p7mhRBr0s92L6QXIjPX8eZKYf4tWomHD qbl2FlvdMPA/oCZ7yvSVIKrzF3si/z9tXpuWihV7GRxYID2Gj8l3nP65ePJLbFemoR/k Grxbp9dQC/YRECLVWf4bXxTbqhFKN9/AvVQ6YCp0/vjh8rFsKpA1l3hTXnooKdqh5XyL 8Vvg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CSX60lOJ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-130754-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130754-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id y20-20020a05620a44d400b0078bd94ff022si11426801qkp.235.2024.04.03.16.55.37 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 03 Apr 2024 16:55:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-130754-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=CSX60lOJ; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-130754-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-130754-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org 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 ny.mirrors.kernel.org (Postfix) with ESMTPS id 76ECC1C20F4F for ; Wed, 3 Apr 2024 23:55:37 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5F46D156C5A; Wed, 3 Apr 2024 23:55:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="CSX60lOJ" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 78CE5139D; Wed, 3 Apr 2024 23:55:27 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712188527; cv=none; b=Pjep+Y285hmdQrpRGvzNbVIlX4UP7FyUuPNIL+tVpnNEux1rQ3p/9xDOIdFhQjouieI651+CDmackOAaIqEJ6KMvnw/+YLopiL0wc2tVAjWiFXHOnJrxsItC7fBHzwahqVE8eldmsFZ66dgeR06Eu9LxzwBOS/VA1DRK/v5EeX4= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1712188527; c=relaxed/simple; bh=HWHBdM5a47wfjfWmcaNM3oH6e3DQ6PEyk5hcv30TTn4=; h=Date:From:To:Cc:Subject:Message-Id:In-Reply-To:References: Mime-Version:Content-Type; b=Z3yjUGBxLT+6xIM3Pad87pn8Gkkm3z13t+ogbdasqtHK3oxFvfcPObUQbmT+CtNidQfDRLOWXbfADgXG9Dg/uaOW/fGDT4DCU73eYKx+zKR4gZ1YsQxyONRe6D3pOyiv8OoS/SjhX2W7WQx6H0JqSXA1zmdc7ADMGZab3HJu/7Y= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=CSX60lOJ; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AA36C433F1; Wed, 3 Apr 2024 23:55:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1712188527; bh=HWHBdM5a47wfjfWmcaNM3oH6e3DQ6PEyk5hcv30TTn4=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=CSX60lOJpUVt/g+VfUjC5n6QM20vfeqZCF2mvJKXLloZhBG936KkYNAcXK+zfkdAv PaRjfysfe4887jJeoKZEMTi98/a4k+GGVYzo8mK9/HfgLq61PQAqL9ZAdjHAlE/y49 yMlb4uhUFsgTjDtx4zVhaBmDLUYDBHAOnPp26e9zA4aNGBwUsp/sTV1I/3/UpKY1T7 ep3zamJcF8CQb87lD/8pnVVBw3zQWM96tQpf5YV6uTbPSrzTvJcwM7sr9g13PJa4KH N2PPaaJy9liGDBBq2eB7ptHxYHi58CgxGo0m5r606yKUkq19M8P3LhmSqCvDaNU9K9 8AT4CSreSSMGg== Date: Thu, 4 Apr 2024 08:55:22 +0900 From: Masami Hiramatsu (Google) To: paulmck@kernel.org Cc: linux-kernel@vger.kernel.org, linux-trace-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org, Zhenhua Huang , Masami Hiramatsu Subject: Re: [PATCH fs/proc/bootconfig] remove redundant comments from /proc/bootconfig Message-Id: <20240404085522.63bf8cce6f961c07c8ce3f17@kernel.org> In-Reply-To: References: X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.33; x86_64-pc-linux-gnu) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 3 Apr 2024 12:16:28 -0700 "Paul E. McKenney" wrote: > commit 717c7c894d4b ("fs/proc: Add boot loader arguments as comment to > /proc/bootconfig") adds bootloader argument comments into /proc/bootconfig. > > /proc/bootconfig shows boot_command_line[] multiple times following > every xbc key value pair, that's duplicated and not necessary. > Remove redundant ones. > > Output before and after the fix is like: > key1 = value1 > *bootloader argument comments* > key2 = value2 > *bootloader argument comments* > key3 = value3 > *bootloader argument comments* > ... > > key1 = value1 > key2 = value2 > key3 = value3 > *bootloader argument comments* > ... > > Fixes: 717c7c894d4b ("fs/proc: Add boot loader arguments as comment to /proc/bootconfig") > Signed-off-by: Zhenhua Huang > Signed-off-by: Paul E. McKenney > Cc: Masami Hiramatsu > Cc: > Cc: OOps, good catch! Let me pick it. Acked-by: Masami Hiramatsu (Google) Thank you! > > diff --git a/fs/proc/bootconfig.c b/fs/proc/bootconfig.c > index 902b326e1e560..e5635a6b127b0 100644 > --- a/fs/proc/bootconfig.c > +++ b/fs/proc/bootconfig.c > @@ -62,12 +62,12 @@ static int __init copy_xbc_key_value_list(char *dst, size_t size) > break; > dst += ret; > } > - if (ret >= 0 && boot_command_line[0]) { > - ret = snprintf(dst, rest(dst, end), "# Parameters from bootloader:\n# %s\n", > - boot_command_line); > - if (ret > 0) > - dst += ret; > - } > + } > + if (ret >= 0 && boot_command_line[0]) { > + ret = snprintf(dst, rest(dst, end), "# Parameters from bootloader:\n# %s\n", > + boot_command_line); > + if (ret > 0) > + dst += ret; > } > out: > kfree(key); -- Masami Hiramatsu (Google)