From patchwork Sun Feb 11 05:28:08 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Randy Dunlap X-Patchwork-Id: 199370 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:50ea:b0:106:860b:bbdd with SMTP id r10csp1801286dyd; Sat, 10 Feb 2024 22:44:25 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCUK7acT98P26+0L6MhBIb8Mlj7p7e04nFMpbRTKhGto2olUUzXMlywvxS1b1IxeyCW2ikq50aW7TKKr6XF1wqXE8xhmGg== X-Google-Smtp-Source: AGHT+IE69WZvh/OoueyG8W08IalM4YgfUz/35mN522ovDCQMVbFI53Cx8uWJ3wbKL1EXxJsNK10W X-Received: by 2002:a17:903:1110:b0:1d9:b6a1:1fe4 with SMTP id n16-20020a170903111000b001d9b6a11fe4mr5373383plh.18.1707633865115; Sat, 10 Feb 2024 22:44:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707633865; cv=pass; d=google.com; s=arc-20160816; b=PhgVchE+UsdizS01Ba8OAMeYLORDSEtEPSQS9w5v6gweunmlQaOH1Opi1Wrso9mPKh /TrFDwipau2l/b/44FKaqcP4ZSSuyg6FrscAYDvy8tNHPy2p4U5BWTk7OlFQ7G2XW5V1 tXjy2rRMzIx8B0qVB9+5kwlj8rNwhmZgTuUmdobieaSBCK2zz2PffrK8T3QSqvjjJg16 Yoc9OPyhYNxZGwJsVtUUMEmi1J5D0GDaVO3aQnM3IJUNb3x9VIlNVYtfoExLjSEocAqY M4bTFRrzt9FKWM8m3sIT3SFagxMwK+zsmELa0IwAKVVUNqWtn2050yMWgLIY6kbtmuXh lYxA== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=ZbGAi9XelCY7QexlvxqZcifEK3+YdqIlzW8v8T7xhO8=; fh=Xc5585LeeEwTkS1ie3BeYqC+npJRla+JEib7KS6icns=; b=VpNetTrGmKfJlC9QUngEgcaFjEotQzYi2e/HiYMAW3rVaiLXqNAkOFdVTj3vO02osa Sr6rXqIAlwnlxTqWcGeF8UfJX4Af3cL6u2fQdgZX+gQj4nIoZ+/JFwDcApDJKHIHeIfs LRRr6OUyF4BgXfsYIev7WXQmhr5cftcKtS8/ZejTSUwFKjZv0j65dPIbwwZAnqq0YMx8 mQqG6QrkanTNUJWPYWcnOTX7vsUHJpJYQu+hWeRGIWkY6uFzLtOdtT1KTTXMdQOGwZvW nD9AtYJSy7vl7+eaiA8sJ0jf20qh+lv/GDwL9uCcQ+wIeygaCsaXdaCxZNOLU5PnWDJh y73w==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=vGOWWNwR; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-60639-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60639-ouuuleilei=gmail.com@vger.kernel.org" X-Forwarded-Encrypted: i=2; AJvYcCXZsvecV+RR9ajMlZw0rqxAeuO1kDaiErDlxRWZRsDCq9MZqP0SL4MNkKdN/6t9nkTyFS2frW+b8/sVJLDVG1NG+YsH+A== Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [2604:1380:45e3:2400::1]) by mx.google.com with ESMTPS id lw6-20020a1709032ac600b001da15580d28si3376743plb.552.2024.02.10.22.44.25 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 10 Feb 2024 22:44:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60639-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) client-ip=2604:1380:45e3:2400::1; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20210309 header.b=vGOWWNwR; arc=pass (i=1 dkim=pass dkdomain=infradead.org); spf=pass (google.com: domain of linux-kernel+bounces-60639-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:45e3:2400::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60639-ouuuleilei=gmail.com@vger.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 sv.mirrors.kernel.org (Postfix) with ESMTPS id DAD6E285B2C for ; Sun, 11 Feb 2024 05:28:40 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E62FC17574; Sun, 11 Feb 2024 05:28:14 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="vGOWWNwR" Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 2DC6C12E59; Sun, 11 Feb 2024 05:28:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707629292; cv=none; b=OYQRvK39qHMMAxLViEPOFtHKGX7Zag0JMFBoGwJBZ+G7SM8ZUnUhlOyvXzPbd+xJXd5xN0C3LTiPWRFmQI8wf+P1xP/ja4vcsBacEwBXrW7jAcuYEdl+1VekyyznJQfOrMmhApq4IuJg8v5F0A4CcthjKwoc7jIZY30w9h4oewU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707629292; c=relaxed/simple; bh=mAZEulojYIR6tmfvP6+XGG8ArY0BK8jF6DxxlJ/nlYg=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=kEM6AqgQnRkkJ2MJ6iWrnq9skeMoPKdTzc21VBgs9HsJscnq6vZa8gDJyv3dbU6Rjlk2BCC4cNQIRW3sISXOBnpsdn1Svn9cra/z4Lc8WuurB9aeeR1NL/5kxlhhEzDPqgXAR7Lf0RbdXXKcdpLrBuivX9TZYlTMdG3NDnt+TGo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org; spf=none smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=vGOWWNwR; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=none smtp.mailfrom=infradead.org 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=ZbGAi9XelCY7QexlvxqZcifEK3+YdqIlzW8v8T7xhO8=; b=vGOWWNwREyr+Z6OHIRexqEUzxS eb2rHKPOxjqc/OGGq5L18QhyZG76MtClXkc596cmFrawAqck5KYO6fuJ1K8+P+dcEZOqGQuVFzUmt FgnxIhBJA/CVWKOhipfG4L21GxE+qmOrGd6/RKaGtWoNF5+J2UutXkAFAlk0aloZToqK/STwht0DQ GKOEJvqCz3tJjY7LiGRPmgJdlhDgkF64d+tStnykfuvHApMNicjgCMKnUbMZRZ093R6QIvwFyZfDv KIfea6OMciGosT1OqjHHb+YbLDTxU65sElFABWXPjV6dDwNLP67AB4C/IIz4sIvKnA3tMm6ylldJb EJPe76ig==; Received: from [50.53.50.0] (helo=bombadil.infradead.org) by bombadil.infradead.org with esmtpsa (Exim 4.97.1 #2 (Red Hat Linux)) id 1rZ2Nt-00000002My9-1Fad; Sun, 11 Feb 2024 05:28:09 +0000 From: Randy Dunlap To: linux-kernel@vger.kernel.org Cc: Randy Dunlap , Igor Zhbanov , "David S. Miller" , sparclinux@vger.kernel.org, Dan Carpenter , Nick Alcock , Sam Ravnborg , Andrew Morton , stable@vger.kernel.org, Arnd Bergmann , Andreas Larsson Subject: [PATCH v5] sparc: vDSO: fix return value of __setup handler Date: Sat, 10 Feb 2024 21:28:08 -0800 Message-ID: <20240211052808.22635-1-rdunlap@infradead.org> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1790583887670384502 X-GMAIL-MSGID: 1790583887670384502 __setup() handlers should return 1 to obsolete_checksetup() in init/main.c to indicate that the boot option has been handled. A return of 0 causes the boot option/value to be listed as an Unknown kernel parameter and added to init's (limited) argument or environment strings. Also, error return codes don't mean anything to obsolete_checksetup() -- only non-zero (usually 1) or zero. So return 1 from vdso_setup(). Fixes: 9a08862a5d2e ("vDSO for sparc") Signed-off-by: Randy Dunlap Reported-by: Igor Zhbanov Link: lore.kernel.org/r/64644a2f-4a20-bab3-1e15-3b2cdd0defe3@omprussia.ru Cc: "David S. Miller" Cc: sparclinux@vger.kernel.org Cc: Dan Carpenter Cc: Nick Alcock Cc: Sam Ravnborg Cc: Andrew Morton Cc: stable@vger.kernel.org Cc: Arnd Bergmann Cc: Andreas Larsson --- v2: correct the Fixes: tag (Dan Carpenter) v3: add more Cc's; correct Igor's email address; change From: Igor to Reported-by: Igor; v4: add Arnd to Cc: list v5: add Andreas to Cc: list arch/sparc/vdso/vma.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff -- a/arch/sparc/vdso/vma.c b/arch/sparc/vdso/vma.c --- a/arch/sparc/vdso/vma.c +++ b/arch/sparc/vdso/vma.c @@ -449,9 +449,8 @@ static __init int vdso_setup(char *s) unsigned long val; err = kstrtoul(s, 10, &val); - if (err) - return err; - vdso_enabled = val; - return 0; + if (!err) + vdso_enabled = val; + return 1; } __setup("vdso=", vdso_setup);