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 Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 78B9FC433EF for ; Tue, 8 Mar 2022 02:43:32 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4KCKQ96K7Tz3bd8 for ; Tue, 8 Mar 2022 13:43:29 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=mHKKjGaH; dkim-atps=neutral Authentication-Results: lists.ozlabs.org; spf=none (no SPF record) smtp.mailfrom=infradead.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=rdunlap@infradead.org; receiver=) Authentication-Results: lists.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=infradead.org header.i=@infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=mHKKjGaH; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4KCKPR1t6kz30K0 for ; Tue, 8 Mar 2022 13:42:50 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: MIME-Version:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:In-Reply-To:References; bh=M8LQmozKlMAmwF5ONXTxr0GrFDyz/bb34QoDIznuFrY=; b=mHKKjGaH+5+tBy0yeR0XX1fqT4 1k5Ej3Zxpm4lGSdY5JsgxYfQY1Tp9xDGkq9uZQW7Mjx0iPu+2Kcu6UmBdmd4uZRfyLvUzH/F5iCGF yQw1SfG1I+wmL1VNWerUZ4sypofb0kHsou3Ntr3boSPpG0T+0gKBspE6gISqSm8siVqZZQhOjff5H eYdOVzbnN0vt0xAk8chLfdECRQi1RAYR6P7vYwfOqNVAkizMawEEkC18xCITAJbjyH1vB35c2FuFL 10teRvYsjMIrkhGS5ja7PZ1r7DeLJgCucV0o/+7BxkEWZbsapd41rkrglNO7zVNv4lZlab5ENhnaW Yv5x0e4w==; Received: from [2601:1c0:6280:3f0::aa0b] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.94.2 #2 (Red Hat Linux)) id 1nRPnx-002Tq3-5N; Tue, 08 Mar 2022 02:42:29 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Subject: [PATCH] tty: hvc: fix return value of __setup handler Date: Mon, 7 Mar 2022 18:42:28 -0800 Message-Id: <20220308024228.20477-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Randy Dunlap , Vasily Gorbik , Greg Kroah-Hartman , Jingoo Han , Julian Wiedmann , patches@lists.linux.dev, Igor Zhbanov , linuxppc-dev@lists.ozlabs.org, Jiri Slaby Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" __setup() handlers should return 1 to indicate that the boot option has been handled or 0 to indicate that it was not handled. Add a pr_warn() message if the option value is invalid and then always return 1. Fixes: 86b40567b917 ("tty: replace strict_strtoul() with kstrtoul()") Signed-off-by: Randy Dunlap Reported-by: Igor Zhbanov Link: lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru Cc: Jingoo Han Cc: Greg Kroah-Hartman Cc: Jiri Slaby Cc: Michael Ellerman Cc: Julian Wiedmann Cc: Vasily Gorbik Cc: linuxppc-dev@lists.ozlabs.org --- drivers/tty/hvc/hvc_iucv.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) --- linux-next-20220307.orig/drivers/tty/hvc/hvc_iucv.c +++ linux-next-20220307/drivers/tty/hvc/hvc_iucv.c @@ -1417,7 +1417,9 @@ out_error: */ static int __init hvc_iucv_config(char *val) { - return kstrtoul(val, 10, &hvc_iucv_devices); + if (kstrtoul(val, 10, &hvc_iucv_devices)) + pr_warn("hvc_iucv= invalid parameter value '%s'\n", val); + return 1; }