Received: by 2002:a05:6a10:17d3:0:0:0:0 with SMTP id hz19csp1113206pxb; Sat, 17 Apr 2021 07:03:47 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxyDOuL1cL7k8z8Y8oo/4pesoCctfxraWE1cA1UhIxJPElUuVw6YFXlg8BHC7jx10w+0BKV X-Received: by 2002:aa7:d9d7:: with SMTP id v23mr15975798eds.281.1618668227377; Sat, 17 Apr 2021 07:03:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1618668227; cv=none; d=google.com; s=arc-20160816; b=E5c5SwhhuIQy8d74t8wAL6Dgwdc/16KDW65V3eFhP5qbxrKQcjhQrR+0IgWKG+7OcL e9cyBrort8ZzOO5vjd/9+71u3zq+lyQvdIUhGU24ytsd1GPkUUYlJCTaPkY4IdTwXRXB 8z3CY6KZ6IKVjBRbFpnG+xcld+rjRD+nO1gZJ2fUSuRacA5VQV4T4ODsc7UKm2KygAtl 1h2mYrvKjdWj7M5abMHVrinRkcjMxUXRWn/KwgwjsJDF/JmEd338A4TrH2/z/IKUMuoz 0uivBDBO6QhNB8VwyTkVogE2KXtwwTKyMpDP42WED06p9zOMUbxbw0AFgeXWquSI2YjE uecg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:user-agent:references:message-id :in-reply-to:subject:cc:to:from:date; bh=HmDJn4qEnB9g6wMiIjKm8jubwyCPR/5UBob1PepEXkg=; b=E4wgdoIgEOCr+hOobZ+jo0Z/a9EifP2bq2JLgzlhzP7lyEoo+LNB+B5+LEksNve7bS mr56ltAPGcixFvqd5cLxmr09pJem1i+lrQw5cXiXM+ckfN+TiphipTglt6DVUWUaezja wFW1Qy0+ijdl7iInuqQWCNOX5giFyQ7b9kF0Xebg//k65e8mxRvtm/EOc43nz6JEHDLV 2yjMMcYmO7R8RqvTwIinF8PwPeYapqQ0iPbU3VMybiDMar+cCJvWyHGdlFrROAu+//Sm zDNjWrLDwJIRgk1Tuppz+TG6Qb5iWP/FNhDPttp1QwcXKtgiBXqFag2lUuGTtXQ2kiDD 0jFQ== 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 kq12si3781566ejb.695.2021.04.17.07.03.24; Sat, 17 Apr 2021 07:03:47 -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 S236481AbhDQOCF (ORCPT + 99 others); Sat, 17 Apr 2021 10:02:05 -0400 Received: from angie.orcam.me.uk ([157.25.102.26]:39046 "EHLO angie.orcam.me.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230442AbhDQOCE (ORCPT ); Sat, 17 Apr 2021 10:02:04 -0400 Received: by angie.orcam.me.uk (Postfix, from userid 500) id 3C0EC92009C; Sat, 17 Apr 2021 16:01:36 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by angie.orcam.me.uk (Postfix) with ESMTP id 2EBB492009B; Sat, 17 Apr 2021 16:01:36 +0200 (CEST) Date: Sat, 17 Apr 2021 16:01:36 +0200 (CEST) From: "Maciej W. Rozycki" To: David Laight cc: Joe Perches , Khalid Aziz , "James E.J. Bottomley" , "Martin K. Petersen" , Christoph Hellwig , "linux-scsi@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "stable@vger.kernel.org" Subject: RE: [PATCH 1/5] scsi: BusLogic: Fix missing `pr_cont' use In-Reply-To: <6679310a77984cc0af9f48f5616b840c@AcuMS.aculab.com> Message-ID: References: <787aae5540612555a8bf92de2083c8fa74e52ce9.camel@perches.com> <6679310a77984cc0af9f48f5616b840c@AcuMS.aculab.com> User-Agent: Alpine 2.21 (DEB 202 2017-01-01) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sat, 17 Apr 2021, David Laight wrote: > > > In patch 2, vscnprintf should probably be used to make sure it's > > > 0 terminated. > > > > Why? C99 has this[1]: > > > > "The vsnprintf function is equivalent to snprintf, with the variable > > argument list replaced by arg, which shall have been initialized by the > > va_start macro (and possibly subsequent va_arg calls)." > > vscnprintf() is normally the function you want (not vsnprintf()) > because the return value is the number of characters actually > put into the buffer, not the number that would have been written > had the buffer been long enough. Good catch, thank you! I'll respin the series then. Thank you for the background story too! Maciej