From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F1172C2D0A3 for ; Fri, 6 Nov 2020 10:18:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7CC03206DC for ; Fri, 6 Nov 2020 10:18:31 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=suse.com header.i=@suse.com header.b="LniMUmam" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726912AbgKFKSa (ORCPT ); Fri, 6 Nov 2020 05:18:30 -0500 Received: from mx2.suse.de ([195.135.220.15]:60212 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726124AbgKFKS3 (ORCPT ); Fri, 6 Nov 2020 05:18:29 -0500 X-Virus-Scanned: by amavisd-new at test-mx.suse.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1604657908; 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=i5pd9y1DhAnumDSXsWEX/QIlfmRQSZlMbotmJn1sddU=; b=LniMUmampiODWFsOSBnFLULJH+mZcsF1vINqQ7qjxNVunRZLdHu3bcFLVR3fnJqI7Eksuq hJ6xUmzV+38j20tWjdYvFceXm3yx/LiVhfCYHquIODnJioTxQ1EJTYSeOqpyNzT03nomJr 7EhhlugQ265Zy/o6lpq8s8ZswA+3YOM= Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id 2DC05AD0B; Fri, 6 Nov 2020 10:18:28 +0000 (UTC) Date: Fri, 6 Nov 2020 11:18:27 +0100 From: Petr Mladek To: Matteo Croce Cc: linux-kernel@vger.kernel.org, Guenter Roeck , Arnd Bergmann , Mike Rapoport , Kees Cook , Pavel Tatashin , Robin Holt , Fabian Frederick , Andrew Morton , Greg Kroah-Hartman Subject: Re: [PATCH v3 2/3] reboot: fix overflow parsing reboot cpu number Message-ID: <20201106101827.GK1602@alley> References: <20201103214025.116799-1-mcroce@linux.microsoft.com> <20201103214025.116799-3-mcroce@linux.microsoft.com> <20201105180900.GH1602@alley> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 2020-11-05 19:14:27, Matteo Croce wrote: > On Thu, Nov 5, 2020 at 7:09 PM Petr Mladek wrote: > > > + if (reboot_cpu >= num_possible_cpus()) { > > > + pr_err("Ignoring the CPU number in reboot= option. " > > > + "CPU %d exceeds possible cpu number %d\n", > > > > ./scripts/checkpatch.pl used to complain that printk() format parameter should stay > > on a single line (ignoring 80 char limit). It helps when people are > > trying to find which code printed a particular message. > > > > It is not a big deal here because %d does not allow to search the > > entire message anyway. > > > > I am not sure if Andrew would like to get this fixed. In both cases: > > > > Reviewed-by: Petr Mladek > > > > Yes, I saw this warning, but to suppress it I had to write a 133 char > line, much beyond even the new 100 char limit. > I expect a smart user to just grep the first half of the string, like > "Ignoring the CPU number in reboot=" I agree with checkpatch in this case. IMHO, the more reliable way to grep the string is more important than the 80 or 100 chars per-line. That said, it is not a big deal in this case because of the %d. It requires to search only part of the string anyway. I am perfectly fine with keeping it as is. Best Regards, Petr