Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1809365pxk; Tue, 1 Sep 2020 08:18:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzU0ua0GLSDtOIrRED3PLHfGmGOkYnjgy6ImPRIewXEdiDSFqTgXx9sEJ2spPy9rrdgEgVB X-Received: by 2002:a17:906:250a:: with SMTP id i10mr1836267ejb.202.1598973490674; Tue, 01 Sep 2020 08:18:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598973490; cv=none; d=google.com; s=arc-20160816; b=PNbDZzRPkEV/OGEJ04sKE8lm5Kg+KF/Ion2DxOkbDvt6t9slWRSyMKYSce/wqQmYfk Jub8UNlTI4s9FOM/QeeGhplkZjCU6MTpVNUcUITAAYgzWoXRdXJewBE914LvduUxKl3M HwNgoSm9p8NDHbF7e2Y6MduAbg5M+awclL91KjJ5jIqU8LYRViRgzJNDv9Wk2EYb3giq BCRuDghQ2joJyUI1OYCcof87DXpF1M7yjVCTvInj42JAA6fdl8DN4QASU9YRAF7lgC6l gvwlRVOs1zG7Nc9pzBNZLFJHeVxC29ANXbAy0amhF4a8zwsEAbW6q2NfQAdEtecgoGZ8 WKXA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=xwYf79WL5gqWyPN9xPwfjZ/wxUYagCAY9oU/BXwet2Q=; b=TNTrVoz6XDs6jMm0J4iUDzPe7Iw6F/szjUwZhdW7kYWSNLghal2fwPUKjYgiLcByRx G3n+k3NzAU/KgXfAq2TK1QKGez+WoNOpZFOiH2Fg159T0Ie8Q8pf2louToKIDOXveQ+2 a+UDI8cDRwHQ3bPBcROlfzvmE7C0ftIf6KyVfgu43pZ5uMxTrel+0Zv5kvE2cEAG11WA 1oFTh/fo9/yOEc1bvwxL6nsld2noraMy81tb4B78WL3/FU8tibjoBrQ2YMryBuiEmrCD AaGzwJiXNOLTXhxcuSV/kJPOt0fg8cP3wypzkiclcniO6ZG2UosVWdsC8GNWUJyL3NdT qnXg== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si776174ejz.521.2020.09.01.08.17.46; Tue, 01 Sep 2020 08:18:10 -0700 (PDT) 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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729291AbgIAPQO (ORCPT + 99 others); Tue, 1 Sep 2020 11:16:14 -0400 Received: from verein.lst.de ([213.95.11.211]:53788 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729196AbgIAPPU (ORCPT ); Tue, 1 Sep 2020 11:15:20 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id 0B52968B05; Tue, 1 Sep 2020 17:15:19 +0200 (CEST) Date: Tue, 1 Sep 2020 17:15:18 +0200 From: Christoph Hellwig To: Josef Bacik Cc: hch@lst.de, viro@ZenIV.linux.org.uk, linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org, willy@infradead.org, kernel-team@fb.com Subject: Re: [PATCH 5/6] parport: rework procfs handlers to take advantage of the new buffer Message-ID: <20200901151518.GE30709@lst.de> References: <20200813210411.905010-1-josef@toxicpanda.com> <20200813210411.905010-6-josef@toxicpanda.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200813210411.905010-6-josef@toxicpanda.com> User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 13, 2020 at 05:04:10PM -0400, Josef Bacik wrote: > The buffer coming from higher up the stack has an extra byte to handle > the NULL terminator in the string. Instead of using a temporary buffer > to sprintf into and then copying into the buffer, just scnprintf > directly into the buffer and update lenp as appropriate. > > Signed-off-by: Josef Bacik Looks good, Reviewed-by: Christoph Hellwig